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 will not jack-in but can cider-connect #3341

Closed
paulrd opened this issue May 10, 2023 · 8 comments
Closed

Cider will not jack-in but can cider-connect #3341

paulrd opened this issue May 10, 2023 · 8 comments

Comments

@paulrd
Copy link

paulrd commented May 10, 2023

Expected behavior

Should be able to run repl from cider-jack-in without error.

Actual behavior

The command cider-jack-in-clj does not create a repl. Here is the trace:

Starting new CIDER session ...
[nREPL] Starting server via "c:/Users/Paul Dumais/scoop/shims/clojure.exe" -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.30.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Error building classpath. Don't know how to create ISeq from: clojure.lang.Symbol

java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol

	at clojure.lang.RT.seqFrom(RT.java:557)

	at clojure.lang.RT.seq(RT.java:537)

	at clojure.core$seq__5467.invokeStatic(core.clj:139)

	at clojure.core$merge_with$merge2__6033.invoke(core.clj:3083)

	at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:63)

	at clojure.core$reduce1.invokeStatic(core.clj:944)

	at clojure.core$reduce1.invokeStatic(core.clj:936)

	at clojure.core$merge_with.invokeStatic(core.clj:3076)

	at clojure.core$merge_with.doInvoke(core.clj:3068)

	at clojure.lang.RestFn.applyTo(RestFn.java:139)

	at clojure.core$apply.invokeStatic(core.clj:669)

	at clojure.tools.deps$merge_edns.invokeStatic(deps.clj:141)

	at clojure.tools.deps.script.make_classpath2$run_core.invokeStatic(make_classpath2.clj:86)

	at clojure.tools.deps.script.make_classpath2$run.invokeStatic(make_classpath2.clj:153)

	at clojure.tools.deps.script.make_classpath2$_main.invokeStatic(make_classpath2.clj:203)

	at clojure.tools.deps.script.make_classpath2$_main.doInvoke(make_classpath2.clj:174)

	at clojure.lang.RestFn.applyTo(RestFn.java:137)

	at clojure.lang.Var.applyTo(Var.java:705)

	at clojure.core$apply.invokeStatic(core.clj:667)

	at clojure.main$main_opt.invokeStatic(main.clj:514)

	at clojure.main$main_opt.invoke(main.clj:510)

	at clojure.main$main.invokeStatic(main.clj:664)

	at clojure.main$main.doInvoke(main.clj:616)

	at clojure.lang.RestFn.applyTo(RestFn.java:137)

	at clojure.lang.Var.applyTo(Var.java:705)

	at clojure.main.main(main.java:40)

 ("exited abnormally with code 1")
error in process sentinel: Could not start nREPL server: Error building classpath. Don't know how to create ISeq from: clojure.lang.Symbol

java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol

	at clojure.lang.RT.seqFrom(RT.java:557)

	at clojure.lang.RT.seq(RT.java:537)

	at clojure.core$seq__5467.invokeStatic(core.clj:139)

	at clojure.core$merge_with$merge2__6033.invoke(core.clj:3083)

	at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:63)

	at clojure.core$reduce1.invokeStatic(core.clj:944)

	at clojure.core$reduce1.invokeStatic(core.clj:936)

	at clojure.core$merge_with.invokeStatic(core.clj:3076)

	at clojure.core$merge_with.doInvoke(core.clj:3068)

	at clojure.lang.RestFn.applyTo(RestFn.java:139)

	at clojure.core$apply.invokeStatic(core.clj:669)

	at clojure.tools.deps$merge_edns.invokeStatic(deps.clj:141)

	at clojure.tools.deps.script.make_classpath2$run_core.invokeStatic(make_classpath2.clj:86)

	at clojure.tools.deps.script.make_classpath2$run.invokeStatic(make_classpath2.clj:153)

	at clojure.tools.deps.script.make_classpath2$_main.invokeStatic(make_classpath2.clj:203)

	at clojure.tools.deps.script.make_classpath2$_main.doInvoke(make_classpath2.clj:174)

	at clojure.lang.RestFn.applyTo(RestFn.java:137)

	at clojure.lang.Var.applyTo(Var.java:705)

	at clojure.core$apply.invokeStatic(core.clj:667)

	at clojure.main$main_opt.invokeStatic(main.clj:514)

	at clojure.main$main_opt.invoke(main.clj:510)

	at clojure.main$main.invokeStatic(main.clj:664)

	at clojure.main$main.doInvoke(main.clj:616)

	at clojure.lang.RestFn.applyTo(RestFn.java:137)

	at clojure.lang.Var.applyTo(Var.java:705)

	at clojure.main.main(main.java:40)

 ("exited abnormally with code 1")

Steps to reproduce the problem

Create a basic project with minimal deps.edn. Try jacking in from any namespace in the src path of the project.

Environment & Version information

scoop clojure

CIDER version information

Not sure. Spacemacs develop head of branch. packages updated.

Lein / Clojure CLI version

Clojure CLI version (deps.clj) 1.11.1.1273.

Emacs version

GNU Emacs 28.2 (build 2, x86_64-w64-mingw32) of 2022-09-13

Operating system

Windows 10

JDK distribution

openjdk 11.0.5 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)

@ikappaki
Copy link
Contributor

(cc'ing @borkdude for awareness)

Hi @paulrd ,

this is due to cider picking up the clojure executable from the path as opposed to using the cllojure powershell module. It's failing due to the different quoting rules required for native executables.

I assume you've installed deps.clj as clojure.exe manually, or is it perhaps that scoop now defaults to clojure.exe (as opposed to deps.exe)?

The fix is straightforward, but I have to think how to best write an integration test for this.

Thanks

@borkdude
Copy link

@paulrd installed via scoop-clojure clj-deps:

https://github.com/littleli/scoop-clojure

@ikappaki
Copy link
Contributor

@paulrd installed via scoop-clojure clj-deps:

https://github.com/littleli/scoop-clojure

I suppose this was done by what appears to be an undocumented (at least not in the readme file) clj-msi tool? I'm just curious to know how this has not come up before.

@borkdude
Copy link

No, clj-deps is just a package in the scoop-clojure repo which installs deps.exe as clojure.exe and clj.exe.

@ikappaki
Copy link
Contributor

No, clj-deps is just a package in the scoop-clojure repo which installs deps.exe as clojure.exe and clj.exe.

This doesn't appear to be the case in my local scoop clj-deps installation ... I can only see a deps.exe being installed...

@borkdude
Copy link

Note: clj-deps, not deps-clj.

@ikappaki
Copy link
Contributor

Note: clj-deps, not deps-clj.

Thanks, I was using an old scoop installation of clj-deps, and perhaps I might have manually deleted the clj.exes at some point.

Hi @paulrd, would you be able to confirm the above commit fixed your issue? thanks

@vemv vemv closed this as completed Jul 27, 2023
@vemv
Copy link
Member

vemv commented Jul 27, 2023

Thanks again to @ikappaki for the fix 🙌

We would certainly appreciate a confirmation!

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

4 participants