Fork me on GitHub
#tools-build
<
2023-03-06
>
jjttjj20:03:55

Is there anything obvious this error indicates when building an uberjar?

RuntimeException No dispatch macro for: ?
	clojure.lang.Util.runtimeException (Util.java:221)
	clojure.lang.EdnReader$DispatchReader.invoke (EdnReader.java:552)
	clojure.lang.EdnReader.readDelimitedList (EdnReader.java:757)
	clojure.lang.EdnReader$MapReader.invoke (EdnReader.java:680)
	clojure.lang.EdnReader.read (EdnReader.java:145)
	clojure.lang.EdnReader.read (EdnReader.java:111)
	clojure.lang.EdnReader.readString (EdnReader.java:67)
	clojure.edn/read-string (edn.clj:46)
	clojure.edn/read-string (edn.clj:37)
	clojure.edn/read-string (edn.clj:37)
	clojure.tools.build.tasks.uber/conflict-data-readers (uber.clj:89)
	clojure.tools.build.tasks.uber/conflict-data-readers (uber.clj:86)
It seems related to my inclusion of a dependency on https://github.com/juxt/tick Is there a way to figure out which form is causing this when it's read?

seancorfield20:03:07

It sounds like a data_readers file in one of your dependencies contains a reader conditional for clj/s support -- and it can't be read as EDN.

jjttjj21:03:13

Ah, that explains it, thanks!

dominicm13:03:16

Data readers can include reader conditionals now iirc

dominicm13:03:23

Cljs will read the cljs branch of this file

jjttjj16:03:40

Yeah I saw that. I've now found that adding:

:conflict-handlers {"^data_readers.clj[cs]?$" :warn} 
in my call to build/uber seemed to "fix" this for my situation. When I do that I don't get a warning for any data-readers conflicts, and the necessary data_readers.cljc ends up in the jar. Might be relevant that I'm using a :bb reader conditional, that doesn't immediately seem like the problem though. I'll see if I can get a minimal repro at some point.

seancorfield19:03:33

@U064X3EF3 Seems like a bug that uber tries to merge data_readers.cljc files without supporting reader conditionals?

jjttjj19:03:17

Thanks for that @U04V70XH6

seancorfield18:03:53

@U064UGEUQ According to follow-up on that issue, it should be fixed in tools.build 0.8.3 onward -- what version are you using?

jjttjj19:03:51

Using 9.3 so it shouldn't be that. Will get a minimal repro done today