reveal

furiel 2023-01-03T08:05:23.770539Z

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

furiel 2023-01-04T09:54:43.959609Z

Thank you! It works perfectly!

vlaaad 2023-01-04T09:55:05.047849Z

My pleasure!

vlaaad 2023-01-03T08:55:29.436919Z

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?

vlaaad 2023-01-03T09:12:34.034599Z

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

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

vlaaad 2023-01-03T12:04:19.569459Z

I'll release a fix in the near future

furiel 2023-01-03T12:17:56.250739Z

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.

furiel 2023-01-03T12:18:34.901019Z

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

vlaaad 2023-01-03T12:20:35.236739Z

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

👍 1
vlaaad 2023-01-03T19:16:07.680409Z

Try reveal 1.3.277

vlaaad 2023-01-03T19:16:23.014239Z

I released a fix now