Skip to content

Commit

Permalink
Fix Scala 2 library TASTy testing docs
Browse files Browse the repository at this point in the history
Update docs to align with update in scala#18967.
  • Loading branch information
nicolasstucki authored and odersky committed Jan 6, 2024
1 parent 65e839f commit 4189192
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/_docs/contributing/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,26 @@ We can enable this library in the build using the SBT setting `useScala2LibraryT

```
$ sbt
> set ThisBuild/Build.useScala2LibraryTasty := true
> set ThisBuild/Build.scala2Library := Build.Scala2LibraryTasty
> scala3-compiler-bootstrapped/scalac MyFile.scala
> scala3-compiler-bootstrapped/test
> scala3-compiler-bootstrapped/testCompilation
```

By default `scala2Library` is set to `Scala2LibraryJar`. This setting can be set to stop using the Scala 2 library TASTy.
```
> set ThisBuild/Build.scala2Library := Build.Scala2LibraryJar
```

#### Scala 2 library with CC TASTy tests
These follow the same structure as the _Scala 2 library TASTy tests_ but add captured checked signatures to the library. The library is compiled in `scala2-library-cc` (instead of `scala2-library-bootstrapped`) and `scala2-library-cc-tasty` (instead of `scala2-library-cc-tasty`).

We can also enable this library in the build using the SBT setting `useScala2LibraryTasty`.
```
> set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty
```


### From TASTy tests

`testCompilation` has an additional mode to run tests that compile code from a `.tasty` file.
Expand Down

0 comments on commit 4189192

Please sign in to comment.