-
-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't use Clojure 1.12 add-lib
when cider-enrich-classpath
set to t
#3651
Comments
Note, Borkdude's deps.add-lib works when |
Thanks for the report! It's a fairly baffling one since Enrich doesn't particularly add or modify Maven stuff. It doesn't add/run code either in your repl JVM. It does all its work before the JVM is launched. It generates an 'enriched' classpath and then it's done. Sadly, "Failed to read artifact descriptor for" is an uninformative error message, so you'd have to figure out the real cause. I'd suggest:
Cheers - V |
I guess there are more problems than that. For instance, at work I regularly experience problems with downloading missing libraries through a proxy if I jack-in and some libraries are not present in the So I guess maybe the problem lies with how the |
It sounds like Enrich could observe some env vars for proxy stuff, feel free to ellaborate in https://github.com/clojure-emacs/enrich-classpath/issues (Very commonly apps do that - AFAIK, we cannot guess if we need a proxy / which) |
I don't think it's located anywhere yet, as add-libs tries to download it, and fails to find the artifact. Maybe I'm wrong. Can you elaborate a bit on the steps? I'm a bit lost with this maven stuff. |
Hmm, if this stuff isn't too familiar it will probably be quicker if I give it a go. Please report the proxy issue first, let's get it fixed and see if this one persists. In the meantime you can disable Enrich (globally or in .dir-locals.el) |
I went down this rabbit hole and I think the problem is related to how the clojure.sh script calls the clojure command who ends up calling Here are the differences between how the Clojure script calls
I think the problem is the enrich system is not providing dependencies information to the clojure command since it is going to calculate the classpath itself, but this ends up in the .basis file being written with nil, which then breaks other tools.deps systems. Also the config user folder looks empty. |
Thanks much for the digging into the 🌀🐇! In Alex words:
Looks like Enrich could do some explicit effort at writing a valid .basis file (probably using the tools.deps API) and passing it as a System property (since I've observed that's what the Clojure CLI commonly does?) Might be an easy addition. The |
Expected behavior
Actual behavior
Steps to reproduce the problem
Given this
deps.end
:(setq cider-enrich-classpath t)
(add-lib 'cheshire/cheshire {:mvn/version "5.13.0"})
To reproduce the successful behavior:
(setq cider-enrich-classpath nil)
or run plain REPL withclojure
(add-lib 'cheshire/cheshire {:mvn/version "5.13.0"})
Environment & Version information
CIDER version information
Lein / Clojure CLI version
Leiningen 2.10.0 on Java 17.0.9 OpenJDK 64-Bit Server VM
Emacs version
GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.17.8) of 2024-04-29
Operating system
Fedora Linux 39.20240421.0 (Silverblue)
JDK distribution
openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment (Red_Hat-17.0.9.0.9-4) (build 17.0.9+9)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.9.0.9-4) (build 17.0.9+9, mixed mode, sharing)
The text was updated successfully, but these errors were encountered: