You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Cider connected to nrepl running on ssh host, refactors of the clojure code should work.
Actual behavior
Some of the refactors are not working, returning errors.
Steps to reproduce the problem
On remote host:
lein new test-clj-refactor
cd test-clj-refactor
lein repl :start :port 11111
On local host:
Start doom emacs
Create new project with remote ssh dir as a root one SPC p a + /ssh:target-host:tmp/test-clj-refactor
Connect to this project with SPC p p
Open src/test-clj-refactor/core.clj
Connect to nrepl via ssh: SPC m c + target-host + 11111 (you should see successful message in new repl window)
In core.clj move cursor to any form (e.g. println one from the test) and press SPC m R t ef to extract the function. You should see the error as shown below. Other refactors may work (e.g. extract as def works OK).
[nREPL] Establishing direct connection to target-host:11111 ...
[nREPL] Direct connection to target-host:11111 failed
[nREPL] Falling back to SSH tunneled connection ...
[nREPL] Establishing SSH tunneled connection to target-host:11111 ...
[nREPL] SSH port forwarding established to localhost:11111
[nREPL] Establishing direct connection to localhost:11111 ...
[nREPL] Direct connection to localhost:11111 established
Connected! May your functions be pure, your code concise and your programs a joy to behold!
To perform this op the project needs to be evaluated.
Analyzing a large project might take a while: hit C-g to abort.
(Set cljr-warn-on-eval to nil to analyze the project without warning)
Do you want to proceed? (y or n) y
Error in nrepl-refactor: java.io.FileNotFoundException: /ssh:target-host:/home/vlnn/tmp/test-clj-refactor/src/test_clj_refactor/core.clj (No such file or directory)
at java.io.FileInputStream.open0 (FileInputStream.java:-2)
java.io.FileInputStream.open (FileInputStream.java:195)
java.io.FileInputStream.<init> (FileInputStream.java:138)
clojure.java.io$fn__11496.invokeStatic (io.clj:229)
clojure.java.io/fn (io.clj:229)
clojure.java.io$fn__11409$G__11402__11416.invoke (io.clj:69)
clojure.java.io$fn__11508.invokeStatic (io.clj:258)
clojure.java.io/fn (io.clj:254)
clojure.java.io$fn__11409$G__11402__11416.invoke (io.clj:69)
clojure.java.io$fn__11470.invokeStatic (io.clj:165)
clojure.java.io/fn (io.clj:165)
clojure.java.io$fn__11422$G__11398__11429.invoke (io.clj:69)
clojure.java.io$reader.invokeStatic (io.clj:102)
clojure.java.io$reader.doInvoke (io.clj:86)
clojure.lang.RestFn.invoke (RestFn.java:410)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.RestFn.applyTo (RestFn.java:132)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$slurp.invokeStatic (core.clj:6942)
clojure.core$slurp.doInvoke (core.clj:6942)
clojure.lang.RestFn.invoke (RestFn.java:410)
refactor_nrepl.find.find_locals$find_used_locals.invokeStatic (find_locals.clj:14)
refactor_nrepl.find.find_locals$find_used_locals.invoke (find_locals.clj:9)
clojure.lang.Var.invoke (Var.java:384)
refactor_nrepl.middleware$find_used_locals_reply$fn__3142.invoke (middleware.clj:145)
refactor_nrepl.ns.libspec_allowlist$with_memoized_libspec_allowlist_STAR_.invokeStatic (libspec_allowlist.clj:41)
refactor_nrepl.ns.libspec_allowlist$with_memoized_libspec_allowlist_STAR_.invoke (libspec_allowlist.clj:39)
refactor_nrepl.middleware$find_used_locals_reply.invokeStatic (middleware.clj:145)
refactor_nrepl.middleware$find_used_locals_reply.invoke (middleware.clj:144)
refactor_nrepl.middleware$wrap_refactor$fn__3205.invoke (middleware.clj:232)
nrepl.middleware$wrap_conj_descriptor$fn__662.invoke (middleware.clj:16)
nrepl.middleware.load_file$wrap_load_file$fn__1459.invoke (load_file.clj:81)
nrepl.middleware$wrap_conj_descriptor$fn__662.invoke (middleware.clj:16)
nrepl.middleware.caught$wrap_caught$fn__930.invoke (caught.clj:97)
nrepl.middleware$wrap_conj_descriptor$fn__662.invoke (middleware.clj:16)
cider.nrepl$wrap_tracker$fn__2224.invoke (nrepl.clj:520)
nrepl.middleware$wrap_conj_descriptor$fn__662.invoke (middleware.clj:16)
cider.nrepl$wrap_content_type$fn__2060.invoke (nrepl.clj:107)
nrepl.middleware$wrap_conj_descriptor$fn__662.invoke (middleware.clj:16)
nrepl.middleware.print$wrap_print$fn__897.invoke (print.clj:234)
nrepl.middleware$wrap_conj_descriptor$fn__662.invoke (middleware.clj:16)
nrepl.middleware.session$session$fn__1095.invoke (session.clj:309)
nrepl.middleware$wrap_conj_descriptor$fn__662.invoke (middleware.clj:16)
nrepl.server$default_handler$fn__1590.invoke (server.clj:130)
nrepl.server$handle_STAR_.invokeStatic (server.clj:22)
nrepl.server$handle_STAR_.invoke (server.clj:19)
nrepl.server$handle$fn__1561.invoke (server.clj:39)
clojure.core$binding_conveyor_fn$fn__5754.invoke (core.clj:2030)
clojure.lang.AFn.call (AFn.java:18)
java.util.concurrent.FutureTask.run (FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
java.lang.Thread.run (Thread.java:750)
Environment & Version information
clj-refactor.el version information
clj-refactor 3.6.0, refactor-nrepl 3.6.0
CIDER version information
;; Connected to nREPL server - nrepl://localhost:11111
;; CIDER 1.7.0-snapshot (package: 1.7.0-snapshot), nREPL 0.8.3
;; Clojure 1.10.1, Java 1.8.0_332
;; Docs: (doc function-name)
;; (find-doc part-of-name)
;; Source: (source function-name)
;; Javadoc: (javadoc java-object-or-class)
;; Exit: <C-c C-q>
;; Results: Stored in vars *1, *2, *3, an exception in *e;
test-clj-refactor.core>
Leiningen or Boot version
Leiningen 2.9.5 on Java 1.8.0_332 OpenJDK 64-Bit Server VM
Emacs version
GNU Emacs 28.2 (build 2, aarch64-apple-darwin22.4.0, NS appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a)) of 2023-05-21
Operating system
Sonoma on localhost, Ubuntu 20.04 on target-host
The text was updated successfully, but these errors were encountered:
btw, it looks like you could upgrade cider (which most recent snapshots have a superior TRAMP support: jump-to-definition will work more reliably) and the JDK (8 is being increasingly unsupported in the Clojure community - CIDER will certainly drop it)
Expected behavior
When using Cider connected to nrepl running on ssh host, refactors of the clojure code should work.
Actual behavior
Some of the refactors are not working, returning errors.
Steps to reproduce the problem
On remote host:
lein new test-clj-refactor cd test-clj-refactor lein repl :start :port 11111
On local host:
SPC p a
+/ssh:target-host:tmp/test-clj-refactor
SPC p p
src/test-clj-refactor/core.clj
SPC m c
+target-host
+11111
(you should see successful message in new repl window)SPC m R t ef
to extract the function. You should see the error as shown below. Other refactors may work (e.g. extract as def works OK).Environment & Version information
clj-refactor.el version information
clj-refactor 3.6.0, refactor-nrepl 3.6.0
CIDER version information
Leiningen or Boot version
Leiningen 2.9.5 on Java 1.8.0_332 OpenJDK 64-Bit Server VM
Emacs version
GNU Emacs 28.2 (build 2, aarch64-apple-darwin22.4.0, NS appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a)) of 2023-05-21
Operating system
Sonoma on localhost, Ubuntu 20.04 on target-host
The text was updated successfully, but these errors were encountered: