plexus / chestnut

Application template for Clojure + ClojureScript web apps
Eclipse Public License 1.0
1.32k stars 99 forks source link

Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context #246

Closed Bost closed 5 years ago

Bost commented 5 years ago

I just created lein new chestnut hello-chestnut and:

$ lein repl
Warning: implicit hook found: lein-environ.plugin/hooks 
Hooks are deprecated and will be removed in a future version.
2019-04-01 14:34:47.031:INFO::main: Logging initialized @3546ms to org.eclipse.jetty.util.log.StdErrLog
Error loading cider.piggieback: Syntax error compiling at (cider/piggieback.clj:190:3).
Exception in thread "main" Syntax error compiling var at (/tmp/form-init7099613437652935123.clj:1:2928).
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7114)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.analyze(Compiler.java:6745)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.analyze(Compiler.java:6745)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.access$300(Compiler.java:38)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6384)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.analyze(Compiler.java:6745)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6120)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5467)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4029)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7104)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.eval(Compiler.java:7173)
    at clojure.lang.Compiler.eval(Compiler.java:7166)
    at clojure.lang.Compiler.eval(Compiler.java:7166)
    at clojure.lang.Compiler.eval(Compiler.java:7166)
    at clojure.lang.Compiler.load(Compiler.java:7635)
    at clojure.lang.Compiler.loadFile(Compiler.java:7573)
    at clojure.main$load_script.invokeStatic(main.clj:452)
    at clojure.main$init_opt.invokeStatic(main.clj:454)
    at clojure.main$init_opt.invoke(main.clj:454)
    at clojure.main$initialize.invokeStatic(main.clj:485)
    at clojure.main$null_opt.invokeStatic(main.clj:519)
    at clojure.main$null_opt.invoke(main.clj:516)
    at clojure.main$main.invokeStatic(main.clj:598)
    at clojure.main$main.doInvoke(main.clj:561)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.lang.Var.applyTo(Var.java:705)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context
    at clojure.lang.Util.runtimeException(Util.java:221)
    at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)
    ... 36 more
REPL server launch timed out.

Tested under openjdk version "1.8.0_191" and also openjdk version "11.0.1" 2018-10-16

featheredtoast commented 5 years ago

Thanks for the report - it seems to be coming from an issue with piggieback. I just updated the snapshot with the latest 0.4.0 version of piggieback, can you try from the snapshot?

lein new chestnut hello-chestnut --snapshot

This solves it for me - if it does for you, I'll go ahead and release a version with this fix.

Bost commented 5 years ago

Hi, unfortunately it doesn't work and I don't see piggieback 0.4.0 being used - see at the bottom.

