leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
lsyoyom 2019-03-13T01:47:52.081700Z

@mikerod The result is the same. And after some more digging, I ran into this post (https://www.reddit.com/r/Clojure/comments/5f2ctk/cant_compile_java_sources_with_lein_javac/), and it is also referring some more sources, it points to the clojure's unconditional load of user.clj which transitively loading other clj files before javac has a chance to run. Based on the information from that post, I'm able to fix my project, thank you very much for your help!

1👍
2019-03-13T01:55:43.083Z

@lin.subscriber thanks for the link. I’ll have to read through it. But glad if you found a solution that works.

Rafael Almeida 2019-03-13T18:43:52.084400Z

Hey guys, how are you? I am a noob who needs to make some commits on a existing project. When I try to run lein I get the following error:

Warning: implicit hook found: lein-environ.plugin/hooks
Hooks are deprecated and will be removed in a future version.
Error loading nrepl.server: java.lang.RuntimeException: Unable to resolve symbol: volatile! in this context, compiling:(nrepl/middleware/print.clj:78:17)
Exception in thread "main" java.lang.ClassNotFoundException: nrepl.server, compiling:(/tmp/form-init2011741411756077488.clj:1:1657)
       at clojure.lang.Compiler.analyzeSeq(Compiler.java:6651)
       at clojure.lang.Compiler.analyze(Compiler.java:6445)
       at clojure.lang.Compiler.access$100(Compiler.java:38)
       at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6050)
       at clojure.lang.Compiler.analyzeSeq(Compiler.java:6644)
       at clojure.lang.Compiler.analyze(Compiler.java:6445)
       at clojure.lang.Compiler.analyze(Compiler.java:6406)
       at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)
       at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5217)
       at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3846)
       at clojure.lang.Compiler.analyzeSeq(Compiler.java:6642)
       at clojure.lang.Compiler.analyze(Compiler.java:6445)
       at clojure.lang.Compiler.eval(Compiler.java:6700)
       at clojure.lang.Compiler.eval(Compiler.java:6693)
       at clojure.lang.Compiler.eval(Compiler.java:6693)
       at clojure.lang.Compiler.eval(Compiler.java:6693)
       at clojure.lang.Compiler.load(Compiler.java:7130)
       at clojure.lang.Compiler.loadFile(Compiler.java:7086)
       at clojure.main$load_script.invoke(main.clj:274)
       at clojure.main$init_opt.invoke(main.clj:279)
       at clojure.main$initialize.invoke(main.clj:307)
       at clojure.main$null_opt.invoke(main.clj:342)
       at clojure.main$main.doInvoke(main.clj:420)
       at clojure.lang.RestFn.invoke(RestFn.java:421)
       at clojure.lang.Var.invoke(Var.java:383)
       at clojure.lang.AFn.applyToHelper(AFn.java:156)
       at clojure.lang.Var.applyTo(Var.java:700)
       at clojure.main.main(main.java:37)
Caused by: java.lang.ClassNotFoundException: nrepl.server
       at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
       at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:348)
       at clojure.lang.RT.classForName(RT.java:2065)
       at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:978)
       at clojure.lang.Compiler$HostExpr.access$400(Compiler.java:756)
       at clojure.lang.Compiler.macroexpand1(Compiler.java:6583)
       at clojure.lang.Compiler.analyzeSeq(Compiler.java:6630)
       ... 27 more
REPL server launch timed out.
I already searched for this on google, but had no luck as the results redirect for a broken page I am using arch linux and already tried different versions of lein, clojure and java I have no ideia how to proceed but I can give any information needed to make it work. Thx a lot for the attention.

Rafael Almeida 2019-03-13T18:44:33.084500Z

clojure 1.10.0 Leiningen 2.9.1 on Java 1.8.0_202 OpenJDK 64-Bit Server VM

2019-03-13T20:50:45.085300Z

@clojurians038 do you have a ~/.lein/profiles.clj file?

bozhidar 2019-03-14T09:41:55.086800Z

I think it’s more likely he has an old version of lein and some newer deps.

bozhidar 2019-03-14T09:42:36.087Z

If Rafael’s Lein is 2.8.3 or newer such an error can possibly appear, so I’d speculate he’s using older Lein and needs to upgrade.

2019-03-14T13:43:19.088100Z

@bozhidar I thought he mentioned what versions in this thread and it was a newer lein. Maybe I read wrong.

2019-03-14T13:44:24.088600Z

clojure 1.10.0 Leiningen 2.9.1 on Java 1.8.0_202 OpenJDK 64-Bit Server VM This was what was posted for version info

bozhidar 2019-03-14T14:03:15.089Z

Hmm, than it’s not possible for nrepl.server to be missing (and I saw this is the root cause of the error).

bozhidar 2019-03-14T14:03:26.089200Z

Maybe some weird dep interactions indeed.

2019-03-14T15:02:41.089800Z

@bozhidar Yeah, it was strange to me. I thought maybe the older nrepl dep was on the classpath, but I think the ns name has changed, so it wouldn’t conflict with nrepl.server right?

Rafael Almeida 2019-03-13T21:19:48.085500Z

I have a project project.clj but not a .lein/profiles.clj

2019-03-13T21:24:50.086400Z

Ok. Wondering if you have some old version of nrepl or cider-nrepl middleware in your dependencies.