Skip to content

cider.nrepl.middleware.util.java/source-info does not work with version 0.17.0-SNAPSHOT #482

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

Closed
peterwang opened this issue Jan 22, 2018 · 4 comments

Comments

@peterwang
Copy link

peterwang commented Jan 22, 2018

Expected behavior

user> (:file (cider.nrepl.middleware.util.java/source-info 'clojure.lang.Compiler))
clojure/lang/Compiler.java

Actual behavior

user> (:file (cider.nrepl.middleware.util.java/source-info 'clojure.lang.Compiler))
nil

Steps to reproduce the problem

  1. install latest cider from melpa, (in my case the version is: cider 20180121.1106)
  2. do cider-jack-in in a clojure project
  3. run the above commands in the REPL

Environment & Version information

file: ~/.m2/repository/cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-SNAPSHOT.jar:META-INF/maven/cider/cider-nrepl/pom.properties

#Leiningen
#Thu Jan 11 23:48:06 EET 2018
version=0.17.0-SNAPSHOT
revision=cdbe2ca8502baa2cdbe956e40bd908a9d2aa2507
groupId=cider
artifactId=cider-nrepl

cider-nrepl version

cider-nrepl-0.17.0-SNAPSHOT.jar

Java version

CLJ cljapp@localhost:25040 (Java 1.8.0_151, Clojure 1.9.0, nREPL 0.2.13)

Operating system

CentOS release 6.5 (Final)
Linux devbox 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

@peterwang
Copy link
Author

I had a look at the change log. It seems that this commit 47cb956 caused the issue.
There are breaking changes between dynapath 0.2.5 and dynapath 1.0.0, specifically:
https://github.com/tobias/dynapath#note-on-urlclassloader

@bbatsov
Copy link
Member

bbatsov commented Jan 24, 2018

Nice research!

I wonder why no one else noticed this so far, and also why this is not raising any errors if the function is missing now.

Can you confirm things work as expect with 0.2.5 in https://github.com/clojure-emacs/orchard (in CIDER 0.17 we're splitting cider-nrepl into a core functionality library and a middleware library (cider-nrepl itself).

I also curious what we should do about Java 9 - I guess we should just copy the approach Boot took. Would you be interested in working on this?

bbatsov added a commit to clojure-emacs/orchard that referenced this issue Jan 24, 2018
dynapath 1.0 breaks the java source-info functionality as dynapath removed
the functionality we needed due to incompatibility with Java 9.

That's just a temp fix and has to be addressed properly afterwards.
@bbatsov
Copy link
Member

bbatsov commented Jan 24, 2018

I've reverted the dep update, but this needs to be fixed differently, as it's going to break in the next release of Java.

@bbatsov
Copy link
Member

bbatsov commented Feb 23, 2018

@peterwang Can you verify this is fixed for you?

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