-
-
Notifications
You must be signed in to change notification settings - Fork 647
Error connecting to clojurescript shadow-cljs repl #2967
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
Comments
Seems that the EDN parser is struggling with something in your config. @plexus might have a better idea what exactly the problem is. |
Quite bizarre, did you upgrade your emacs recently? it seems like
It's treating that |
Sort of. I was using emacs-plus@27 for a while and everything was working fine. But then decided to give compiling gccemacs a go but that was just buggy in general. So I then reverted back to emacs-plus@27, and then this error started. I've since switched emacs-mac, but the error is still persisting. I've also been able to recreate this issue on a newly formatted MacOS 11.1 machine with emacs-mac 27.1 running doom-emacs@develop. |
Just recreated the the bug again on Ubuntu. Same setup, emacs@27.1 , doom-emacs@develop. |
After some more digging I've found that this issue seems to be related to doom-emacs as it doesn't occur with spacemacs. I'll close this issue and open it on on the doom repo. |
I just started hitting this same error. I'm using emacs-mac 27.2. I think parseedn may be busted. When I evaluate
|
Last batch of parseedn problems were fixed with #3060 , are you running a recent cider.el snapshot? If the problem persists, it would be helpful to know if it can also be observed with https://emacsformacosx.com/ which is much more vanilla than emacs-mac (of course trying it is just a one-off thing) |
Same error with emacsformacosx ( I think I'm using the latest cider.el snapshot: When you run |
Probably deleting the installed packages CIDER, parseclj and parseedn and installing CIDER again is the best course of action at this point. |
I'm having this problem as well. (require 'parseedn)
(parseedn-read-str "1") It is reproducable in doom vanilla emacs sandbox too.
|
As I've hinted at above this seems to be an Emacs regression in |
I've opened PRs for parseclj and parseedn (parseedn relies on parseclj). @evanlouie @aiba @danjohansson would be great if you could confirm that on your Emacs version, using (require 'parseedn)
(parseedn-read-str "1")
;; => 1 |
@plexus I still have the same problem. |
If it helps: Running Can it be something with dynamic binding or evaluation order? |
This is what (defun parseclj-lex--leaf-token-value (token)
"Parse the given leaf TOKEN to an Emacs Lisp value."
(let ((token-type (parseclj-lex-token-type token)))
(cond
((eq :number token-type) (string-to-number (alist-get :form token)))
((eq :nil token-type) nil)
((eq :true token-type) t)
((eq :false token-type) nil)
((eq :symbol token-type) (intern (alist-get :form token)))
((eq :keyword token-type) (intern (alist-get :form token)))
((eq :string token-type) (parseclj-lex--string-value (alist-get :form token)))
((eq :character token-type) (parseclj-lex--character-value (alist-get :form token)))
((eq :symbolic-value token-type) (intern (substring (alist-get :form token) 2)))))) |
@plexus sorry, I only checked out parseedn. My bad. |
No worries, I'll try to cut a release soon, but would be great if at least one person could confirm that this a) fixes the issue, and b) still seems to work in general :D |
The split into two libraries is unfortunate, it should really be one code base, but it was one of the things we had to do to be considered for inclusion in MELPA. |
With those fixes in place I get a different error: (I will double check my setup...)
|
Does this work for you? Do (require 'seq)
(let ((keys '(a b)))
(seq-doseq (key keys)
(message "%S" key))) |
Yes that works... 🤔 |
Then I'm out of ideas... this is exactly what that code does. :/ https://git.1-hub.cnclojure-emacs/parseclj/blob/master/parseclj-alist.el#L83-L89 |
I've replaced the seq-doseq with a mapcar, how about now? |
Yeah the feeling I get is that some core functionality has been overriden by something. But I don't know elisp very well. Thanks for the help so far! 👍 |
@plexus I will give it a go |
@plexus that did the trick! :) |
Effing emacs... Emacs lisp is bad enough as it is, but stuff just randomly not working on some builds is absolutely infuriating. Anyway glad this works now, I'll release new parseclj/parseend versions. |
Moral of the story, don't use any macros from |
Thanks for the help! 👍 |
Wow, thank you guys for tracking this down! Good to know about avoiding those elisp libs. |
It's a real shame because these are the libs that make elisp bearable, but this is the second issue we have like this, first with |
Released in parseclj / parseedn v1.0.6 |
Should we bump the minimum requirement in cider.el? |
yes, that would be a good idea. |
Ensures this issue #2967 (comment) won't reappear.
This error started a couple days ago.
Expected behavior
When in a shadow-cljs project, I should be able to run:
C-c C-x j m
shadow
Actual behavior
After running
C-c C-x j m
and selectingshadow
an errors is printed:When
toggle-debug-on-error
is enabled, the following is dumped:Steps to reproduce the problem
Project Setup:
Run it with either of:
C-c C-x C-c s
:npx shadow-cljs watch app
C-c C-x C-c s
, selectlocalhost
, select the shown port, selectshadow
C-c C-x j m
C-c C-x C-c s
in the projectEnvironment & Version information
Mac:
Linux:
Both running doom-emacs@develop
CIDER version information
C-c -C-x j m
successfully starts a Clojure repl before erroringEmacs version
GNU Emacs 27.1 (build 1, x86_64-apple-darwin20.2.0, Carbon Version 164 AppKit 2022.2) of 2021-01-14
Operating system
Pop!_OS 20.04
macOS 11.1
The text was updated successfully, but these errors were encountered: