You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can override the sources of the standard library with cc annotation
in this project and generate a TASTy version of the standard library.
Usage:
```
sbt> set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty
sbt> scala3-bootstrapped/testCompilation
sbt> scala3-bootstrapped/test
sbt> scala3-bootstrapped/run ...
```
```
sbt> scala2-library-cc/run diff
sbt> scala2-library-cc/run diff scala/Option.scala
sbt> scala2-library-cc/run diff scala/collection/immutable
```
### Current limitations
#### Empty self types in library
We need to override `Function1` and `PartialFunction` to remove their
empty self type. These cause some problem with capture checking. We need
to fix these cases. I will open an issue once we have a way to reproduce
it with this PR.
#### Cannot use the TASTy jar yet
There is a bug when we try to class load the captured checked library
from TASTy. These are due to some cyclic reference while unpickling the
TASTy.
<del>The current theory is that this due to the CC annotations in the
top-level classes.
If this is the case, we can fix this issue by adding these language
features as TASTy attributes (see #19033).</del>
This was wrong or only part of the problems. The current issue can be
reproduced with #19115.
run: ./project/scripts/sbt ";set ThisBuild/Build.useScala2LibraryTasty := true ;scala3-bootstrapped/testCompilation i5; scala3-bootstrapped/testCompilation tests/run/typelevel-peano.scala; scala3-bootstrapped/testOnly dotty.tools.backend.jvm.DottyBytecodeTests" # only test a subset of test to avoid doubling the CI execution time
148
+
run: ./project/scripts/sbt ";set ThisBuild/Build.scala2Library := Build.Scala2LibraryTasty ;scala3-bootstrapped/testCompilation i5; scala3-bootstrapped/testCompilation tests/run/typelevel-peano.scala; scala3-bootstrapped/testOnly dotty.tools.backend.jvm.DottyBytecodeTests" # only test a subset of test to avoid doubling the CI execution time
149
+
150
+
- name: Test with Scala 2 library with CC TASTy (fast)
151
+
run: ./project/scripts/sbt ";set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty ;scala2-library-tasty/compile" # TODO test all the test configurations in non-CC library (currently disabled due to bug while loading the library)
0 commit comments