Fork me on GitHub
#reveal
<
2023-01-03
>
furiel08:01:23

Hello, is it possible to use reveal with defrecords? Starting reveal with:

clojure -Sdeps '{:deps {vlaaad/reveal {:mvn/version "1.3.276"}}}' -X vlaaad.reveal/remote-prepl :port 7777
Then in the repl, I create a defrecord;
user> (defrecord Test [test])
user.Test
user> (tap> (Test. "test"))
true
results in exception for me:
Error reading eval result (ClassNotFoundException) at jdk.internal.loader.BuiltinClassLoader/loadClass (BuiltinClassLoader.java:581).
user.Test

vlaaad08:01:29

I see that you are using prepl to remote process, I think that's the source of the problem — you have a record definition in remote process, but not in the reveal process. Is it not an option to run reveal in the developed process?

vlaaad09:01:34

Hmm, I think I have a solution for that: use *suppress-read* in prepl reader, i.e.

(binding [*suppress-read* true] ...)

vlaaad12:01:19

I'll release a fix in the near future

furiel12:01:56

Thank you! So in summary, the problem is that I use cider-nrepl, but connect to a separate prepl process. So the definitions that are loaded in one of them, are not available in the other.

furiel12:01:34

Unfortunately, the project I am working with uses java8, that’s why I connect remotely.

vlaaad12:01:35

Yes, and usually it's solved by providing a default tagged literal parser, which reveal does, but when the tagged literal tag contains dots, clojure reader uses different code path that does not use tagged literals at all because it assumes records exist and can be loaded

👍 2
vlaaad19:01:07

Try reveal 1.3.277

vlaaad19:01:23

I released a fix now

furiel09:01:43

Thank you! It works perfectly!

vlaaad09:01:05

My pleasure!