$ cd /tmp
$ lein new chestnut hello-chestnut --snapshot
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by mranderson048.orchard.v0v3v0.dynapath.v0v2v5.dynapath.defaults$eval1836$fn__1837 to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of mranderson048.orchard.v0v3v0.dynapath.v0v2v5.dynapath.defaults$eval1836$fn__1837
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Retrieving chestnut/lein-template/0.1.0/lein-template-0.1.0.pom from clojars
Retrieving chestnut/lein-template/0.2.0/lein-template-0.2.0.pom from clojars
Retrieving chestnut/lein-template/0.3.0-SNAPSHOT/lein-template-0.3.0-20140926.092435-1.pom from clojars
Retrieving chestnut/lein-template/0.3.0/lein-template-0.3.0.pom from clojars
Retrieving chestnut/lein-template/0.4.0-SNAPSHOT/lein-template-0.4.0-20140926.125825-1.pom from clojars
Retrieving chestnut/lein-template/0.4.0/lein-template-0.4.0.pom from clojars
Retrieving chestnut/lein-template/0.5.0/lein-template-0.5.0.pom from clojars
Retrieving chestnut/lein-template/0.6.0/lein-template-0.6.0.pom from clojars
Retrieving chestnut/lein-template/0.7.0-SNAPSHOT/lein-template-0.7.0-20150103.132204-6.pom from clojars
Retrieving chestnut/lein-template/0.8.0/lein-template-0.8.0.pom from clojars
Retrieving chestnut/lein-template/0.8.1/lein-template-0.8.1.pom from clojars
Retrieving chestnut/lein-template/0.8.2-SNAPSHOT/lein-template-0.8.2-20151221.140932-1.pom from clojars
Retrieving chestnut/lein-template/0.9.0-SNAPSHOT/lein-template-0.9.0-20160129.142653-5.pom from clojars
Retrieving clj-jgit/clj-jgit/0.8.8/clj-jgit-0.8.8.pom from clojars
Retrieving org/eclipse/jgit/org.eclipse.jgit.java7/3.7.0.201502260915-r/org.eclipse.jgit.java7-3.7.0.201502260915-r.pom from central
Retrieving org/eclipse/jgit/org.eclipse.jgit-parent/3.7.0.201502260915-r/org.eclipse.jgit-parent-3.7.0.201502260915-r.pom from central
Retrieving org/eclipse/jgit/org.eclipse.jgit/3.7.0.201502260915-r/org.eclipse.jgit-3.7.0.201502260915-r.pom from central
Retrieving com/jcraft/jsch/0.1.52/jsch-0.1.52.pom from central
Retrieving org/slf4j/slf4j-nop/1.7.13/slf4j-nop-1.7.13.pom from central
Retrieving chestnut/lein-template/0.9.0/lein-template-0.9.0.pom from clojars
Retrieving chestnut/lein-template/0.9.1/lein-template-0.9.1.pom from clojars
Retrieving org/slf4j/slf4j-nop/1.7.14/slf4j-nop-1.7.14.pom from central
Retrieving org/slf4j/slf4j-parent/1.7.14/slf4j-parent-1.7.14.pom from central
Retrieving org/slf4j/slf4j-api/1.7.14/slf4j-api-1.7.14.pom from central
Retrieving chestnut/lein-template/0.10.0-SNAPSHOT/lein-template-0.10.0-20160313.122457-1.pom from clojars
Retrieving chestnut/lein-template/0.10.0/lein-template-0.10.0.pom from clojars
Retrieving chestnut/lein-template/0.10.1/lein-template-0.10.1.pom from clojars
Retrieving org/slf4j/slf4j-nop/1.7.19/slf4j-nop-1.7.19.pom from central
Retrieving org/slf4j/slf4j-parent/1.7.19/slf4j-parent-1.7.19.pom from central
Retrieving org/slf4j/slf4j-api/1.7.19/slf4j-api-1.7.19.pom from central
Retrieving chestnut/lein-template/0.11.0/lein-template-0.11.0.pom from clojars
Retrieving chestnut/lein-template/0.12.0/lein-template-0.12.0.pom from clojars
Retrieving chestnut/lein-template/0.13.0-SNAPSHOT/lein-template-0.13.0-20160601.082433-1.pom from clojars
Retrieving chestnut/lein-template/0.13.0/lein-template-0.13.0.pom from clojars
Retrieving chestnut/lein-template/0.14.0/lein-template-0.14.0.pom from clojars
Retrieving chestnut/lein-template/0.15.0-SNAPSHOT/lein-template-0.15.0-20170517.134032-2.pom from clojars
Retrieving re-frame/lein-template/0.2.7-1/lein-template-0.2.7-1.pom from clojars
Retrieving chestnut/lein-template/0.15.0/lein-template-0.15.0.pom from clojars
Retrieving chestnut/lein-template/0.15.1/lein-template-0.15.1.pom from clojars
Retrieving chestnut/lein-template/0.15.2/lein-template-0.15.2.pom from clojars
Retrieving chestnut/lein-template/0.16.0/lein-template-0.16.0.pom from clojars
Retrieving clj-http/clj-http/3.9.0/clj-http-3.9.0.pom from clojars
Generating fresh Chestnut project.
README.md contains instructions to get you started.
$ cd hello-chestnut/
$ lein repl
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by mranderson048.orchard.v0v3v0.dynapath.v0v2v5.dynapath.defaults$eval1862$fn__1863 to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of mranderson048.orchard.v0v3v0.dynapath.v0v2v5.dynapath.defaults$eval1862$fn__1863
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Warning: implicit hook found: lein-environ.plugin/hooks 
Hooks are deprecated and will be removed in a future version.
Retrieving figwheel/figwheel/0.5.18/figwheel-0.5.18.pom from clojars
Retrieving figwheel-sidecar/figwheel-sidecar/0.5.18/figwheel-sidecar-0.5.18.pom from clojars
Retrieving figwheel/figwheel/0.5.18/figwheel-0.5.18.jar from clojars
Retrieving figwheel-sidecar/figwheel-sidecar/0.5.18/figwheel-sidecar-0.5.18.jar from clojars
2019-04-02 13:00:48.948:INFO::main: Logging initialized @3588ms to org.eclipse.jetty.util.log.StdErrLog
Error loading cider.piggieback: Syntax error compiling at (cider/piggieback.clj:190:3).
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by mranderson048.orchard.v0v3v0.dynapath.v0v2v5.dynapath.defaults$eval30587$fn__30588 to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of mranderson048.orchard.v0v3v0.dynapath.v0v2v5.dynapath.defaults$eval30587$fn__30588
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" Syntax error compiling var at (/tmp/form-init7555189099073856942.clj:1:9431).
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7114)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.analyze(Compiler.java:6745)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.analyze(Compiler.java:6745)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.access$300(Compiler.java:38)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6384)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.analyze(Compiler.java:6745)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6120)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5467)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4029)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7104)
    at clojure.lang.Compiler.analyze(Compiler.java:6789)
    at clojure.lang.Compiler.eval(Compiler.java:7173)
    at clojure.lang.Compiler.eval(Compiler.java:7166)
    at clojure.lang.Compiler.eval(Compiler.java:7166)
    at clojure.lang.Compiler.eval(Compiler.java:7166)
    at clojure.lang.Compiler.load(Compiler.java:7635)
    at clojure.lang.Compiler.loadFile(Compiler.java:7573)
    at clojure.main$load_script.invokeStatic(main.clj:452)
    at clojure.main$init_opt.invokeStatic(main.clj:454)
    at clojure.main$init_opt.invoke(main.clj:454)
    at clojure.main$initialize.invokeStatic(main.clj:485)
    at clojure.main$null_opt.invokeStatic(main.clj:519)
    at clojure.main$null_opt.invoke(main.clj:516)
    at clojure.main$main.invokeStatic(main.clj:598)
    at clojure.main$main.doInvoke(main.clj:561)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.lang.Var.applyTo(Var.java:705)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context
    at clojure.lang.Util.runtimeException(Util.java:221)
    at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)
    ... 36 more
REPL server launch timed out.
$ grep piggieback project.clj
                             [cider/piggieback "0.3.10"]
              :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}}
featheredtoast commented 5 years ago

herp derp, I forgot to actually push up the fix to clojars. should be up there now.

Bost commented 5 years ago

cider/piggieback "0.4.0 fixes the problem indeed. And the 0.18.0-SNAPSHOT apparently does exist. It's just that lein new chestnut hello-chestnut --snapshot ignores it and keeps on using the chestnut/lein-template "0.17.0". Something's funny here :( BTW I'm on Leiningen 2.9.1 on Java 11.0.1 OpenJDK 64-Bit Server VM

featheredtoast commented 5 years ago

I can't speak to why lein is giving you an old version. :(

but I'm glad that updating piggieback confirms that the issue goes away at least, I'll push a release tonight so the latest remains stable for folks