Add java.classpath missing dependency #3
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Add missing
org.clojure/java.classpathdependencyProblem
When using metrepl as an nREPL middleware in projects without
org.clojure/java.classpathon the classpath, the REPL fails to start with:When attempting to require metrepl manually:
Root Cause
metrepl.metricsnamespace requiresclojure.java.classpath:However,
org.clojure/java.classpathis not declared as a dependency indeps.edn. This works in many projects because they transitively pull injava.classpaththrough other dependencies, but fails in minimal projects (like new Leiningen projects with onlyorg.clojure/clojureas a dependency).Solution
Add
org.clojure/java.classpathas an explicit dependency indeps.edn.Testing
Verified the fix resolves the issue in a minimal Leiningen project that previously failed to start the REPL with metrepl middleware enabled.