Skip to content

Have a consistent classpath order between partest joined compilation, partest separate compilation, partest run tests, dotc and dotr #1301

Closed
@smarter

Description

@smarter

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:

  1. Under joined compilation of
    tests/run/colltest5/CollectionStrawMan5_1.scala and
    tests/run/colltest5/CollectionTests_2.scala, the source file that comes from tests is
    prioritized over the classfile that comes from src
  2. 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)
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions