This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-01
Channels
- # atom-editor (11)
- # babashka (25)
- # beginners (142)
- # boot (9)
- # calva (3)
- # cider (19)
- # clara (15)
- # clj-kondo (6)
- # cljs-dev (20)
- # clojars (11)
- # clojure (164)
- # clojure-dev (9)
- # clojure-europe (6)
- # clojure-italy (17)
- # clojure-nl (3)
- # clojure-spec (19)
- # clojure-sweden (10)
- # clojure-uk (23)
- # clojurescript (34)
- # code-reviews (31)
- # conjure (20)
- # cursive (14)
- # datomic (54)
- # emacs (1)
- # fulcro (51)
- # graalvm (24)
- # graphql (6)
- # helix (3)
- # jobs (3)
- # kaocha (1)
- # malli (2)
- # meander (15)
- # off-topic (81)
- # pathom (2)
- # re-frame (43)
- # reagent (26)
- # reitit (1)
- # releases (1)
- # sci (12)
- # shadow-cljs (29)
- # sql (22)
- # timbre (3)
- # tools-deps (15)
@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 #user.r[1]
?
through clojure -m foo.bar
this fails - but if I use -i
and -e
to run my entrypoint it works
can you share a repro - seems to work for me
when it fails, what do you get?
@alexmiller https://github.com/clojure/tools.reader/blob/master/src/main/clojure/clojure/tools/reader.clj#L818 here
what happens is that if I run via -main
this line fails, but if I run via REPL it succeeds
you might also look at http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/defrecord option :load-ns
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
repl inserts a DCL layer, but I think clojure.main -m does not
so could be classloader