Skip to content

Commit

Permalink
Fix Scala 2 library TASTy testing docs (#19366)
Browse files Browse the repository at this point in the history
Update docs to align with update in #18967.


[skip ci]
  • Loading branch information
bishabosha authored Jan 4, 2024
2 parents 4ee029b + 2cf6955 commit 2746ee8
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 2746ee8

Please sign in to comment.