Tools.deps test runner warnings

Edit: figured it out, I had an old core.async. Updating that dependency fixed things. Clue was the mention of core.async in the linked Slack thread. (Tried to delete this post about five minutes after making it but I guess that got rolled back. )

Old post:

I am trying to replace lein with clj/tools.deps in my projects and am stumbling on the test runner. The guide suggests the Cognitect Labs test runner.

But when executing my tests with clj -X:tests the runner spews this before successfully running my tests:

WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/update-vals
WARNING: update-keys already refers to: #'clojure.core/update-keys in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/update-keys
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer, being replaced by: #'clojure.tools.analyzer.utils/update-vals
WARNING: update-keys already refers to: #'clojure.core/update-keys in namespace: clojure.tools.analyzer, being replaced by: #'clojure.tools.analyzer.utils/update-keys
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer.passes, being replaced by: #'clojure.tools.analyzer.utils/update-vals
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer.passes.uniquify, being replaced by: #'clojure.tools.analyzer.utils/update-vals

I find this distracting.

When I google the errors I find this was reported a little over a year ago (in Slack, at least). Is this the same error? Is there anything I can do to avoid these warnings? Other than go back to lein? :slight_smile:

In case it matters clj --version returns Clojure CLI version 1.11.1.1165. Test runner is specifically io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}}.

It’s ugly yes but not an error.

clojure 1.11 added update-vals and update-keys which prints out a warning when other libraries defining these functions overwrite it. The libraries in question need to be updated with:

:refer clojure :exclude [... update-vars update-keys]

the warnings will be suppressed then. You can try going back to 1.10 and the notices will go away then.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.