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

"Access is denied" error running lein source-deps #1958

Closed
kenny-evitt opened this issue Aug 17, 2015 · 4 comments
Closed

"Access is denied" error running lein source-deps #1958

kenny-evitt opened this issue Aug 17, 2015 · 4 comments

Comments

@kenny-evitt
Copy link

I'm trying to run lein source-deps for this sub-project. I'm running versions 2.2.0, 2.5.1, and 2.5.2 in Windows Command Prompt, Cygwin64 Terminal, and Git Bash (respectively). All attempts output (basically) the same result below.

To reproduce, you should be able to clone the above-linked repo and then run, from the root repo directory:

$ cd lein-light-nrepl
$ lein source-deps

Output I'm seeing:

retrieve dependencies and munge clojure source files
    prefixing imports in clojure files...
java.io.FileNotFoundException: C:\@GitHub\LightTable\deploy\plugins\Clojure\lein-light-nrepl\target\srcdeps (Access is denied)
 at java.io.FileInputStream.open0 (:-2)
    java.io.FileInputStream.open (:-1)
    java.io.FileInputStream.<init> (:-1)
    clojure.java.io/fn (io.clj:229)
    clojure.java.io$fn__8615$G__8606__8622.invoke (io.clj:69)
    clojure.java.io/fn (io.clj:165)
    clojure.java.io$fn__8628$G__8610__8635.invoke (io.clj:69)
    clojure.java.io$reader.doInvoke (io.clj:102)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.core$apply.invoke (core.clj:626)
    clojure.core$slurp.doInvoke (core.clj:6390)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    leiningen.source_deps$retrieve_import.invoke (source_deps.clj:122)
    leiningen.source_deps$prefix_dependency_imports_BANG_$fn__1534.invoke (source_deps.clj:180)
    clojure.core.protocols/fn (protocols.clj:143)
    clojure.core.protocols$fn__6057$G__6052__6066.invoke (protocols.clj:19)
    clojure.core.protocols$seq_reduce.invoke (protocols.clj:31)
    clojure.core.protocols/fn (protocols.clj:54)
    clojure.core.protocols$fn__6031$G__6026__6044.invoke (protocols.clj:13)
    clojure.core$reduce.invoke (core.clj:6289)
    leiningen.source_deps$prefix_dependency_imports_BANG_.invoke (source_deps.clj:180)
    leiningen.source_deps$unzip_AMPERSAND_update_artifact_BANG_.invoke (source_deps.clj:212)
    clojure.lang.AFn.applyToHelper (AFn.java:205)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invoke (core.clj:630)
    clojure.core$partial$fn__4234.doInvoke (core.clj:2474)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.core$map$fn__4245.invoke (core.clj:2559)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.RT.seq (RT.java:484)
    clojure.core$seq.invoke (core.clj:133)
    clojure.core$dorun.invoke (core.clj:2855)
    clojure.core$doall.invoke (core.clj:2871)
    leiningen.source_deps$source_deps.doInvoke (source_deps.clj:267)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.Var.invoke (Var.java:379)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invoke (core.clj:626)
    leiningen.core.main$partial_task$fn__6094.doInvoke (main.clj:263)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invoke (core.clj:626)
    leiningen.core.main$apply_task.invoke (main.clj:313)
    leiningen.core.main$resolve_and_apply.invoke (main.clj:319)
    leiningen.core.main$_main$fn__6160.invoke (main.clj:392)
    leiningen.core.main$_main.doInvoke (main.clj:385)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.lang.Var.invoke (Var.java:379)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invoke (core.clj:624)
    clojure.main$main_opt.invoke (main.clj:315)
    clojure.main$main.doInvoke (main.clj:420)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    clojure.lang.Var.invoke (Var.java:388)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)
@hypirion
Copy link
Collaborator

I'm not familiar with how mranderson works internally, but I tried this on my debian machines and it works fine here with any lein version >= 2.4.3.

I'm guessing, considering "(Access is denied)" pops up in the error message, that it's an issue with directory permissions. Either that, or maybe there's some issues with the file name encoding on Windows. Perhaps it's worth ensuring that the directories referenced in the message has the right ACLs, so that you mranderson can write the files it wants to?

(Is there any reason we should believe this is a bug with Lein itself, rather than the plugin?)

@kenny-evitt
Copy link
Author

@hypirion I think you're right that it's a permissions issue but I'm also trying to reproduce it on another machines and in other environments, and using a new clone of the repo too, so there's no reason to believe this a bug with Leiningen itself. I'll reopen if I uncover any evidence that it might be.

@kenny-evitt
Copy link
Author

It's not a bug with Leiningen. I was able to run lein source-deps as described above in a clean clone using version 2.5.1 on a Mac OS X box. I suspect I can do the same on the original Windows box too.

@hypirion
Copy link
Collaborator

Alright, thanks for keeping us posted =)

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