Closed
Description
Currently, all of these things work differently, this bites us in #1289 because the same class strawman.collection.CollectionStrawMan5
is defined in two files:
- src/strawman/collections/CollectionStrawMan5.scala
- tests/run/colltest5/CollectionStrawMan5_1.scala
Which one gets picked varies:
- Under joined compilation of
tests/run/colltest5/CollectionStrawMan5_1.scala
and
tests/run/colltest5/CollectionTests_2.scala
, the source file that comes fromtests
is
prioritized over the classfile that comes fromsrc
- Under separate compilation, we pick the classfile that comes from
src
because it is on the java bootclasspath and the partest output directory is only on the scala classpath (-classpath
option passed to dotty, not to the JVM) - When running the run test we pick the classfile that comes from
test
and here understanding how the classpath is set becomes near impossible because of Stop relying on scala.tools.nsc.MainGenericRunner #1300
For now I've worked around this by changing the name of the class in the tests, but this still seriously needs to be more consistent, especially if we want to test separate compilation of parts of dotty.