Skip to content

Revert "chore: add scala-library-cc project" #23677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 0 additions & 18 deletions .github/workflows/stdlib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,24 +219,6 @@ jobs:
- name: Compile `scala3-tasty-inspector`
run: ./project/scripts/sbt scala3-tasty-inspector-new/compile

scala-library-cc:
runs-on: ubuntu-latest
needs : [scala3-compiler-nonbootstrapped, scala3-sbt-bridge-nonbootstrapped, scala-library-nonbootstrapped, scala3-library-nonbootstrapped]
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'sbt'

- uses: sbt/setup-sbt@v1
- name: Compile `scala-library-cc`
run: ./project/scripts/sbt scala-library-cc/compile

#################################################################################################
########################################### TEST JOBS ###########################################
#################################################################################################
Expand Down
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ val `scala-library-bootstrapped` = Build.`scala-library-bootstrapped`
val `scala3-library-bootstrapped-new` = Build.`scala3-library-bootstrapped-new`
val `scala3-library` = Build.`scala3-library`
val `scala3-library-bootstrapped` = Build.`scala3-library-bootstrapped`
val `scala-library-cc` = Build.`scala-library-cc`
val `scala3-library-bootstrappedJS` = Build.`scala3-library-bootstrappedJS`
val `scala3-sbt-bridge` = Build.`scala3-sbt-bridge`
val `scala3-sbt-bridge-bootstrapped` = Build.`scala3-sbt-bridge-bootstrapped`
Expand Down
67 changes: 0 additions & 67 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1647,73 +1647,6 @@ object Build {
},
)

/* Configuration of the org.scala-lang:scala-library-cc:*.**.**-bootstrapped */
lazy val `scala-library-cc` = project.in(file("library"))
.enablePlugins(ScalaLibraryPlugin)
.settings(
name := "scala-library-cc",
moduleName := "scala-library-cc",
version := dottyVersion,
versionScheme := Some("semver-spec"),
// sbt defaults to scala 2.12.x and metals will report issues as it doesn't consider the project a scala 3 project
// (not the actual version we use to compile the project)
scalaVersion := referenceVersion,
crossPaths := true,
// Add the source directories for the stdlib (non-boostrapped)
Compile / unmanagedSourceDirectories := Seq(baseDirectory.value / "src"),
Compile / unmanagedSourceDirectories += baseDirectory.value / "src-bootstrapped",
// NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"),
Compile / scalacOptions += "-Yno-stdlib-patches",
Compile / scalacOptions ++= Seq(
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
"-sourcepath", (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File.pathSeparator),
),
// Make sure that the produced artifacts have the minimum JVM version in the bytecode
Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion),
Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion),
// Packaging configuration of the stdlib
Compile / packageBin / publishArtifact := true,
Compile / packageDoc / publishArtifact := false,
Compile / packageSrc / publishArtifact := true,
// Only publish compilation artifacts, no test artifacts
Test / publishArtifact := false,
// Do not allow to publish this project for now
publish / skip := false,
// Project specific target folder. sbt doesn't like having two projects using the same target folder
target := target.value / "scala-library-cc",
// we need to have the `scala-library` artifact in the classpath for `ScalaLibraryPlugin` to work
// this was the only way to not get the artifact evicted by sbt. Even a custom configuration didn't work
// NOTE: true is the default value, just making things clearer here
managedScalaInstance := true,
// Configure the nonbootstrapped compiler
scalaInstance := {
val externalCompilerDeps = (`scala3-compiler-nonbootstrapped` / Compile / externalDependencyClasspath).value.map(_.data).toSet

// IMPORTANT: We need to use actual jars to form the ScalaInstance and not
// just directories containing classfiles because sbt maintains a cache of
// compiler instances. This cache is invalidated based on timestamps
// however this is only implemented on jars, directories are never
// invalidated.
val tastyCore = (`tasty-core-nonbootstrapped` / Compile / packageBin).value
val scalaLibrary = (`scala-library-nonbootstrapped` / Compile / packageBin).value
val scala3Interfaces = (`scala3-interfaces` / Compile / packageBin).value
val scala3Compiler = (`scala3-compiler-nonbootstrapped` / Compile / packageBin).value

Defaults.makeScalaInstance(
dottyNonBootstrappedVersion,
libraryJars = Array(scalaLibrary),
allCompilerJars = Seq(tastyCore, scala3Interfaces, scala3Compiler) ++ externalCompilerDeps,
allDocJars = Seq.empty,
state.value,
scalaInstanceTopLoader.value
)
},
scalaCompilerBridgeBinaryJar := {
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
},
)

// ==============================================================================================
// =================================== SCALA STANDARD LIBRARY ===================================
// ==============================================================================================
Expand Down
Loading