This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-21
Channels
- # announcements (1)
- # beginners (30)
- # calva (3)
- # cider (23)
- # clerk (5)
- # clj-kondo (16)
- # clojure (39)
- # clojure-brasil (3)
- # clojure-europe (19)
- # clojure-nl (1)
- # clojure-norway (54)
- # clojure-seattle (1)
- # clojure-uk (2)
- # clojurescript (9)
- # cursive (3)
- # datahike (13)
- # datomic (4)
- # emacs (7)
- # events (1)
- # fulcro (32)
- # hyperfiddle (17)
- # jobs-discuss (3)
- # meander (5)
- # missionary (132)
- # music (2)
- # nyc (1)
- # off-topic (33)
- # polylith (22)
- # proletarian (3)
- # scittle (106)
- # shadow-cljs (23)
I have been attempting to use shadow-cljs recently, but I am getting this error message right before I get to choose a build target.
[nREPL] Starting server via /opt/local/bin/npx shadow-cljs -d nrepl/nrepl:1.0.0 -d cider/cider-nrepl:0.30.0 -d cider/piggieback:0.5.2 server
[nREPL] server started on 50770
error in process filter: parseclj--reduce-coll: parseclj: Syntax error: "At position 617, unmatched :rbrace"
error in process filter: parseclj: Syntax error: "At position 617, unmatched :rbrace"
How can I debug this?run
/opt/local/bin/npx shadow-cljs -d nrepl/nrepl:1.0.0 -d cider/cider-nrepl:0.30.0 -d cider/piggieback:0.5.2 server
from a command line and see what happens. Somewhere it’s parsing (or erroneously thinks) some bad edn.
My money is malformed shadow-cljs.edn
if that were the case, shadow wouldn't even start. ive attempted running npx shadow-cljs watch app
then running M-x cider-connect-cljs
but this results in the same error
(shadow successfully parses the config and builds the specified target, but some EDN error occurs when connecting to the REPL)
interesting. you can try turning on nrepl message logging and also set emacs to give you a stack trace on error
you should be able to then debug the function in emacs and see what edn is acting problematically
parseclj backs https://github.com/clojure-emacs/parseedn
grep for parseedn in cider, luckily there are very few matches
This one calls my attention: (parseedn-read '((shadow/env . identity)))
Off hand, I have no idea what it does. Please give it a shot and report an issue if you aren't lucky
Thanks @U11BV7MTK and @U45T93RA6. I will try seeing what exact EDN data is being given to CIDER and try to see what’s going wrong
Cheers. Invoking (cider--shadow-get-builds)
directly might give you a reproducible case (which doesn't appear to even need an nrepl connection)
Here is what I see in the debug minibuffer
Debugger entered--Lisp error: (parseclj-parser-error "At position 562, unmatched :rbrace")
parseclj--error("At position %s, unmatched %S" 562 :rbrace)
parseclj--reduce-coll((#<hash-table equal 3/3 0x4653f237>) ((:token-type . :rbrace) (:form . "}") (:pos . 562)) parseedn-reduce-branch ((:tag-readers (shadow/env . identity))))
parseclj-parser(parseedn-reduce-leaf parseedn-reduce-branch ((:tag-readers (shadow/env . identity))))
parseedn-read(((shadow/env . identity)))
cider--shadow-get-builds()
Nice. May it be an instance of https://github.com/clojure-emacs/parseedn/issues/16 ? Either way, looks like there's a way to skip going down that code path in your particular project? The logic is:
(or cider-shadow-default-options
(car cider-shadow-watched-builds)
(completing-read "Select shadow-cljs build: " (cider--shadow-get-builds)))
would be happy to help. Is there a namespaced map in shadow-cljs.edn? Like a :mvn{:version
declaration?
shadow uses the same syntax as leiningen for dependencies. the shadow-cljs.edn file is very barebones
I'm assuming there is, but I can't find it: is there an easy way to disable switching my focus to the *cider-test-report*
buffer when running a test?
(setq cider-auto-select-test-report-buffer nil)
I believe the report still shows bit the report buffer doesn't become active
https://practical.li/spacemacs/reference/cider/configuration-variables/#tests@U05254DQM sorry for bringing up an old thread, but I had asked a question and then stepped away to do something else... and next thing you know, a week has passed. Just wanted to let you know, this is exactly what I was looking for and you answered my question.
Many thanks! and sorry for the radio silence.