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

cljr-clean-ns with vagrant #286

Closed
timothyandrew opened this issue Jan 21, 2016 · 2 comments
Closed

cljr-clean-ns with vagrant #286

timothyandrew opened this issue Jan 21, 2016 · 2 comments

Comments

@timothyandrew
Copy link
Contributor

I use Vagrant for regular development, along with Emacs on OS X.
When I run M-x cljr-clean-ns while connected to an nREPL server on the Vagrant VM, I get an error like:

java.io.FileNotFoundException: /Users/tim/work/DummyProject/src/dummy_project/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)
    java.io.FileInputStream.<init> (FileInputStream.java:93)
    java.io.FileReader.<init> (FileReader.java:58)
    sun.reflect.GeneratedConstructorAccessor14.newInstance (:-1)
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    java.lang.reflect.Constructor.newInstance (Constructor.java:422)
    clojure.lang.Reflector.invokeConstructor (Reflector.java:180)
    refactor_nrepl.core$read_ns_form.invoke (core.clj:202)
    refactor_nrepl.ns.clean_ns$clean_ns.invoke (clean_ns.clj:45)
    refactor_nrepl.middleware$clean_ns_reply.invoke (middleware.clj:75)
    refactor_nrepl.middleware$wrap_refactor$fn__34944.invoke (middleware.clj:123)
    clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__706.invoke (middleware.clj:22)
    clojure.tools.nrepl.server$handle_STAR_.invoke (server.clj:19)
    clojure.tools.nrepl.server$handle$fn__1105.invoke (server.clj:28)
    clojure.core$binding_conveyor_fn$fn__4444.invoke (core.clj:1916)
    clojure.lang.AFn.call (AFn.java:18)
    java.util.concurrent.FutureTask.run (FutureTask.java:266)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
    java.lang.Thread.run (Thread.java:745)

This is presumably because it's trying to look for the OS X file path (/Users/tim/...) on the Vagrant VM, and failing.

The fix I'm using now is to run this on the Vagrant VM:

$ sudo mkdir -p /Users/tim/work
$ sudo ln -s ~/DummyProject /Users/tim/work/DummyProject

But it would be nice for this to be fixed the right way.

cljr version: 2.0.0-SNAPSHOT
emacs version: 24.5.1

@expez
Copy link
Member

expez commented Jan 21, 2016

But it would be nice for this to be fixed the right way.

Pull request welcome.

I'm not familiar with Vagrant so I can tell you right away that I won't be investigating this myself.

@benedekfazekas
Copy link
Member

PR still welcome but if you put together a small sample project and how to reproduce guide I may have a look some time.

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

3 participants