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

cygwin filepath support #183

Closed
tsulej opened this issue Jan 13, 2017 · 4 comments
Closed

cygwin filepath support #183

tsulej opened this issue Jan 13, 2017 · 4 comments

Comments

@tsulej
Copy link

tsulej commented Jan 13, 2017

Can't invoke commands which requires file load on the refactor-nrepl side. For example rename symbol.

After some debugging I found that problem is similar to this issue: clojure-emacs/cider#735
And instead of simply slurp filename should be treated by cygpath before.

Actual behavior

Calling rename symbol causes following exception:

cljr--get-error-value: Error in nrepl-refactor: java.io.FileNotFoundException:
\home\tsulej\clojure2d\src\clojure2d\color.clj (System nie może odnaleźć określonej ścieżki <--- can't find path)
at java.io.FileInputStream.open0 (:-2)
java.io.FileInputStream.open (:-1)
java.io.FileInputStream. (:-1)
clojure.java.io$fn__9520.invokeStatic (io.clj:229)
clojure.java.io/fn (io.clj:229)
[...]

nrepl debug shows such messages:

(-->
op "info"
session "ad551abf-8b65-4915-b863-3294ba49434d"
ns "clojure2d.color"
symbol "get-luma3"
id "17"
)
(<--
arglists-str "([c])"
column 1
doc "get luma from color"
file "file:/C:/cygwin64/home/tsulej/clojure2d/src/clojure2d/color...."
id "17"
line 31
name "get-luma3"
ns "clojure2d.color"
session "ad551abf-8b65-4915-b863-3294ba49434d"
status ("done")
)
(-->
op "find-symbol"
prefix-rewriting "true"
debug "false"
ns "clojure2d.color"
dir "/home/tsulej/clojure2d/"
file "/home/tsulej/clojure2d/src/clojure2d/color.clj"
line 31
column 14
name "get-luma3"
ignore-errors nil
session "ad551abf-8b65-4915-b863-3294ba49434d"
id "18"
)
(<--
err "java.io.FileNotFoundException: \home\tsulej\clojure2d\src\cl..."
ex "class java.io.FileNotFoundException"
id "18"
session "ad551abf-8b65-4915-b863-3294ba49434d"
status ("done" "refactor-nrepl-error")
)

Steps to reproduce the problem

Under Cygwin I run startxwin to run X Window System and run Emacs, open file, invoke cider-jack-in or connect to extrenally run REPL. C-c RET r s causes error.

Environment & Version information

clj-refactor.el and refactor-nrepl version information

clj-refactor 2.3.0-SNAPSHOT (package: 20161223.1457), refactor-nrepl 2.3.0-SNAPSHOT

CIDER version information

;; Connected to nREPL server - nrepl://localhost:63103
;; CIDER 0.15.0snapshot (package: 20170104.1330), nREPL 0.2.12
;; Clojure 1.8.0, Java 1.8.0_91

Leiningen or Boot version

Leiningen 2.7.1 on Java 1.8.0_91 Java HotSpot(TM) 64-Bit Server VM

Emacs version

GNU Emacs 25.1.1 (x86_64-unknown-cygwin, GTK+ Version 3.18.9) of 2016-09-17

Operating system

Windows 10,
CYGWIN_NT-10.0 Dell 2.6.1(0.305/5/3) 2016-12-16 11:55 x86_64 Cygwin

@benedekfazekas
Copy link
Member

we should use what is already in cider from clj-refactor I suppose

@tsulej
Copy link
Author

tsulej commented Jan 13, 2017

I see that I mistakenly assigned bug here. Bug should go to the emacs side (clj-refactor). Emacs under Cygwin has native converting functions. Info.
I'll try to make some tests.

@expez
Copy link
Member

expez commented Jan 13, 2017

Move it if you want, but we're kind of used to closing issues across these two repos so it's not really a problem @tsulej.

@tsulej
Copy link
Author

tsulej commented Jan 13, 2017

Created pull request: clojure-emacs/clj-refactor.el#357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants