Comments (2)
Found the issue. Don't think it can be easily fixed (but I am working on a completely different approach). This issue happens when we use ScalaTest's command line runner from CBT. CBT does not have one flat classloader for everything, but builds a DAG of classloaders mirroring the dependencies. At the point we get to ScalaTest, the classloader contains only ScalaTest and it's dependencies. But ScalaTest assumes that it can find the classes to be tested on it's own classloader. ( See this https://github.com/scalatest/scalatest/blob/ed93bffc596f5e12a42396d18045bf28543bfd35/scalatest/src/main/scala/org/scalatest/tools/Runner.scala#L1524 ). In a way that does make sense for a command line runner. ScalaTest does support -R to load classes from somewhere else and they do end up in ScalaTest's classloader (see https://github.com/scalatest/scalatest/blob/ed93bffc596f5e12a42396d18045bf28543bfd35/scalatest/src/main/scala/org/scalatest/tools/Runner.scala#L1558) but none of their dependencies do, so that doesn't really help either. Closing this now, but I am currently working on ScalaTest support in a different way.
from cbt.
cc @bvenners this is what I mentioned during nescala. Found the cause now as described above.
from cbt.
Related Issues (20)
- remove support for top-level source files
- Does CBT support cross building against multiple scala-js/scala-native versions? HOT 2
- speed up jar generation HOT 2
- please document defaultScalaVersion
- Handle dependency import scope HOT 3
- Compile error when trying to use cbt on Windows HOT 2
- Java 9 support HOT 1
- cbt eval throws NPE when defaultScalaVersion is overridden HOT 1
- Scalafix's scalahost dependency should depend on scala version
- improve intellij plugin getting started & docs HOT 8
- scalariform-example fails on Windows 10
- java.lang.NoClassDefFoundError: scala/Option in 'resources-example'
- NPE when compiling simple-fixed (classloader)
- hk2-locator transitive dependency crashes cbt's resolver
- Incorrect finding of $CBT_HOME when cbt symlink is relative HOT 1
- Existence of mains in a class with a parameterful constructor leads to cbt fail HOT 1
- When I type wrong subcommand, both exception stack trace and nice answer is shown
- org.scalajs.core.ir.IRVersionNotSupportedException error for scala.js HOT 1
- NumberFormatException when running cbt in direct mode HOT 1
- Fails to find nailgun jar when it's placed in /usr/share/nailgun/lib/nailgun.jar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbt.