Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a78ae51

Browse files
chore: drop the old scala2-library-tasty projects (#23806)
2 parents ebe241e + c7d137d commit a78ae51

File tree

177 files changed

+16
-59164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+16
-59164
lines changed

‎.github/workflows/ci.yaml‎

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -157,59 +157,6 @@ jobs:
157157
run: |
158158
./project/scripts/sbt ";sjsSandbox/run ;sjsSandbox/test ;sjsJUnitTests/test ;set sjsJUnitTests/scalaJSLinkerConfig ~= switchToESModules ;sjsJUnitTests/test ;sjsCompilerTests/test"
159159
160-
- name: Test with Scala 2 library TASTy (fast)
161-
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
162-
163-
- name: Test with Scala 2 library with CC TASTy (fast)
164-
run: ./project/scripts/sbt ";set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty; scala2-library-cc/compile; scala2-library-cc-tasty/compile; scala3-bootstrapped/testCompilation i3"
165-
166-
test_scala2_library_tasty:
167-
runs-on: [self-hosted, Linux]
168-
container:
169-
image: lampepfl/dotty:2024年10月18日
170-
options: --cpu-shares 4096
171-
volumes:
172-
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
173-
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
174-
- ${{ github.workspace }}/../../cache/general:/root/.cache
175-
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
176-
|| (
177-
github.event_name == 'pull_request'
178-
&& contains(github.event.pull_request.body, '[test_scala2_library_tasty]')
179-
)
180-
|| (
181-
github.event_name == 'workflow_dispatch'
182-
&& github.repository == 'scala/scala3'
183-
)"
184-
185-
steps:
186-
- name: Set JDK 17 as default
187-
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH
188-
189-
- name: Reset existing repo
190-
run: |
191-
git config --global --add safe.directory $GITHUB_WORKSPACE
192-
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
193-
194-
- name: Checkout cleanup script
195-
uses: actions/checkout@v5
196-
197-
- name: Cleanup
198-
run: .github/workflows/cleanup.sh
199-
200-
- name: Git Checkout
201-
uses: actions/checkout@v5
202-
203-
- name: Add SBT proxy repositories
204-
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
205-
206-
- name: Test with Scala 2 library TASTy
207-
run: ./project/scripts/sbt ";set ThisBuild/Build.scala2Library := Build.Scala2LibraryTasty ;scala3-bootstrapped/test"
208-
209-
- name: Test with Scala 2 library with CC TASTy
210-
run: ./project/scripts/sbt ";set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty ;scala3-bootstrapped/test"
211-
212-
213160
test_windows_fast:
214161
runs-on: [self-hosted, Windows]
215162
if: "(
@@ -334,12 +281,7 @@ jobs:
334281

335282
- name: MiMa
336283
run: |
337-
./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues; scala2-library-bootstrapped/mimaReportBinaryIssues"
338-
339-
- name: TASTy MiMa
340-
run: |
341-
# This script cleans the compiler and recompiles it from scratch (keep as last run)
342-
./project/scripts/scala2-library-tasty-mima.sh
284+
./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues;"
343285
344286
community_build_a:
345287
runs-on: [self-hosted, Linux]

‎.github/workflows/test-cc.yml‎

Lines changed: 0 additions & 31 deletions
This file was deleted.

‎build.sbt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ val `scala3-language-server` = Build.`scala3-language-server`
2828
val `scala3-bench` = Build.`scala3-bench`
2929
val `scala3-bench-bootstrapped` = Build.`scala3-bench-bootstrapped`
3030
val `scala3-bench-micro` = Build.`scala3-bench-micro`
31-
val `scala2-library-bootstrapped` = Build.`scala2-library-bootstrapped`
32-
val `scala2-library-tasty` = Build.`scala2-library-tasty`
33-
val `scala2-library-cc` = Build.`scala2-library-cc`
34-
val `scala2-library-cc-tasty` = Build.`scala2-library-cc-tasty`
3531
val `tasty-core` = Build.`tasty-core`
3632
val `tasty-core-nonbootstrapped` = Build.`tasty-core-nonbootstrapped`
3733
val `tasty-core-bootstrapped-new` = Build.`tasty-core-bootstrapped-new`

‎compiler/test/dotty/Properties.scala‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,11 @@ object Properties {
8181
/** scala-library jar */
8282
def scalaLibrary: String = sys.props("dotty.tests.classes.scalaLibrary")
8383

84-
/** scala-library TASTy jar */
85-
def scalaLibraryTasty:Option[String] = sys.props.get("dotty.tests.tasties.scalaLibrary")
84+
// TODO: Remove this once we migrate the test suite
85+
def usingScalaLibraryCCTasty:Boolean = false
8686

87-
/** If we are using the scala-library TASTy jar */
88-
def usingScalaLibraryTasty: Boolean = scalaLibraryTasty.isDefined
89-
/** If we are using the scala-library TASTy jar */
90-
91-
def usingScalaLibraryCCTasty: Boolean = scalaLibraryTasty.exists(_.contains("scala2-library-cc-tasty"))
87+
// TODO: Remove this once we migrate the test suite
88+
def usingScalaLibraryTasty: Boolean = false
9289

9390
/** scala-asm jar */
9491
def scalaAsm: String = sys.props("dotty.tests.classes.scalaAsm")

‎compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import scala.language.unsafeNulls
77
import org.junit.{ Test, BeforeClass, AfterClass }
88
import org.junit.Assert._
99
import org.junit.Assume._
10+
import org.junit.Ignore
1011
import org.junit.experimental.categories.Category
1112

1213
import scala.concurrent.duration._
@@ -131,7 +132,7 @@ class BootstrappedOnlyCompilationTests {
131132
aggregateTests(tests*).checkRuns()
132133
}
133134

134-
@Test def runScala2LibraryFromTasty: Unit = {
135+
@Ignore@Test def runScala2LibraryFromTasty: Unit = {
135136
implicit val testGroup: TestGroup = TestGroup("runScala2LibraryFromTasty")
136137
// These tests recompile the entire scala2-library from TASTy,
137138
// they are resource intensive and should not run alongside other tests to avoid timeouts

‎compiler/test/dotty/tools/vulpix/TestConfiguration.scala‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ object TestConfiguration {
2525
"-Xverify-signatures"
2626
)
2727

28-
val basicClasspath = mkClasspath(
29-
Properties.scalaLibraryTasty.toList ::: List(
28+
val basicClasspath = mkClasspath(List(
3029
Properties.scalaLibrary,
3130
Properties.dottyLibrary
3231
))
3332

34-
val withCompilerClasspath = mkClasspath(
35-
Properties.scalaLibraryTasty.toList ::: List(
33+
val withCompilerClasspath = mkClasspath(List(
3634
Properties.scalaLibrary,
3735
Properties.scalaAsm,
3836
Properties.jlineTerminal,

‎docs/_docs/contributing/testing.md‎

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -162,41 +162,6 @@ To run `testCompilation` on a bootstrapped Dotty compiler, use
162162
Some tests can only be run in bootstrapped compilers; that includes all tests
163163
with `with-compiler` in their name.
164164

165-
### Scala 2 library TASTy tests
166-
167-
Usually we use the Scala 2 library JAR (with classfiles) generated by Scala 2. We can
168-
also use a special version of the library that we generate with only TASTy files. This
169-
JAR is added to the classpath before the Scala 2 library JAR. This allows the compiler
170-
to load the TASTy and the runtime to load the original classfiles.
171-
172-
The library is compiled in `scala2-library-bootstrapped` with TASTy and classfiles.
173-
These classfiles should not be used. The `scala2-library-tasty` project repackages the
174-
JAR `scala2-library-bootstrapped` to only keep TASTy files.
175-
176-
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`).
177-
178-
```
179-
$ sbt
180-
> set ThisBuild/Build.scala2Library := Build.Scala2LibraryTasty
181-
> scala3-compiler-bootstrapped/scalac MyFile.scala
182-
> scala3-compiler-bootstrapped/test
183-
> scala3-compiler-bootstrapped/testCompilation
184-
```
185-
186-
By default `scala2Library` is set to `Scala2LibraryJar`. This setting can be set to stop using the Scala 2 library TASTy.
187-
```
188-
> set ThisBuild/Build.scala2Library := Build.Scala2LibraryJar
189-
```
190-
191-
#### Scala 2 library with CC TASTy tests
192-
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`).
193-
194-
We can also enable this library in the build using the SBT setting `useScala2LibraryTasty`.
195-
```
196-
> set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty
197-
```
198-
199-
200165
### From TASTy tests
201166

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /