Fork me on GitHub
#leiningen
<
2022-08-30
>
Alastair Hole13:08:16

I have been using :target-path "target/%s" and building an uberjar, it was until recently writing to target/uberjar/<uberjarn-name>.jar. Due to what I assume is an updated version of lein via the clojure:latest Docker container, it is now writing to target/default+uberjar/<uberjarn-name>.jar. Is this due to a recent change in lein? Is there any recommended way of ensuring that this path is stable/predictable? At least I will pin to a specific clojure/lein container version to try to avoid changes in future. Thanks all 🙂 Profile is as follows:

:profiles {:uberjar {:aot :all
                       :uberjar-name "<uberjar-name>.jar"
                       :jvm-opts ["-Dclojure.compiler.direct-linking=true"]}})

vemv13:08:43

probably that Lein change is a) and improvement (now it seems more accurate to me) and b) a once-every-5-years change probably I'd recommend no action. You can check out the CHANGELOG or commit history to ensure that the new behavior is in fact intended and pinning versions in CI pipelines is always a good idea :)

Alastair Hole13:08:04

But yes, the moral of the story for me is to pin versions in CI 🙂

Alastair Hole13:08:04

There must be some law of problem solving that dictates that one immediately finds some enlightening information only after one has given in and asked around :D

duckie 2
mikerod14:08:25

Yeah I also wouldn't expect the default profile to be part of an uberjar build. So that was suspect

Alastair Hole15:08:59

FYI pinning to clojure:lein-2.9.8-alpine avoids the issue so presumably it is a bug introduced in 2.9.9/2.9.10

mikerod01:08:16

Indeed it's a new issue