Skip to content

Commit eda9562

Browse files
committed
chore: add org.scala-lang:scala3-library_sjs1_3
1 parent 3f8a26c commit eda9562

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

.github/workflows/stdlib.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,26 @@ jobs:
242242
- name: Compile `scala-library` for Scala.js
243243
run: ./project/scripts/sbt scala-library-sjs/compile
244244

245+
scala3-library-sjs:
246+
runs-on: ubuntu-latest
247+
## Add when we add support for caching here
248+
##needs: [scala-library-sjs]
249+
steps:
250+
- name: Git Checkout
251+
uses: actions/checkout@v5
252+
253+
- name: Set up JDK 17
254+
uses: actions/setup-java@v4
255+
with:
256+
distribution: 'temurin'
257+
java-version: 17
258+
cache: 'sbt'
259+
- uses: sbt/setup-sbt@v1
260+
- name: Compile `scala3-staging`
261+
run: ./project/scripts/sbt scala3-staging-new/compile
262+
- name: Compile `scala3-library` for Scala.js
263+
run: ./project/scripts/sbt scala3-library-sjs/compile
264+
245265
#################################################################################################
246266
########################################### TEST JOBS ###########################################
247267
#################################################################################################

build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ val `scala3-compiler-nonbootstrapped` = Build.`scala3-compiler-nonbootstrapped`
88
val `scala3-compiler-bootstrapped-new` = Build.`scala3-compiler-bootstrapped-new`
99
val `scala3-compiler-bootstrapped` = Build.`scala3-compiler-bootstrapped`
1010
val `scala-library-sjs` = Build.`scala-library-sjs`
11+
val `scala3-library-sjs` = Build.`scala3-library-sjs`
1112
val `scala-library-nonbootstrapped` = Build.`scala-library-nonbootstrapped`
1213
val `scala3-library-nonbootstrapped` = Build.`scala3-library-nonbootstrapped`
1314
val `scala-library-bootstrapped` = Build.`scala-library-bootstrapped`

project/Build.scala

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ object Build {
14511451
lazy val `scala3-bootstrapped-new` = project
14521452
.aggregate(`scala3-interfaces`, `scala3-library-bootstrapped-new` , `scala-library-bootstrapped`,
14531453
`tasty-core-bootstrapped-new`, `scala3-compiler-bootstrapped-new`, `scala3-sbt-bridge-bootstrapped`,
1454-
`scala3-staging-new`, `scala3-tasty-inspector-new`, `scala-library-sjs`)
1454+
`scala3-staging-new`, `scala3-tasty-inspector-new`, `scala-library-sjs`, `scala3-library-sjs`)
14551455
.settings(
14561456
name := "scala3-bootstrapped",
14571457
moduleName := "scala3-bootstrapped",
@@ -1929,6 +1929,46 @@ object Build {
19291929
},
19301930
)
19311931

1932+
/* Configuration of the org.scala-lang:scala3-library_sjs1_3:*.**.**-bootstrapped project */
1933+
lazy val `scala3-library-sjs` = project.in(file("library-js"))
1934+
.dependsOn(`scala-library-sjs`)
1935+
.settings(
1936+
name := "scala3-library-sjs",
1937+
moduleName := "scala3-library_sjs1",
1938+
version := dottyVersion,
1939+
versionScheme := Some("semver-spec"),
1940+
// sbt defaults to scala 2.12.x and metals will report issues as it doesn't consider the project a scala 3 project
1941+
// (not the actual version we use to compile the project)
1942+
scalaVersion := referenceVersion,
1943+
crossPaths := true, // org.scala-lang:scala3-library_sjs1 has a crosspath
1944+
// Do not depend on the `org.scala-lang:scala3-library` automatically, we manually depend on `scala-library-bootstrapped`
1945+
autoScalaLibrary := false,
1946+
// Drop all the scala tools in this project, so we can never generate any bytecode, or documentation
1947+
managedScalaInstance := false,
1948+
// This Project only has a dependency to `org.scala-js:scalajs-scalalib:*.**.**-bootstrapped`
1949+
Compile / sources := Seq(),
1950+
Compile / resources := Seq(),
1951+
Test / sources := Seq(),
1952+
Test / resources := Seq(),
1953+
// Bridge the common task to call the ones of the actual library project
1954+
Compile / compile := (`scala-library-sjs` / Compile / compile).value,
1955+
Compile / doc := (`scala-library-sjs` / Compile / doc).value,
1956+
Compile / run := (`scala-library-sjs` / Compile / run).evaluated,
1957+
Test / compile := (`scala-library-sjs` / Test / compile).value,
1958+
Test / doc := (`scala-library-sjs` / Test / doc).value,
1959+
Test / run := (`scala-library-sjs` / Test / run).evaluated,
1960+
// Packaging configuration of the stdlib
1961+
Compile / packageBin / publishArtifact := true,
1962+
Compile / packageDoc / publishArtifact := false,
1963+
Compile / packageSrc / publishArtifact := true,
1964+
// Only publish compilation artifacts, no test artifacts
1965+
Test / publishArtifact := false,
1966+
// Do not allow to publish this project for now
1967+
publish / skip := false,
1968+
// Project specific target folder. sbt doesn't like having two projects using the same target folder
1969+
target := target.value / "scala3-library",
1970+
)
1971+
19321972
// ==============================================================================================
19331973
// ===================================== TASTY CORE LIBRARY =====================================
19341974
// ==============================================================================================

0 commit comments

Comments
 (0)