Closed filipesilva closed 3 months ago
@alexander-yakushev Can you take a look at this?
(added the contents of my ~/.clojure/deps.edn
with regards to the initial CIDER sync-deps
btw)
The repro worked for me in CIDER.
Please, try jacking in with -Srepro
. To do that, execute C-u M-x cider-jack-in
and then add -Srepro
after the clojure binary in the command.
Like this?
I still get the same error. I don't understand why the CIDER process would need -Srepro
while the plain clj
one doesn't though.
I see you have nREPL 1.1.2 and cider-nrepl 0.48.0 being injected. Given that you are on the latest MELPA CIDER, it looks like you have those two versions customized through cider-injected-nrepl-version
and cider-injected-middleware-version
. Can you please reset those customizations so that the default latest versions are injected? (that would be 1.3.0 and 0.49.3).
I don't have those customizations. Maybe it was because I was on CIDER 1.15.0-snapshot
? I've tried updating my doom emacs packages now, and I'm at CIDER 1.15.0
.
;; CIDER 1.15.0 (Cogne), nREPL 1.2.0
;; Clojure 1.12.0-rc1, Java 22.0.2
...
;; Startup: bash /Users/filipesilva/.emacs.d/.local/straight/build-29.4/cider/clojure.sh /opt/homebrew/bin/clojure -Srepro -Sdeps \{\:deps\ \{nrepl/nrepl\ \{\:mvn/version\ \"1.2.0\"\}\ cider/cider-nrepl\ \{\:mvn/version\ \"0.49.0\"\}\ refactor-nrepl/refactor-nrepl\ \{\:mvn/version\ \"3.10.0\"\}\}\ \:aliases\ \{\:cider/nrepl\ \{\:main-opts\ \[\"-m\"\ \"nrepl.cmdline\"\ \"--middleware\"\ \"\[refactor-nrepl.middleware/wrap-refactor\,cider.nrepl/cider-middleware\]\"\]\}\}\} -M:cider/nrepl
These seem right according to https://github.com/clojure-emacs/cider/releases/tag/v1.15.0. Still same error though.
You're using enrich-classpath.
I think I heard of this incompatibility somewhere in Clojurians Slack. There isn't any inherent reason for it, would have to allocate some time to investigation.
Feel free to disable it: (setq cider-enrich-classpath nil)
Yeap that was it @vemv! Error is gone now, and the initial sync-deps
did not list everything in ./clojure/deps.edn
either. Thank you!
Expected behavior
Clojure 1.12
add-lib
(andsync-deps
for that matter) works inside CIDER the same way it works insideclj
.Actual behavior
It throws in CIDER when adding the Datomic Peer dep (unsure if it happens with others).
Steps to reproduce the problem
With plain CLJ:
(NB: had to leave the extra newlines because otherwise
cider-pprint-eval-defun-to-comment
will comment out existing forms in the next line, but that's another issue)then in the repl:
This seems to work fine.
But if you connect to CIDER on this project and run the forms inside
src/user.clj
:The output from
sync-deps
is a little bit surprising but not that much, when you think about it some more. I have some of these in~/.clojure/deps.edn
, and I guess some others come from CIDER? Not sure tbh.add-lib
just fails though, and it shouldn't. If I manually add that dep to deps.edn and call(sync-deps)
, I get the same error.The full error is:
Environment & Version information
CIDER version information
Lein / Clojure CLI version
Clojure CLI version 1.11.4.1474
Emacs version
29.4
Operating system
macOS Sonoma 14.6.1
JDK distribution
openjdk version "22.0.2" 2024-07-16