Fork me on GitHub

Hello all, I´m using shadow-cljs watch app , I connect to socket repl and embedded too that showed int README, but when try to evaluate some (+ 1 2) it´s response is `Right-hand side of 'instanceof' is not an object` . Sorry my dumb question but what I´m missing?


Wow, I never saw that specific error.... Can you evaluate other things, like a single number, etc?


in evaluation of string and number is ok


🙂 I got this work (js/console.log "Teste")


Can you evaluate only +, for example? (because I'm working right now on ClojureScript, and I'm not seeing these issues... maybe its some non-printable char on the editor, or something... I have no idea....)


#object [cljs$core$_PLUS_]


Okay, so this is what is expected... Are you using evaluate-top-block, or which command? Or selecting it and evaluating?


I used new evaluate selection


in evaluate-top-block this problem happen


with ctrl-; s same problem


Does your code is some private project, or is it an open-source one that I can look at and debug?


Also, did you try to turn on "Enable experimental features"?


(Also, what's your operating system, shadow-cljs version, Atom and Chlorine version, please?)


It´s close project. I´m using Windows 10 Pro, shadow-cljs "2.8.74", Atom 1.42.0, Chlorine 0.4.16


Try to upgrade Shadow-CLJS to at least 2.8.8x (I'm currently using 2.8.83). There were some older versions that gave me REPL and compilation problems.


Also, if you still have these problems on shadow 2.8.83, try to enable "Experimental features" on the plug-in settings. It'll probably be the default soon-ish and it fixes also some problems with CLJS evaluation


Just published a new version of Chlorine. It adds an "alpha support" for nREPL. Don't panic: Chlorine will always support a Socket REPL. This new code is to add support for other environments (Hy and Racket, for example) and also to make it easier for people that come from lein and boot. It also will also work as a "fallback" where UNREPL fails (so I can somewhat fix the bug that @jlmr posted here as fast as possible).


I have not battle-tested this implementation yet, so expect bugs if you use nREPL (for example, exceptions are not printing the stacktraces with this implementation, yet) 😄. But this probably solves some problems with ClojureCLR and Arcadia that some people were experiencing, like outputs appearing while evaluating things and other issues.


Just to check @mauricio.szabo: if you don't use this feature, it won't inject any new code into the REPL and it won't require any additional dependencies in projects?


(I'm very strongly against tools that inject a lot of code into my running processes, especially since I sometimes connect Chlorine to QA or even production)


No, it won't inject anything

❤️ 8