Fork me on GitHub
#polylith
<
2024-05-22
>
Patrix12:05:09

I was enjoying the poly libs :update recently, however there’s ONE lib that I need to keep at a specific version due to some bug in the newer version that I’m not willing to spend time looking into yet, clojurewerkz/money. So I excluded that lib from being auto-updated and that worked until recently, with the 0.2.19 release… I might have missed change in how workspace.edn should be setup? Details in thread…

Patrix12:05:39

Relevant part of workspace.edn:

{...
 :bricks {"premiums" {:keep-lib-versions [clojurewerkz/money]}}
 ...
 }
deps.edn with poly alias:
...
:poly {:main-opts ["-m" "polylith.clj.core.poly-cli.core"]
                   :extra-deps {polylith/clj-poly {:mvn/version "0.2.19"}}}
...
result of running clojure -M:poly libs :update
$ clojure -M:poly libs :update
  Updated clojurewerkz/money to 1.11.0 in premiums.
  Updated nrepl/nrepl to 1.1.2 in remote-access.

tengstrand19:05:42

I could reproduce the problem. Thanks for reporting this. I have created https://github.com/polyfy/polylith/issues/465.

1
tengstrand06:05:35

I have fixed this in the latest 0.2.20-SNAPSHOT #19 version @U02A14893LH. A workaround is to specify the libraries as strings if you want to use an older version of the poly tool, e.g.:

{...
:bricks {"premiums" {:keep-lib-versions ["clojurewerkz/money"]}}
 ...
 }
Both strings and symbols are supported in 0.2.20 (that is not yet released).

Patrix06:05:17

Hmm.. I tried making it a string with 0.2.19, and still the lib got updated. Then I tried to update my deps.edn’s :poly alias to “0.2.20-SNAPSHOT”, and neither string nor symbol managed to stop the lib from being updated.

tengstrand06:05:23

Strange. If you type poly version does it say #19 ?

tengstrand06:05:00

If you execute e.g. ws get:projects:service:keep-lib-versions (where you replace "service" with your project, what do you get? @U02A14893LH

Patrix06:05:43

$ clojure -M:poly
                  _      _ + _   _
#####   _ __  ___| |_  _| |-| |_| |_
#####  | '_ \/ _ \ | || | | |  _| ' \
#####  | .__/\___/_|\_, |_|_|\__|_||_|
       |_|          |__/ poly 0.2.20-SNAPSHOT #19
losspayv3$ libs :update
  Updated clojurewerkz/money to 1.11.0 in premiums.

Patrix06:05:50

$ ws get:projects:selfsignup:keep-lib-versions
nil

$ ws get:projects:admin:keep-lib-versions
nil

tengstrand06:05:04

That means the configuration is not picked up. Could you execute ws get:configs:workspace and send me the result? (you can do it directly to me).

tengstrand03:06:07

I have fixed the problem in 0.2.20-SNAPSHOT #20. The :keep-lib-versions has worked for bases and projects, but never for components, when introduced in the 0.2.19 release, but will be fixed in 0.2.20. Meanwhile you can use the latest snapshot version @U02A14893LH.

Patrix04:06:57

ah, I see! That would explain it… I’ve updated to 0.2.20-SNAPSHOT #20 and it works as expected now. thanks!

tengstrand04:06:54

Perfect!

💯 1