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

Red squiggly in source buffer is gone with Clojure 1.10 #2614

Closed
slipset opened this issue Mar 25, 2019 · 3 comments
Closed

Red squiggly in source buffer is gone with Clojure 1.10 #2614

slipset opened this issue Mar 25, 2019 · 3 comments
Labels
bug high priority Tickets of particular importance

Comments

@slipset
Copy link
Contributor

slipset commented Mar 25, 2019

Expected behavior

Whenever I do C-c C-c with a form that has an error, I get a red squiggly in my source buffer indicating where the error is.

Actual behavior

I’m not getting the red squiggly, but I get a rather friendly message in the *cider-repl..* buffer telling me that I have an error somewhere in my source file

Steps to reproduce the problem

Create a project with Clojure 1.10, jack-in, create a form with an error in it, evaluate it with C-c C-c. You will not have a red squiggly under the form with error, but you will get a message in the *cider-repl ...* buffer

Environment & Version information

Any recent version of Cider, Clojure 1.10.

Additional information

The messages I get in the repl are: for 1.10

Syntax error compiling at (core.clj:10:3).
      Unable to resolve symbol: somthing in this context

Wheras for 1.9.0 it’s

CompilerException java.lang.RuntimeException: Unable to resolve symbol: somthing in this context, compiling:(/Users/erik/Documents/github.com/refactor-nrepl-ns-kw-bug/src/foo/core.clj:10:3)

So a good starting point would be to look at this regex here:
https://github.com/clojure-emacs/cider/blob/master/cider-eval.el#L300

@bbatsov bbatsov added the bug label Apr 1, 2019
@bbatsov
Copy link
Member

bbatsov commented Apr 19, 2019

Yeah, you're right. That's broken because of the new message format.

@bbatsov bbatsov added the high priority Tickets of particular importance label May 8, 2019
@slipset
Copy link
Contributor Author

slipset commented Oct 7, 2019

So it seems like

(defvar cider-compilation-regexp '("Syntax error compiling at (\\(.*?\\):\\([[:digit:]]+\\):\\([[:digit:]]+\\))"
				 1 2 3))

works (at least for me (on my computer)). This does, however pose the question of backwards compatibility. If we simply change cider-compilation-regexp to this regex, then people working with older clojure versions will loose the red squiggly.

This leaves us with (at least) three options

  1. Simply use this regex, and hope the population of devs using versions earlier than 1.10 is small and diminishing quickly
  2. Make a monstrosity of a regex to cater for both
  3. Make several entries in compilation-error-regexp-alist-alist and compilation-error-regexp-alist

I feel that my emacs-lisp-fu leaves me at 1), and I'd need very clear guidance if you want to go for 2) or 3)

slipset added a commit to slipset/cider that referenced this issue Oct 7, 2019
@bbatsov
Copy link
Member

bbatsov commented Oct 7, 2019

Hmm, seems we dropped the ball on the original issue #2443 I'll put it here for posterity as I shared some thoughts about solving the problem there.

slipset added a commit to slipset/cider that referenced this issue Oct 16, 2019
…rror messages in 1.10

- Rewrite regex to use rx
- Add tests
slipset added a commit to slipset/cider that referenced this issue Oct 16, 2019
…rror messages in 1.10

- Rewrite regex to use rx
- Add tests
slipset added a commit to slipset/cider that referenced this issue Oct 16, 2019
…rror messages in 1.10

- Rewrite regex to use rx
- Add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug high priority Tickets of particular importance
Projects
None yet
Development

No branches or pull requests

2 participants