So I’m trying to get a CIDER repl working with shadow-cljs. The way I launch it is by indirectly, through another script in package.json, doing shadow-cljs watch main renderer
. I can seem to do cider-connect-cljs just fine, but I can’t evaluate any functions or send anything to the repl. Maybe this is a better question for #emacs?
what happens if you do? I can't really answer emacs/cider questions but maybe I can give a hint depending on what happens
So shadow starts a server just fine. Then I can see live changes when I edit the source. I can’t seem to be able to send anything to the repl though. I found about this thing called piggieback so I added it as a dependency, but is that really the problem?
WARNING: CIDER requires cider-nrepl to be fully functional. Some features will not be available without it! (More information)
I wonder if this has anything to do with the problem. I even checked out the URL where it says “(https://docs.cider.mx/cider/troubleshooting.html#cider-complains-of-the-cider-nrepl-version)” but it didn’t really help.
well did you add cider-nrepl to your dependencies?
Nevermind. Turns out I had the incorrect cider version.
I had cider/nrepl not cider/cider-nrepl.
ah
I'm using ANTLR4 4.9.1 that AFAICT generates ES6 classes with static members which seem to upset shadow-cljs:
220 |
221 | export default class ABCMusicLexer extends antlr4.Lexer {
222 |
223 | static grammarFileName = "ABCMusic.g4";
---------------------------------^----------------------------------------------
'(' expected
--------------------------------------------------------------------------------
To add more details - I just call ANTLR4's code to generate some JS files that I include in my CLJS files and then I call shadow-cljs to build it all.
Is there any way to compile such classes?it doesn't upset shadow-cljs. that is the closure-compiler complaining.
probably just doesn't support static class properties yet
I assume it means that I have to either use Babel or something like that or downgrade ANTLR4 to the point when it wasn't emitting such code, right?
FWIW ANTLR4@4.8.0 works fine since it emits ES5 code, so I'll settle on it.
> FYI, static class fields are currently in stage 3 of the TC39 process, so they aren't officially part of the language yet.
Right, thanks!