Skip to content

Move scala2-library-tasty-tests/run tests to tests/run/scala2-library-test #19383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
9 changes: 1 addition & 8 deletions docs/_docs/contributing/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
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

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)
Expand Down Expand Up @@ -74,4 +75,4 @@ object HelloWorld:
new collection.ArrayOps[String](Array[String]("foo")).exists(x => true)
}

end HelloWorld
end Test