diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index acfd1b978886..2cbce1766a0b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -136,7 +136,7 @@ jobs: - name: Cmd Tests run: | - ./project/scripts/sbt ";dist/pack; scala3-bootstrapped/compile; scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;scala2-library-tasty-tests/run ;scala2-library-tasty-tests/test; scala3-compiler-bootstrapped/scala3CompilerCoursierTest:test" + ./project/scripts/sbt ";dist/pack; scala3-bootstrapped/compile; scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/*; scala2-library-tasty-tests/test; scala3-compiler-bootstrapped/scala3CompilerCoursierTest:test" ./project/scripts/cmdTests ./project/scripts/bootstrappedOnlyCmdTests @@ -547,7 +547,7 @@ jobs: - name: Test run: | - ./project/scripts/sbt ";dist/pack ;scala3-bootstrapped/compile ;scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;scala2-library-tasty-tests/run ;scala2-library-tasty-tests/test" + ./project/scripts/sbt ";dist/pack ;scala3-bootstrapped/compile ;scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/*; scala2-library-tasty-tests/test" ./project/scripts/cmdTests ./project/scripts/bootstrappedOnlyCmdTests diff --git a/docs/_docs/contributing/testing.md b/docs/_docs/contributing/testing.md index 84ce4053f124..3f3e5421b9bd 100644 --- a/docs/_docs/contributing/testing.md +++ b/docs/_docs/contributing/testing.md @@ -164,14 +164,7 @@ to load the TASTy and the runtime to load the original classfiles. The library is compiled in `scala2-library-bootstrapped` with TASTy and classfiles. These classfiles should not be used. The `scala2-library-tasty` project repackages the -JAR `scala2-library-bootstrapped` to only keep TASTy files. The `scala2-library-tasty-tests` provides some basic tests using the library TASTy JAR. - -``` -$ sbt -> scala2-library-tasty/compile -> scala2-library-tasty-tests/run -> scala2-library-tasty-tests/test -``` +JAR `scala2-library-bootstrapped` to only keep TASTy files. We can enable this library in the build using the SBT setting `useScala2LibraryTasty`. This setting can only be used by bootstrapped compiler tests and is currently only supported for `test` (or `testCompilation`) and `scalac` (or `run`). diff --git a/scala2-library-tasty-tests/src/Main.scala b/tests/run/scala2-library-test/Main.scala similarity index 92% rename from scala2-library-tasty-tests/src/Main.scala rename to tests/run/scala2-library-test/Main.scala index b33219271201..0629d5de6b7e 100644 --- a/scala2-library-tasty-tests/src/Main.scala +++ b/tests/run/scala2-library-test/Main.scala @@ -1,4 +1,5 @@ -package hello +// This tests language features that have a special handling in the Scala 2 library TASTy. +// These should behave the same way from if compiled against the Scala 2 library class files ot TASTy. import scala.util.* import scala.compiletime.testing.typeChecks @@ -6,7 +7,7 @@ import scala.compiletime.testing.typeChecks enum Color: case Red, Green, Blue -object HelloWorld: +object Test: def main(args: Array[String]): Unit = { println("hello 2.13 library bootstrapped") println(Color.Red) @@ -74,4 +75,4 @@ object HelloWorld: new collection.ArrayOps[String](Array[String]("foo")).exists(x => true) } -end HelloWorld +end Test diff --git a/scala2-library-tasty-tests/src/UnrolledBufferTest.scala b/tests/run/scala2-library-test/UnrolledBufferTest.scala similarity index 100% rename from scala2-library-tasty-tests/src/UnrolledBufferTest.scala rename to tests/run/scala2-library-test/UnrolledBufferTest.scala