Skip to content

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

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Bugs fixed

- [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid `cider--error-phase-of-last-exception` recursive loop.
- [#3587](https://github.com/clojure-emacs/cider/issues/3587): avoid overlays and `message`s on stderr that is unrelated to exception handling.

## 1.13.0 (2024-01-14)

Expand Down
15 changes: 8 additions & 7 deletions cider-eval.el
Original file line number Diff line number Diff line change
Expand Up @@ -882,13 +882,14 @@ and the suffix matched by `cider-module-info-regexp'."
(defun cider--maybe-display-error-as-overlay (phase err end)
"Possibly display ERR as an overlay honoring END,
depending on the PHASE."
(when (or
;; if we won't show *cider-error*, because of configuration, the overlay is adequate because it compensates for the lack of info in a compact manner:
(not cider-show-error-buffer)
(not (cider-connection-has-capability-p 'jvm-compilation-errors))
;; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate:
(and cider-show-error-buffer
(member phase (cider-clojure-compilation-error-phases))))
(when (and phase ;; if there's no phase, `err' belongs to stderr, unrelated to exception handling (bug #3587)
(or
;; if we won't show *cider-error*, because of configuration, the overlay is adequate because it compensates for the lack of info in a compact manner:
(not cider-show-error-buffer)
(not (cider-connection-has-capability-p 'jvm-compilation-errors))
;; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate:
(and cider-show-error-buffer
(member phase (cider-clojure-compilation-error-phases)))))
;; Display errors as temporary overlays
(let ((cider-result-use-clojure-font-lock nil)
(trimmed-err (funcall cider-inline-error-message-function err)))
Expand Down