Fork me on GitHub
#duct
<
2020-10-20
>
aeskilson17:10:35

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.

Jivago Alves17:10:08

@U0NT3T5G9 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.

aeskilson17:10:02

Thanks, @UHQ12T97F, I double-checked that too. @UG9U7TPDZ’s hunch was right.

aeskilson17:10:22

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.

Kevin17:10:19

Which key is failing? When creating an uberjar duct will run any keys (and dependencies of) :duct/compiler

Kevin17:10:40

If one of those keys is calling #duct/env, it will fail

👍 3
aeskilson17:10:41

I think that's it exactly.

aeskilson17:10:11

I have a custom key that I think I've erroneously derived from :duct/compiler.

aeskilson17:10:26

And it's dependent on a key that's failing.

Kevin17:10:43

That sounds about right