Question
How to safely upgrade and roll back a Clojure dependency?
Kavi Dey
0 reputation · 21 Apr 2020, 09:39 UTC
23.2K views0
To upgrade a Clojure library safely, follow these steps:
- Check the current version in
deps.edn(orproject.cljif you use Leiningen). - Update the version string to the newest release you want to test.
- Run the project’s test suite and any manual verification steps (e.g., start the REPL, exercise core functions).
- If tests pass, commit the change; if they fail, revert the version change to the previous value.
- To roll back, simply restore the original version string and re‑run the tests to confirm the prior state works.
Verification can include checking that the classpath resolves correctly (clj -Spath) and that the application starts without errors.