Fork me on GitHub

@alexmiller I should probably make a minimal case to see if this occurs in Clojure - but what I observed in the tests is that record data literals only work when launched through REPL not via some user -main


like[1 2] specifically


through clojure -m this fails - but if I use -i and -e to run my entrypoint it works

Alex Miller (Clojure team)14:07:43

can you share a repro - seems to work for me


yes, give me a bit I'll try to put something together

Alex Miller (Clojure team)14:07:41

when it fails, what do you get?


could not load namespace - oh but one second - the error does come from tools reader


is this right?


what happens is that if I run via -main this line fails, but if I run via REPL it succeeds

Alex Miller (Clojure team)14:07:53

which is specifically targeted at auto-loading the namespace for a record on import. really designed for java interop use but seems in the ballpark here


well the observed issue isn't about the namespace being loaded


the namespace is loaded - but the class lookup part fails

Alex Miller (Clojure team)15:07:19

repl inserts a DCL layer, but I think clojure.main -m does not

Alex Miller (Clojure team)15:07:24

so could be classloader


in the end not a big deal since it's possible to work around - but it was a head scratcher - but thought maybe you had more insight


well can confirm I don't see this behavior with Clojure by itself