Skip to content
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

cider-jack-in fails when using asdf (a runtime version manager) and cider-enrich-classpath is set to t #3507

Closed
tucho opened this issue Oct 9, 2023 · 3 comments

Comments

@tucho
Copy link
Contributor

tucho commented Oct 9, 2023

Expected behavior

When:

  1. we set the local clojure version (using asdf);
  2. we do not set any global clojure version (again, using asdf);
  3. we call cider-jack-in on a clojure project;

the REPL should be started.

Actual behavior

The REPL is not started and the we get the following messages:

[nREPL] Starting server via bash /home/marcel/.config/emacs/elpa/cider-20231006.659/clojure.sh /home/marcel/.asdf/shims/clojure -Sdeps \{\:deps\ \{nrepl/nrepl\ \{\:mvn/version\ \"1.0.0\"\}\ cider/cider-nrepl\ \{\:mvn/version\ \"0.39.0\"\}\ refactor-nrepl/refactor-nrepl\ \{\:mvn/version\ \"3.9.0\"\}\}\ \:aliases\ \{\:cider/nrepl\ \{\:main-opts\ \[\"-m\"\ \"nrepl.cmdline\"\ \"--middleware\"\ \"\[refactor-nrepl.middleware/wrap-refactor\,cider.nrepl/cider-middleware\]\"\]\}\}\} -M:cider/nrepl
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server:  ("exited abnormally with code 126")
error in process sentinel: Could not start nREPL server:  ("exited abnormally with code 126")

Steps to reproduce the problem

  1. Install and configure asdf (see https://asdf-vm.com/).
  2. Create a folder for a project.
  3. Create an empty deps.edn file into this folder.
  4. Set the local clojure version to any version available. This will create a .tool-versions file into the project folder.
  5. Make sure that there is no global clojure version set, i.e., that there is no .tool-versions file into your home folder or if there is one, that there is not a clojure versions declared in it.
  6. Try to launch a REPL (cider-jack-in) for this project.

Environment & Version information

CIDER version information

;; CIDER 1.8.0-snapshot (package: 20231009.1715), nREPL 1.0.0
;; Clojure 1.11.1, Java 17.0.8.1

Lein / Clojure CLI version

Clojure CLI version 1.11.1.1413

Emacs version

GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8)

Operating system

Arch Linux

JDK distribution

openjdk version "20.0.2" 2023-07-18
OpenJDK Runtime Environment Temurin-20.0.2+9 (build 20.0.2+9)
OpenJDK 64-Bit Server VM Temurin-20.0.2+9 (build 20.0.2+9, mixed mode, sharing)

@tucho
Copy link
Contributor Author

tucho commented Oct 9, 2023

I already have a solution for this bug. I am opening a pull request right now.

@vemv
Copy link
Member

vemv commented Oct 9, 2023

Happy you got it! Sounds like an interesting bug

tucho added a commit to tucho/cider that referenced this issue Oct 9, 2023
@tucho
Copy link
Contributor Author

tucho commented Oct 9, 2023

Glad to contribute. :)

vemv added a commit to zenmacs/cider that referenced this issue Oct 9, 2023
@vemv vemv closed this as completed in 838af89 Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants