This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-24
Channels
- # announcements (1)
- # asami (10)
- # aws (1)
- # babashka (1)
- # beginners (105)
- # cider (13)
- # cljsrn (6)
- # clojure (42)
- # clojure-australia (4)
- # clojure-dev (7)
- # clojure-europe (26)
- # clojure-nl (2)
- # clojure-uk (13)
- # clojurescript (19)
- # code-reviews (3)
- # conjure (18)
- # core-async (4)
- # core-matrix (5)
- # cryogen (3)
- # datomic (27)
- # depstar (21)
- # emacs (2)
- # figwheel-main (9)
- # fulcro (18)
- # helix (7)
- # jobs (3)
- # jobs-discuss (15)
- # juxt (7)
- # kaocha (4)
- # lambdaisland (2)
- # leiningen (11)
- # luminus (1)
- # malli (6)
- # meander (9)
- # minimallist (4)
- # mount (3)
- # off-topic (3)
- # pathom (8)
- # pedestal (28)
- # rdf (13)
- # re-frame (7)
- # reagent (5)
- # shadow-cljs (3)
I already use depstar to generate an uberjar for an application. I would like to aot the uberjar and added the :aot true
and :main-class project.core
but got an error:
Syntax error macroexpanding at (type.cljc:1:1).
Caused by: Can't embed object in code, maybe print-dup not defined: clojure.lang.MultiFn@54a98358
@mynomoto That sounds like a syntax error in your code.
What is that type.cljc
file?
The only other noticeable thing is that we add some cheshire encoders for some classes on this namespace.
Comment the encoders makes no difference. Loading the file over a repl causes no errors.
i.e., manually make an empty classes
folder in your project, and then in a REPL run (compile 'project.core)
user=> (compile 'project-x.core)
Execution error at project-core.schema.type/loading (type.cljc:1).
Can't embed object in code, maybe print-dup not defined: clojure.lang.MultiFn@3705a85c
That means the problem is in your code, most likely some sort of syntax error (and nothing to do with depstar
). So you'll have to start commenting out parts of that file to figure out where the error is.
If it's up on GitHub where we can take a look at it, we'll probably be able to pinpoint the problem faster.
It's a big private repository. I will follow your recommendation of commenting code until narrowing it, thanks. I suspected that it was not related to depstar but there is #aot 😉 Thanks!
Compiling each namespace is a good way to check for syntax errors if your editor isn't running a linter 🙂
After 2 namespaces of indirection and one rabbit hole I found the problem on one of our macros that is a def that keeps the metadata of the original var. Compiling each suspect namespace helped a lot. The jar is not working but this is another problem. Thanks!
Thanks for reporting back @mynomoto!