leiningen

Alastair Hole 2022-08-30T13:47:16.261209Z

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"]}})

vemv 2022-08-30T13:51:43.758269Z

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 Hole 2022-08-30T13:54:44.056989Z

Ah apparently unintended https://codeberg.org/leiningen/leiningen/issues/9

👀 1
Alastair Hole 2022-08-30T13:55:04.406829Z

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

Alastair Hole 2022-08-30T13:57:04.645629Z

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

2
2022-08-30T14:21:25.367939Z

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

Alastair Hole 2022-08-30T15:48:59.202009Z

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

2022-08-31T01:56:16.643109Z

Indeed it's a new issue