I'm trying to create an uberjar for a duct app, and I've got
:main ^:skip-ato my-app.main
in my project.clj, but when I call lein uberjar
, it seems like it tries to compile/invoke the -main
function, and it fails because certain pieces of #duct/env
configuration haven't been provided yet, causing their init-keys to fail.Do I have to have my environmental configuration available at build-time? That seems unintuitive. Feels like I'm missing something in my project setup to allow an uberjar to be built, but for the environmental configuration to be deferred.
Which key is failing? When creating an uberjar duct will run any keys (and dependencies of) :duct/compiler
If one of those keys is calling #duct/env
, it will fail
I think that's it exactly.
I have a custom key that I think I've erroneously derived from :duct/compiler.
And it's dependent on a key that's failing.
@bdrillard I don’t know if it’s only here in your message but you might have a typo in your code :skip-aot
. Not sure if that’s the cause of the problem though.
Thanks, @jivagoalves, I double-checked that too. @kevin.van.rooijen’s hunch was right.
That sounds about right