Scan with Scala library in classpath gives error about different superclasses
See original GitHub issueSee the attached fast-classpath-scanner-scala.tar.gz file containing a Gradle project which runs a test attempting to scan with the Scala library version 2.12.4 in the classpath.
The archive includes a verbose.log
file from my local run (on a Mac). The exception message is:
Caused by: java.lang.IllegalArgumentException: A class and its auxiliary class have different superclasses: class extends scala.collection.generic.SeqFactory<scala.collection.immutable.Stack> implements scala.Serializable ; <A> class extends scala.collection.AbstractSeq<A> implements scala.collection.immutable.LinearSeq<A>, scala.collection.LinearSeqOptimized<A, scala.collection.immutable.Stack<A>>, scala.Serializable
You should be able to run yourself using:
tar xvfz fast-classpath-scanner-scala.tar.gz
cd fast-classpath-scanner-scala
./gradlew build
The test sends System.out/System.err to the verbose.log
file.
For now, I’ll try to work around the issue by determining how to exclude certain packages or files from scanning.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Does Java classpath different order give "No Method found ...
It certainly can, if the same class file is present in different classpath entries. For example, if your classpath is: java -cp a.jar:b.jar ......
Read more >No 'scala-library*.jar' in Scala compiler classpath in ... - GitHub
In a mill project: mill mill.scalalib.GenIdeaModule/idea Then open idea and set scala project, and build. It reports: Error:scalac: No 'scala-library*.jar' ...
Read more >Authoring Tasks - Gradle User Manual
The following shows how to access a task by path. This is not a recommended practice anymore as it breaks task configuration avoidance...
Read more >Apache HBase ™ Reference Guide
Use the scan command to scan the table for data. ... In the next sections we give a quick overview of other modes...
Read more >With IntelliJ 2017.02.5, receiving error "Error:scalac: No 'scala ...
Creating a brand new Scala SBT project using IntelliJ 2017.2.5 (Scala Plugin 2017.2.11) is producing the following error when I attempt...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ryan-gustafson @pshirshov this is fixed in 2.19.0.
You will now get
pkg.Class
for a base class in Scala,pkg.Class$
for a companion object, andpkg.Class$class
for a trait methods class (i.e. these are no longer merged intopkg.Class
).@ryan-gustafson I just pushed out version 2.20.1, with support for explicitly blacklisting classpath elements based on a string match criterion:
https://github.com/lukehutch/fast-classpath-scanner/releases/tag/fast-classpath-scanner-2.20.1
This will work better than the code snippet I gave in #190, since it applies the filtering before extracting jars-within-jars (in the case that you have classpath elements like
path/to/jar1.jar!/BOOT-INF/lib/jar2.jar
).(However, hopefully you don’t need to skip directories now that Scala scanning is fixed.)