Welcome! Please see the About page for a little more info on how this works.

0 votes
in Compiler by
edited by

I have .m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1-sources.jar in the classpath, which I do in order to enable (custom) IDE tooling.

Doing so causes the following warning when launching lein repl:

/Users/vemv/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1-sources.jar(clojure/asm/SymbolTable.java):49: error: cannot access Symbol
  private static class Entry extends Symbol {
                                     ^
  bad source file: /Users/vemv/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1-sources.jar(clojure/asm/Symbol.java)
    file does not contain class clojure.asm.Symbol
    Please remove or make sure it appears in the correct subdirectory of the sourcepath.

In contrast, no other "sources" .jar causes any warning. I can have up to hundreds of such "sources" jars.

Perhaps this file has some minor/vestigial issue, such as something related to privacy modifiers, package structure, etc?

If it was harmless to do, this would seem nice to fix particularly when a single class in a single lib is the only instance of this issue (vs. hundreds of other .jars)

As a reference, I also found another person encountering the same issue: https://clojurians-log.clojureverse.org/clojure/2019-06-23/1561323947.040200

By the way, while this might look as a javac byproduct, I'm almost positively sure lein repl is not implicitly invoking javac. Documentation states so: https://github.com/technomancy/leiningen/blob/0f456829a8b21335aa86390f3ee3d0dcc68410d6/doc/MIXED_PROJECTS.md#java-source-compilation

I'm using JDK8.

1 Answer

0 votes
by
 
Best answer

The issue turned out to be subtler than I thought as it's a specific tool that is causing it.

I opened an issue here: https://github.com/clojure-emacs/refactor-nrepl/issues/290

...