chlorine-clover

About Chlorine for Atom and Clover for VS Code: https://atom.io/packages/chlorine and https://marketplace.visualstudio.com/items?itemName=mauricioszabo.clover
henrik 2019-11-04T08:32:35.163700Z

I’m not sure exactly what’s going on, but I’ve seen this popping up sometimes when evaluating CLJS expressions:

:repl-tooling.repl-client.clojure/ignore-nextnil
poc.core.main=> :repl-tooling.repl-client.clojure/ignore-next"[G__368 :result \"nil\"]"

:repl-tooling.repl-client.clojure/ignore-nextnil
poc.core.main=> 

henrik 2019-11-04T08:33:03.164100Z

(This is when evaluating (println *clojurescript-version*))

mauricio.szabo 2019-11-04T17:03:01.164900Z

Okay, I'll look at it. I think I know what the problem is...

πŸ‘ 1
mauricio.szabo 2019-11-04T22:55:16.167900Z

I've just published a new version of Chlorine, with support for multiple REPLs. There's now a new command, "Connect Socket REPL", that will connect into any REPL and try to discover what is the current environment. Unfortunately... sometimes Clojure doesn't connect with this command (I kept the old "Connect Clojure Socket REPL", so things still work with Clojure). I'm investigating why 😐

πŸ‘ 2
2019-11-04T23:37:36.174100Z

i was able to connect and use the new connect socket repl command successfully :thumbsup: one thing i noticed was a possible difficulty with :refer-clojure :exclude -- or may be i'm just doing something wrong πŸ™‚ as an example, consider clj-kondo's source: * start a socket repl for clj-kondo β€’ open folder... with clj-kondo's source β€’ view src/clj_kondo/core.clj β€’ connect to the appropriate socket repl by: Chlorine: Connect Socket Repl β€’ load the file with: Chlorine: Load File β€’ navigate down to near the bottom of the editor tab for core.clj, inside the (comment ...) β€’ select the form:

(def res (run!
            {;; seq of string or file
             :files ["corpus" (io/file "test")]
             :config {:linters {:invalid-arity {:level :off}}}
             ;; :cache takes a string, file or boolean
             :cache (io/file "/tmp/clj-kondo-cache")
             ;; only relevant when linting stdin
             :lang :clj}))
β€’ evaluate the selection with: Chlorine: Evaluate Selection β€’ this gives me:
clojure.lang.ArityException: "Wrong number of args (1) passed to: clojure.core/run!"
in clojure.lang.AFn.throwArity (AFn.java:429)
in clojure.lang.AFn.invoke (AFn.java:32)
in clojure.lang.AFn.applyToHelper (AFn.java:154)
in clojure.lang.AFn.applyTo (AFn.java:144)
in clojure.lang.Compiler$InvokeExpr.eval (Compiler.java:3702)
in clojure.lang.Compiler$DefExpr.eval (Compiler.java:457)
in clojure.lang.Compiler.eval (Compiler.java:7182)
in
...

mauricio.szabo 2019-11-04T23:41:58.175Z

Does this issue happens if you use the old way to connect to REPL?

mauricio.szabo 2019-11-04T23:42:35.175800Z

(also, I just published the 0.3.1 version which fixes the issue with the connection to Clojure)

2019-11-04T23:45:51.176600Z

will try with the old way i just pulled again and am builiding -- should i try the official release instead?

2019-11-04T23:48:39.177300Z

with the old method of connection, i get "Can't load file for this kind of REPL" for "Chlorine: Load File"

2019-11-04T23:51:39.178100Z

i'm trying with the official release now

2019-11-04T23:51:49.178700Z

for load file i get: "WARNING: run! already refers to: #'clojure.core/run! in namespace: clj-kondo.core, being replaced by: #'clj-kondo.core/run!"

mauricio.szabo 2019-11-04T23:52:16.179300Z

Please, can you try with the old release (0.2.2)?

mauricio.szabo 2019-11-04T23:52:48.180400Z

(seriously, Atom could have a "beta channel" for packages, it would help a lot!)

2019-11-04T23:56:32.181100Z

ok, i did apm install chlorine@0.2.2 and now loading via the old method works and eval selection gives the same error

mauricio.szabo 2019-11-04T23:57:56.181900Z

Okay, sΓ³ at least the error is consistent πŸ˜„

mauricio.szabo 2019-11-04T23:58:24.182700Z

I'll fix the load file on the old code, and publish a new version

πŸ‘ 1