Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
74303f1
chore: add the default entry point to the compiler
hamzaremmal Sep 4, 2025
09c28cb
add the git-hash to the manifest's attributes
hamzaremmal Sep 4, 2025
0dce16c
chore: fake the reference version to be 3.8.0 for sbt to work correctly
hamzaremmal Sep 4, 2025
6dde886
hide the access method in `::` but allow it to be public in the binary
hamzaremmal Sep 4, 2025
545fb35
chore: add test configuration for the non-bootstrapped compiler
hamzaremmal Sep 4, 2025
9145c90
fix: under the new library, `scala.Predef` has `summon` in source
hamzaremmal Sep 4, 2025
5220499
disable the test until #23773 is fixed
hamzaremmal Sep 4, 2025
e55df11
fix: make the order of the keys in the Map deterministic
hamzaremmal Sep 4, 2025
4e2f3e3
fix: remove `LazyList._empty` from the init checker
hamzaremmal Sep 4, 2025
247999e
chore: we are actually running the tasty and tasty cc stlib
hamzaremmal Sep 5, 2025
bb35d9c
temporarly disable the test suite for explicit nulls
hamzaremmal Sep 5, 2025
4966804
temporarily disable tests from #19084
hamzaremmal Sep 6, 2025
062ed68
fix: adapt `tests/neg-custom-args/captures/puretest.scala` to the cc …
hamzaremmal Sep 6, 2025
2bd4920
fix: adapt `tests/neg-custom-args/captures/i15772.scala` to the cc li…
hamzaremmal Sep 6, 2025
394325a
fix: adapt `tests/neg-custom-args/captures/use-capset.check` to cc st…
hamzaremmal Sep 6, 2025
f69cb45
temp: disable test for cc as I believe it shouldn't work in the first…
hamzaremmal Sep 6, 2025
7322dbd
ignore BashScriptsTests
hamzaremmal Sep 11, 2025
0b91fde
chore: add test-suite for the bootstrapped compiler
hamzaremmal Sep 13, 2025
13efd6a
chore: add CI jobs to test `scala3-compiler-bootstrapped` and `scala3…
hamzaremmal Sep 13, 2025
43c80f1
fix: create all the directories even if they are missing
hamzaremmal Sep 15, 2025
5d5436b
chore: ignore `BashExitCodeTests` for now
hamzaremmal Sep 15, 2025
5a43112
chore: add the resource folders
hamzaremmal Sep 15, 2025
d841883
chore: disable Scala.js tests for now
hamzaremmal Sep 15, 2025
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 @@ -149,7 +149,7 @@ jobs:
- name: Cmd Tests
run: |
./project/scripts/buildScalaBinary
./project/scripts/sbt ";scala3-bootstrapped/compile ;scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;scala3-compiler-bootstrapped/scala3CompilerCoursierTest:test"
./project/scripts/sbt ";scala3-bootstrapped/compile ;sbt-test/scripted scala2-compat/* ;scala3-compiler-bootstrapped/scala3CompilerCoursierTest:test"
./project/scripts/cmdTests
./project/scripts/bootstrappedOnlyCmdTests

Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
uses: actions/checkout@v5

- name: Test
run: sbt ";scala3-bootstrapped/compile; scala3-bootstrapped/testCompilation; scala3-presentation-compiler/test; scala3-language-server/test"
run: sbt ";scala3-bootstrapped/compile; scala3-presentation-compiler/test; scala3-language-server/test"
shell: cmd

- name: build binary
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/stdlib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,42 @@ jobs:
########################################### TEST JOBS ###########################################
#################################################################################################

test-scala3-compiler-nonbootstrapped:
runs-on: ubuntu-latest
needs: [scala3-compiler-nonbootstrapped, tasty-core-nonbootstrapped, scala-library-nonbootstrapped]
## The reference compiler generates wrong code for the non-bootstrapped stdlib, hence we cannot run tests on it at the moment
if: false
steps:
- name: Git Checkout
uses: actions/checkout@v5

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@v1
- name: Test `scala3-compiler-nonbootstrapped`
run: ./project/scripts/sbt scala3-compiler-nonbootstrapped-new/test

test-scala3-compiler-bootstrapped:
runs-on: ubuntu-latest
needs: [scala3-compiler-bootstrapped, tasty-core-bootstrapped, scala-library-bootstrapped, scala3-staging, scala3-tasty-inspector]
steps:
- name: Git Checkout
uses: actions/checkout@v5

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@v1
- name: Test `scala3-compiler-bootstrapped`
run: ./project/scripts/sbt scala3-compiler-bootstrapped-new/test

test-scala3-sbt-bridge-nonbootstrapped:
runs-on: ubuntu-latest
needs: [scala3-sbt-bridge-nonbootstrapped]
Expand Down
4 changes: 1 addition & 3 deletions compiler/src/dotty/tools/dotc/transform/init/Objects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@ class Objects(using Context @constructorOnly):
val MapNode_EmptyMapNode: Symbol = immutableMapNode.requiredValue("EmptyMapNode")
val immutableHashMap: Symbol = requiredModule("scala.collection.immutable.HashMap")
val HashMap_EmptyMap: Symbol = immutableHashMap.requiredValue("EmptyMap")
val immutableLazyList: Symbol = requiredModule("scala.collection.immutable.LazyList")
val LazyList_empty: Symbol = immutableLazyList.requiredValue("_empty")
val ManifestFactory_ObjectTYPE = defn.ManifestFactoryModule.requiredValue("ObjectTYPE")
val ManifestFactory_NothingTYPE = defn.ManifestFactoryModule.requiredValue("NothingTYPE")
val ManifestFactory_NullTYPE = defn.ManifestFactoryModule.requiredValue("NullTYPE")

val allowList: Set[Symbol] = Set(SetNode_EmptySetNode, HashSet_EmptySet, Vector_EmptyIterator, MapNode_EmptyMapNode, HashMap_EmptyMap, LazyList_empty,
val allowList: Set[Symbol] = Set(SetNode_EmptySetNode, HashSet_EmptySet, Vector_EmptyIterator, MapNode_EmptyMapNode, HashMap_EmptyMap,
ManifestFactory_ObjectTYPE, ManifestFactory_NothingTYPE, ManifestFactory_NullTYPE)

// ----------------------------- abstract domain -----------------------------
Expand Down
7 changes: 2 additions & 5 deletions compiler/test/dotty/Properties.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ object Properties {
/** dotty-interfaces jar */
def dottyInterfaces: String = sys.props("dotty.tests.classes.dottyInterfaces")

/** dotty-library jar */
def dottyLibrary: String = sys.props("dotty.tests.classes.dottyLibrary")

/** dotty-library-js jar */
def dottyLibraryJS: String = sys.props("dotty.tests.classes.dottyLibraryJS")

Expand All @@ -82,10 +79,10 @@ object Properties {
def scalaLibrary: String = sys.props("dotty.tests.classes.scalaLibrary")

// TODO: Remove this once we migrate the test suite
def usingScalaLibraryCCTasty: Boolean = false
def usingScalaLibraryCCTasty: Boolean = true

// TODO: Remove this once we migrate the test suite
def usingScalaLibraryTasty: Boolean = false
def usingScalaLibraryTasty: Boolean = true

/** scala-asm jar */
def scalaAsm: String = sys.props("dotty.tests.classes.scalaAsm")
Expand Down
4 changes: 4 additions & 0 deletions compiler/test/dotty/tools/dotc/CompilationTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class CompilationTests {
).checkCompile()

// Explicit nulls tests
@Ignore
@Test def explicitNullsNeg: Unit = {
implicit val testGroup: TestGroup = TestGroup("explicitNullsNeg")
aggregateTests(
Expand All @@ -214,6 +215,7 @@ class CompilationTests {
)
}.checkExpectedErrors()

@Ignore
@Test def explicitNullsPos: Unit = {
implicit val testGroup: TestGroup = TestGroup("explicitNullsPos")
aggregateTests(
Expand All @@ -233,11 +235,13 @@ class CompilationTests {
}
}

@Ignore
@Test def explicitNullsWarn: Unit = {
implicit val testGroup: TestGroup = TestGroup("explicitNullsWarn")
compileFilesInDir("tests/explicit-nulls/warn", explicitNullsOptions)
}.checkWarnings()

@Ignore
@Test def explicitNullsRun: Unit = {
implicit val testGroup: TestGroup = TestGroup("explicitNullsRun")
compileFilesInDir("tests/explicit-nulls/run", explicitNullsOptions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PathPicklingTest {
val out = JFile("out/testPathPickling")
val cwd = JFile("").getAbsolutePath()
delete(out)
out.mkdir()
out.mkdirs()

locally {
val ignorantProcessLogger = ProcessLogger(_ => ())
Expand Down
3 changes: 2 additions & 1 deletion compiler/test/dotty/tools/scripting/BashExitCodeTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ package scripting
import scala.language.unsafeNulls

import java.nio.file.Files, java.nio.charset.StandardCharsets.UTF_8
import org.junit.{ After, Test }
import org.junit.{ After, Test, Ignore }
import org.junit.Assert.assertEquals
import org.junit.Assume.assumeFalse
import org.junit.experimental.categories.Category

import ScriptTestEnv.*

@Ignore
@Category(Array(classOf[BootstrappedOnlyTests]))
class BashExitCodeTests:
private var myTmpDir: String | Null = null
Expand Down
1 change: 1 addition & 0 deletions compiler/test/dotty/tools/scripting/BashScriptsTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ object BashScriptsTests:
stdout.mkString("\n")


@Ignore
class BashScriptsTests:
import BashScriptsTests.*
// classpath tests managed by scripting.ClasspathTests.scala
Expand Down
8 changes: 2 additions & 6 deletions compiler/test/dotty/tools/vulpix/TestConfiguration.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ object TestConfiguration {
"-Xverify-signatures"
)

val basicClasspath = mkClasspath(List(
Properties.scalaLibrary,
Properties.dottyLibrary
))
val basicClasspath = mkClasspath(List(Properties.scalaLibrary))

val withCompilerClasspath = mkClasspath(List(
Properties.scalaLibrary,
Expand All @@ -37,7 +34,6 @@ object TestConfiguration {
Properties.jlineReader,
Properties.compilerInterface,
Properties.dottyInterfaces,
Properties.dottyLibrary,
Properties.tastyCore,
Properties.dottyCompiler
))
Expand Down Expand Up @@ -66,7 +62,7 @@ object TestConfiguration {

val commonOptions = Array("-indent") ++ checkOptions ++ noCheckOptions ++ yCheckOptions
val noYcheckCommonOptions = Array("-indent") ++ checkOptions ++ noCheckOptions
val defaultOptions = TestFlags(basicClasspath, commonOptions)
val defaultOptions = TestFlags(basicClasspath, commonOptions) and "-Yno-stdlib-patches"
val noYcheckOptions = TestFlags(basicClasspath, noYcheckCommonOptions)
val bestEffortBaselineOptions = TestFlags(basicClasspath, noCheckOptions)
val unindentOptions = TestFlags(basicClasspath, Array("-no-indent") ++ checkOptions ++ noCheckOptions ++ yCheckOptions)
Expand Down
2 changes: 1 addition & 1 deletion library/src/scala/collection/Map.scala
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ transparent trait MapOps[K, +V, +CC[_, _] <: IterableOps[_, AnyConstr, _], +C]
*/
protected trait GenKeySet { this: Set[K] =>
// CC note: this is unavoidable to make the KeySet pure.
private[MapOps] val allKeys = MapOps.this.keysIterator.toSet
private[MapOps] val allKeys = MapOps.this.keysIterator.toList
// We restore the lazy behavior in LazyKeySet
def iterator: Iterator[K] =
allKeys.iterator
Expand Down
4 changes: 3 additions & 1 deletion library/src/scala/collection/immutable/List.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import language.experimental.captureChecking

import scala.annotation.unchecked.uncheckedVariance
import scala.annotation.tailrec
import scala.annotation.publicInBinary
import mutable.{Builder, ListBuffer}
import scala.collection.generic.{CommonErrors, DefaultSerializable}
import scala.runtime.Statics.releaseFence
Expand Down Expand Up @@ -661,7 +662,8 @@ final case class :: [+A](override val head: A, private[scala] var next: List[A @
override def headOption: Some[A] = Some(head)
override def tail: List[A] = next

def next$access$1 = next
@publicInBinary
private[::] def next$access$1 = next

}

Expand Down
Loading
Loading