Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid overlays and messages on stderr that is unrelated to exception handling #3616

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

vemv
Copy link
Member

@vemv vemv commented Feb 1, 2024

  • Introduce cider-clojure-runtime-error-regexp
    • Similar to our compilation errors regex - we didn't need runtime-oriented ones till now
    • Ref
  • Avoid overlays and messages on stderr that is unrelated to exception handling

After #3608 and other attempts I'm finally confident about this solution - it's simple, robust and aligned with other similar solutions.

@rrudakov QAing would be most welcome.

Cheers - V

@vemv vemv requested a review from bbatsov February 1, 2024 15:33
@rrudakov
Copy link
Contributor

rrudakov commented Feb 1, 2024

I've done a quick test with the minimal project. The problem is not reproducible. I'll also try to test it with real project for some time.

@rrudakov
Copy link
Contributor

rrudakov commented Feb 1, 2024

I've done a quick test with the minimal project. The problem is not reproducible. I'll also try to test it with real project for some time.

I still can see it on a real project:

image

But those are reflection warnings. I don't see timbre error logs in the overlay anymore. Not sure if it's an expected behaviour though.

I have the following in my user.clj:

(alter-var-root #'*warn-on-reflection* (constantly true))

nrepl messages:

(<--
  id         "4"
  session    "bb23f216-4dc0-4420-b48c-1df6be8e6b08"
  time-stamp "2024-02-01 16:46:40.763034000"
  err        "Performance warning, com/adgoji/mollie/client.clj:86:22 - ca..."
)
(<--
  id         "11"
  session    "bb23f216-4dc0-4420-b48c-1df6be8e6b08"
  time-stamp "2024-02-01 16:46:44.966841000"
  err        "Reflection warning, net/cgrand/xml.clj:85:4 - call to method..."
)

@rrudakov
Copy link
Contributor

rrudakov commented Feb 1, 2024

I'd say it's good enough for me, I only see those messages once after starting the REPL.

@vemv
Copy link
Member Author

vemv commented Feb 1, 2024

That was super useful. Thankfully we have a regex for reflection warnings, so it's an easy fix.

Commit incoming

@vemv
Copy link
Member Author

vemv commented Feb 1, 2024

Ready again

@rrudakov
Copy link
Contributor

rrudakov commented Feb 1, 2024

I've just checked, looks great now, reflection/performance warnings are also gone.

@vemv vemv merged commit 213576e into clojure-emacs:master Feb 1, 2024
35 checks passed
@vemv vemv deleted the feb1 branch February 1, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timbre logs can show in the minibuffer
2 participants