Skip to content

Commit ece019f

Browse files
committed
chore: add the scala-library project
1 parent 2e3e048 commit ece019f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ val `scala3-bootstrapped` = Build.`scala3-bootstrapped`
33
val `scala3-interfaces` = Build.`scala3-interfaces`
44
val `scala3-compiler` = Build.`scala3-compiler`
55
val `scala3-compiler-bootstrapped` = Build.`scala3-compiler-bootstrapped`
6+
val `scala-library-nonbootstrapped` = Build.`scala-library-nonbootstrapped`
67
val `scala3-library` = Build.`scala3-library`
78
val `scala3-library-bootstrapped` = Build.`scala3-library-bootstrapped`
89
val `scala3-library-bootstrappedJS` = Build.`scala3-library-bootstrappedJS`

project/Build.scala

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import scala.util.Properties.isJavaAtLeast
4141
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
4242
import org.scalajs.linker.interface.{ModuleInitializer, StandardConfig}
4343

44+
4445
object DottyJSPlugin extends AutoPlugin {
4546
import Build._
4647

@@ -1409,6 +1410,33 @@ object Build {
14091410
)
14101411
)
14111412

1413+
// ==============================================================================================
1414+
// =================================== SCALA STANDARD LIBRARY ===================================
1415+
// ==============================================================================================
1416+
1417+
/* Configuration of the org.scala-lang:scala-library:*.**.**-nonboostrapped project */
1418+
lazy val `scala-library-nonbootstrapped` = project.in(file("library"))
1419+
.settings(
1420+
name := "scala-library-nonbootstrapped",
1421+
moduleName := "scala-library",
1422+
version := dottyNonBootstrappedVersion,
1423+
versionScheme := Some("semver-spec"),
1424+
scalaVersion := referenceVersion, // nonbootstrapped artifacts are compiled with the reference compiler (already officially published)
1425+
crossPaths := false, // org.scala-lang:scala-library doesn't have a crosspath
1426+
// NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1427+
Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"),
1428+
// Add the source directories for the stdlib (non-boostrapped)
1429+
Compile / unmanagedSourceDirectories := Seq(baseDirectory.value / "src"),
1430+
Compile / unmanagedSourceDirectories += baseDirectory.value / "src-non-bootstrapped",
1431+
// Only publish compilation artifacts, no test artifacts
1432+
Compile / publishArtifact := true,
1433+
Test / publishArtifact := false,
1434+
// Do not allow to publish this project for now
1435+
publish / skip := true,
1436+
// Project specific target folder. sbt doesn't like having two projects using the same target folder
1437+
target := target.value / "scala-library-nonbootstrapped",
1438+
)
1439+
14121440
def dottyLibrary(implicit mode: Mode): Project = mode match {
14131441
case NonBootstrapped => `scala3-library`
14141442
case Bootstrapped => `scala3-library-bootstrapped`

0 commit comments

Comments
 (0)