Fork me on GitHub
#chlorine
<
2020-02-15
>
seancorfield01:02:51

Just tripped over a change of behavior that I hope is unintentional:

(comment
  (def seo (component/start (build-system 9310 :http-kit)))
  (clojure.core.cache.wrapped/seed (-> seo :application :caches :i18n) {})
  (component/stop seo))
On 0.4.2? 0.4.3, if your cursor was right before the ( on each of those three lines, Evaluate Block would evaluate the expression that followed; as of 0.4.5 it evaluates the comment block instead (and returns nil)

seancorfield01:02:29

The REPL connection also seems really unstable in this latest version. I keep hitting errors inside unrepl code, weird nil pointers, and it seems to even be corrupting my main REPL at the command-line.

seancorfield01:02:23

I'm going to turn off the Experimental Features and see if it's better...

seancorfield01:02:58

OK, with Experimental Features turned off, it seems to be more stable -- a sequence of commands that blew something in unrepl worked just fine this time.

seancorfield01:02:15

So what am I missing with EF turned off? (just Clojure -- I don't do cljs)

mauricio.szabo01:02:37

There were some instability issues with the block detection. I think I was able to find a way to keep the old behavior.

mauricio.szabo01:02:14

@seancorfield, did you upgrade your Clojure version? These last 3 versions did nothing (or almost nothing) on Clojure side...

mauricio.szabo01:02:33

I'll do a diff here on code between versions to see if there's something wrong...

mauricio.szabo01:02:22

(also, since 0.4.0, there's nothing on Clojure side in experimental features...)

seancorfield01:02:33

Nothing's changed on my side. This is the same work setup I've been using for ages.

mauricio.szabo01:02:15

That's really strange. Do you have any examples on these unrepl errors?

seancorfield01:02:17

If I see the weird behavior again, I'll try to repro more carefully (and I'll keep EF off for now -- good to know nothing there affects Clojure).

seancorfield01:02:51

Execution error (IllegalStateException) at unrepl.core/non-eliding-write (REPL:31).
Attempting to call unbound fn: #'unrepl.core/write
user=> (pst)
IllegalStateException Attempting to call unbound fn: #'unrepl.core/write
	clojure.lang.Var$Unbound.throwArity (Var.java:45)
	unrepl.core/non-eliding-write (NO_SOURCE_FILE:31)
	unrepl.core/non-eliding-write (NO_SOURCE_FILE:27)
	unrepl.repl/3rcwMcc9rCLOH4gMQfLo21mMbCs/tagging-writer/fn--13607 (NO_SOURCE_FILE:503)
	unrepl.repl/3rcwMcc9rCLOH4gMQfLo21mMbCs/tagging-writer/fn--13603 (NO_SOURCE_FILE:498)
	unrepl.repl$3rcwMcc9rCLOH4gMQfLo21mMbCs.proxy$.Writer$ff19274a.write (:-1)
	.BufferedWriter.flushBuffer (BufferedWriter.java:120)
	.BufferedWriter.flush (BufferedWriter.java:256)
	clojure.core/flush (core.clj:3711)
	clojure.core/prn (core.clj:3721)
	clojure.core/prn (core.clj:3714)
	clojure.core/apply (core.clj:665)

seancorfield01:02:18

That was in my regular REPL after eval'ing some code via Chlorine into a Socket REPL started from that regular REPL.

mauricio.szabo01:02:03

I'll see if there's any change on the UNREPL repository, some fix or new version. In the meantime I'll try to debug here

mauricio.szabo02:02:27

I asked about Clojure version because I saw some strange behavior of the REPL on Clojure 1.10.1 (some functions disappearing from clojure.core namespace) but I wasn't able to reproduce most of the time...

mauricio.szabo02:02:52

Also, I just remembered that I changed the version of unrepl blob, I'll check if it can be an issue...

mauricio.szabo02:02:52

@seancorfield just one last question - these nil pointers are errors while evaluating Clojure core, or issues like you evaluate something and it just returns nil and not the result of the code?

seancorfield02:02:17

I evaluated something that should return non-`nil` (and normally was doing so) and instead it displayed nil in red followed by an exception from somewhere inside the unrepl code -- that was inline in Atom (the above was in the command-line REPL).

seancorfield02:02:50

As for Clojure 1.10.1, I've been using that ever since it appeared, with no issues until recently...

mauricio.szabo18:02:23

Ok, I'll look at it too :). I'll also see if I can get a version that doesn't use UNREPL (it will ease support for CLR and some other clojure flavors) so there are less "moving parts" that can fail

seancorfield19:02:19

I would love a version that doesn't need to inject unrepl into my running process!