Fork me on GitHub
#chlorine-clover
<
2020-04-01
>
fabrao02:04:57

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?

mauricio.szabo17:04:06

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

fabrao19:04:09

in evaluation of string and number is ok

fabrao19:04:01

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

mauricio.szabo19:04:47

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....)

fabrao19:04:47

#object [cljs$core$_PLUS_]

mauricio.szabo19:04:50

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

fabrao19:04:33

I used new evaluate selection

fabrao19:04:58

in evaluate-top-block this problem happen

fabrao19:04:53

with ctrl-; s same problem

mauricio.szabo20:04:57

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

mauricio.szabo21:04:54

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

mauricio.szabo21:04:21

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

fabrao23:04:15

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

mauricio.szabo16:04:46

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.

mauricio.szabo16:04:35

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

mauricio.szabo22:04:41

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).

mauricio.szabo22:04:37

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.

seancorfield22:04:49

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?

seancorfield22:04:27

(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)

mauricio.szabo23:04:08

No, it won't inject anything

❤️ 8