This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-01
Channels
- # announcements (11)
- # babashka (71)
- # beginners (34)
- # calva (25)
- # chlorine-clover (38)
- # cider (13)
- # clj-kondo (1)
- # cljsrn (2)
- # clojure (40)
- # clojure-australia (4)
- # clojure-europe (16)
- # clojure-france (3)
- # clojure-nl (4)
- # clojure-uk (16)
- # clojurescript (27)
- # conjure (2)
- # core-async (41)
- # core-logic (3)
- # cursive (1)
- # data-science (1)
- # datomic (16)
- # depstar (19)
- # emacs (7)
- # fulcro (33)
- # graalvm (4)
- # honeysql (20)
- # hugsql (4)
- # jobs (1)
- # juxt (4)
- # off-topic (48)
- # pathom (41)
- # reagent (9)
- # reitit (19)
- # remote-jobs (1)
- # shadow-cljs (20)
- # startup-in-a-month (2)
- # tools-deps (29)
- # vim (3)
- # xtdb (30)
Heya, I'm new to depstar. I'm trying to make an uberjar for a project that uses malli. To allow use of a custom registry in malli I need to set the following jvm opts ["-Dmalli.registry/type=custom"]
. Where should this go when building an uberjar with depstar?
:uberjar {:replace-deps {seancorfield/depstar {:mvn/version "2.0.171"}}
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]
:exec-fn hf.depstar/uberjar
:exec-args {:jar foo.jar
:group-id foo
:artifact-id bar
:version "0.0.0"
:main-class foo.bar.main
:aot true
:sync-pom true}}}
ah interesting, that's what I have
this is how it failed:
[main] INFO hf.depstar.uberjar - Compiling sqa.main ...
Execution error (ExceptionInfo) at malli.registry/set-default-registry! (registry.cljc:30).
can't set default registry
Full report at:
/var/folders/38/bhb_3y9d70dd6vzvnf9tdbm80000gn/T/clojure-7407818078122203090.edn
[main] ERROR hf.depstar.uberjar - Compilation of sqa.main failed!
[main] ERROR hf.depstar.uberjar - AOT FAILED
where set-default-registry!
is the command that requires the system property set
yeah the jvm opt works fine normally
{:clojure.main/message
"Execution error (ExceptionInfo) at malli.registry/set-default-registry! (registry.cljc:30).\ncan't set default registry\n",
:clojure.main/triage
{:clojure.error/class clojure.lang.ExceptionInfo,
:clojure.error/line 30,
:clojure.error/cause "can't set default registry",
:clojure.error/symbol malli.registry/set-default-registry!,
:clojure.error/source "registry.cljc",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type clojure.lang.Compiler$CompilerException,
:message "Syntax error macroexpanding at (schema.clj:35:1).",
:data
{:clojure.error/phase :execution,
:clojure.error/line 35,
:clojure.error/column 1,
:clojure.error/source "schema.clj"},
:at [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3707]}
{:type clojure.lang.ExceptionInfo,
:message "can't set default registry",
:data {:type "default"},
:at
[malli.registry$set_default_registry_BANG_
invokeStatic
"registry.cljc"
30]}],
:trace
[[malli.registry$set_default_registry_BANG_
invokeStatic
"registry.cljc"
30]
[malli.registry$set_default_registry_BANG_
invoke
"registry.cljc"
27]
[sqa.schema$init_schema_registries invokeStatic "schema.clj" 31]
[sqa.schema$init_schema_registries invoke "schema.clj" 28]
[clojure.lang.AFn applyToHelper "AFn.java" 152]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3702]
[clojure.lang.Compiler compile1 "Compiler.java" 7731]
[clojure.lang.Compiler compile "Compiler.java" 7798]
[clojure.lang.RT compile "RT.java" 411]
[clojure.lang.RT load "RT.java" 457]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6839 invoke "core.clj" 6126]
[clojure.core$load invokeStatic "core.clj" 6125]
[clojure.core$load doInvoke "core.clj" 6109]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5908]
[clojure.core$load_one invoke "core.clj" 5903]
[clojure.core$load_lib$fn__6780 invoke "core.clj" 5948]
[clojure.core$load_lib invokeStatic "core.clj" 5947]
[clojure.core$load_lib doInvoke "core.clj" 5928]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$load_libs invokeStatic "core.clj" 5985]
[clojure.core$load_libs doInvoke "core.clj" 5969]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$require invokeStatic "core.clj" 6007]
[clojure.core$require doInvoke "core.clj" 6007]
[clojure.lang.RestFn invoke "RestFn.java" 3204]
[sqa.leo$loading__6721__auto____31503 invoke "leo.clj" 1]
[clojure.lang.AFn applyToHelper "AFn.java" 152]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3702]
[clojure.lang.Compiler compile1 "Compiler.java" 7731]
[clojure.lang.Compiler compile1 "Compiler.java" 7721]
[clojure.lang.Compiler compile "Compiler.java" 7798]
[clojure.lang.RT compile "RT.java" 411]
[clojure.lang.RT load "RT.java" 457]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6839 invoke "core.clj" 6126]
[clojure.core$load invokeStatic "core.clj" 6125]
[clojure.core$load doInvoke "core.clj" 6109]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5908]
[clojure.core$load_one invoke "core.clj" 5903]
[clojure.core$load_lib$fn__6780 invoke "core.clj" 5948]
[clojure.core$load_lib invokeStatic "core.clj" 5947]
[clojure.core$load_lib doInvoke "core.clj" 5928]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$load_libs invokeStatic "core.clj" 5985]
[clojure.core$load_libs doInvoke "core.clj" 5969]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$require invokeStatic "core.clj" 6007]
[clojure.core$require doInvoke "core.clj" 6007]
[clojure.lang.RestFn invoke "RestFn.java" 619]
[sqa.user$loading__6721__auto____31501 invoke "user.clj" 1]
[clojure.lang.AFn applyToHelper "AFn.java" 152]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3702]
[clojure.lang.Compiler compile1 "Compiler.java" 7731]
[clojure.lang.Compiler compile1 "Compiler.java" 7721]
[clojure.lang.Compiler compile "Compiler.java" 7798]
[clojure.lang.RT compile "RT.java" 411]
[clojure.lang.RT load "RT.java" 457]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6839 invoke "core.clj" 6126]
[clojure.core$load invokeStatic "core.clj" 6125]
[clojure.core$load doInvoke "core.clj" 6109]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5908]
[clojure.core$load_one invoke "core.clj" 5903]
[clojure.core$load_lib$fn__6780 invoke "core.clj" 5948]
[clojure.core$load_lib invokeStatic "core.clj" 5947]
[clojure.core$load_lib doInvoke "core.clj" 5928]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$load_libs invokeStatic "core.clj" 5985]
[clojure.core$load_libs doInvoke "core.clj" 5969]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$require invokeStatic "core.clj" 6007]
[clojure.core$require doInvoke "core.clj" 6007]
[clojure.lang.RestFn invoke "RestFn.java" 3894]
[sqa.bl$loading__6721__auto____15102 invoke "bl.clj" 1]
[clojure.lang.AFn applyToHelper "AFn.java" 152]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3702]
[clojure.lang.Compiler compile1 "Compiler.java" 7731]
[clojure.lang.Compiler compile1 "Compiler.java" 7721]
[clojure.lang.Compiler compile "Compiler.java" 7798]
[clojure.lang.RT compile "RT.java" 411]
[clojure.lang.RT load "RT.java" 457]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6839 invoke "core.clj" 6126]
[clojure.core$load invokeStatic "core.clj" 6125]
[clojure.core$load doInvoke "core.clj" 6109]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5908]
[clojure.core$load_one invoke "core.clj" 5903]
[clojure.core$load_lib$fn__6780 invoke "core.clj" 5948]
[clojure.core$load_lib invokeStatic "core.clj" 5947]
[clojure.core$load_lib doInvoke "core.clj" 5928]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$load_libs invokeStatic "core.clj" 5985]
[clojure.core$load_libs doInvoke "core.clj" 5969]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$require invokeStatic "core.clj" 6007]
[clojure.core$require doInvoke "core.clj" 6007]
[clojure.lang.RestFn invoke "RestFn.java" 3894]
[sqa.api_common$loading__6721__auto____13934
invoke
"api_common.clj"
1]
(sorry it's massive 😄 )
interestingly, tonskys uberdeps seems to work. I do have to pass the jvm opt to the finished jar, but putting the jar together succeeds.
@danieleneal Currently, there's no way to tell depstar
about JVM options for compilation but I plan to address that in the next release: https://github.com/seancorfield/depstar/issues/64
ah, thanks @seancorfield 🙂