duct

2020-10-20T17:34:35.032200Z

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.

2020-10-20T17:36:22.033400Z

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.

kwrooijen 2020-10-20T17:37:19.033900Z

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

kwrooijen 2020-10-20T17:37:40.034600Z

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

đź‘Ť 1
2020-10-20T17:53:41.034900Z

I think that's it exactly.

2020-10-20T17:54:11.035500Z

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

2020-10-20T17:54:26.035800Z

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

Jivago Alves 2020-10-20T17:56:08.035900Z

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

2020-10-20T17:57:02.036100Z

Thanks, @jivagoalves, I double-checked that too. @kevin.van.rooijen’s hunch was right.

kwrooijen 2020-10-20T17:57:43.036400Z

That sounds about right