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

middleware startup crash with Ubuntu openjdk-9 #169

Closed
erno opened this issue Sep 16, 2016 · 5 comments
Closed

middleware startup crash with Ubuntu openjdk-9 #169

erno opened this issue Sep 16, 2016 · 5 comments
Milestone

Comments

@erno
Copy link

erno commented Sep 16, 2016

I updated my spacemacs and started seeing a crash when doing cider-jack-in. I spied the command line from Messages which reproduces it in the shell:

$ lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.12\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.2.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.12.0\"\] -- repl :headless
Error loading refactor-nrepl.middleware: java.lang.ClassNotFoundException: sun.misc.Launcher, compiling:(mranderson047/alembic/v0v3v2/dynapath/v0v2v3/dynapath/defaults.clj:29:3)
Error loading cider.nrepl.middleware.debug: java.lang.ClassNotFoundException: sun.misc.Launcher, compiling:(dynapath/defaults.clj:29:3)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context, compiling:(/tmp/form-init8653453591385438183.clj:1:8598)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6875)
    at clojure.lang.Compiler.analyze(Compiler.java:6669)
    at clojure.lang.Compiler.analyze(Compiler.java:6625)
[...]

Environment & Version information

This was in a pretty barebones lxc container running Ubuntu 16.04. The
error went away by downgrading to openjdk-8.

I'm not sure if all is now working, I still get this error in Messages: "error in process filter: run-hooks: Symbol's function definition is void: live-nrepl-set-print-length" but this seems unrelated to
refactor-nrepl

clj-refactor.el and refactor-nrepl version information

evident here in the reproducer commandline:

$ lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.12\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.2.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.12.0\"\] -- repl :headless
nREPL server started on port 36362 on host 127.0.0.1 - nrepl://127.0.0.1:36362

changing refactor-nrepl to 2.3.0-SNAPSHOT above didn't make a difference

clj-version says "clj-refactor 2.2.0, refactor-nrepl 2.2.0"

CIDER version information

;; CIDER 0.12.0 (Seattle), nREPL 0.2.12
;; Clojure 1.8.0, Java 1.8.0_91

Leiningen or Boot version

Leiningen 1.7.0

Emacs version

24.5+1-6ubuntu1

Operating system

Ubuntu 16.04 64-bit

@erno
Copy link
Author

erno commented Sep 16, 2016

I just found technomancy/leiningen#2149 which I guess describes this issue and it's not refactor-nrepl's fault. At least this issue will help the next "google the error message" person find the right way.

@tobias
Copy link
Contributor

tobias commented Mar 29, 2017

This is caused by tobias/dynapath#5. refactor-nrepl is vendoring alembic 0.3.2 which depends on dynapath 0.2.3. That version of dynapath doesn't work with Java 9 - you have to use dynapath 0.2.5. I'm not clear on how this would work with mranderson, but the fix would be to either get alembic updated to dynapath 0.2.5 and use that version, or exclude dynapath from the alembic that is vendored, and depend on dynapath 0.2.5 directly. The full dep vector for the correct version of dynapath is [org.tcrawley/dynapath "0.2.5"].

@benedekfazekas
Copy link
Member

thanks for the comment @tobias. does this mean that the issue is fixed in leiningen itself? if so I can give a try to your proposed dep change

benedekfazekas added a commit to benedekfazekas/alembic that referenced this issue Apr 8, 2017
@benedekfazekas
Copy link
Member

looked into this a bit more hence the pull request for alembic.

the usual leiningen trick of excluding dynapath from alembic and then requiring it top level not likely to work with mranderson. an override like feature could do that but that (although possible) is not currently available in mranderson.

so before investing in mranderson trying to get the dep properly upgraded in alembic.

@benedekfazekas benedekfazekas added this to the 2.3.0 milestone Apr 27, 2017
benedekfazekas added a commit to clojure-emacs/alembic that referenced this issue May 1, 2017
mainly to fix java9 compatibility issues. See
clojure-emacs/refactor-nrepl#169 for details.

Also prepare forked release of alembic with group `clojure-emacs`
version 0.3.3
benedekfazekas added a commit that referenced this issue May 1, 2017
@benedekfazekas
Copy link
Member

new 2.3.0-snapshot is on clojars.

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