Skip to content

Commit 900411e

Browse files
Backport "fix: allow to generate the documentation of the stdlib" to 3.8.0 (#24618)
Backports #24574 to Scala 3.8.0-RC3
1 parent 642ad97 commit 900411e

File tree

2 files changed

+35
-14
lines changed

2 files changed

+35
-14
lines changed

.github/workflows/stdlib.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,3 +721,25 @@ jobs:
721721
- name: Run Community Build C
722722
run: |
723723
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
724+
725+
#################################################################################################
726+
######################################## GENERATE DOCS ##########################################
727+
#################################################################################################
728+
729+
scala-library-docs:
730+
runs-on: ubuntu-latest
731+
needs : [scala-library-bootstrapped, scaladoc]
732+
steps:
733+
- name: Git Checkout
734+
uses: actions/checkout@v6
735+
736+
- name: Set up JDK 17
737+
uses: actions/setup-java@v5
738+
with:
739+
distribution: 'temurin'
740+
java-version: 17
741+
cache: 'sbt'
742+
743+
- uses: sbt/setup-sbt@v1
744+
- name: Generate Documentation of the Standard Library
745+
run: ./project/scripts/sbt scala-library-bootstrapped/doc

project/Build.scala

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,10 +1950,10 @@ object Build {
19501950
Compile / unmanagedSourceDirectories := Seq(baseDirectory.value / "src"),
19511951
Compile / unmanagedSourceDirectories += baseDirectory.value / "src-non-bootstrapped",
19521952
// NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1953-
Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"),
1954-
Compile / scalacOptions += "-Yno-stdlib-patches",
1955-
Compile / scalacOptions += "-Yexplicit-nulls",
1956-
Compile / scalacOptions ++= Seq(
1953+
Compile / compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"),
1954+
Compile / compile / scalacOptions += "-Yno-stdlib-patches",
1955+
Compile / compile / scalacOptions += "-Yexplicit-nulls",
1956+
Compile / compile / scalacOptions ++= Seq(
19571957
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
19581958
"-sourcepath", (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File.pathSeparator),
19591959
),
@@ -2031,7 +2031,6 @@ object Build {
20312031
lazy val `scala-library-bootstrapped` = project.in(file("library"))
20322032
.enablePlugins(ScalaLibraryPlugin)
20332033
.settings(publishSettings)
2034-
.settings(disableDocSetting) // TODO now produces empty JAR to satisfy Sonatype, see https://github.com/scala/scala3/issues/24434
20352034
.settings(
20362035
name := "scala-library-bootstrapped",
20372036
moduleName := "scala-library",
@@ -2051,10 +2050,10 @@ object Build {
20512050
Compile / unmanagedSourceDirectories := Seq(baseDirectory.value / "src"),
20522051
Compile / unmanagedSourceDirectories += baseDirectory.value / "src-bootstrapped",
20532052
// NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
2054-
Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"),
2055-
Compile / scalacOptions += "-Yno-stdlib-patches",
2056-
Compile / scalacOptions += "-Yexplicit-nulls",
2057-
Compile / scalacOptions ++= Seq(
2053+
Compile / compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions"),
2054+
Compile / compile / scalacOptions += "-Yno-stdlib-patches",
2055+
Compile / compile / scalacOptions += "-Yexplicit-nulls",
2056+
Compile / compile / scalacOptions ++= Seq(
20582057
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
20592058
"-sourcepath", (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File.pathSeparator),
20602059
),
@@ -2192,12 +2191,12 @@ object Build {
21922191
Compile / unmanagedSourceDirectories ++=
21932192
(`scala-library-bootstrapped` / Compile / unmanagedSourceDirectories).value,
21942193
// NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
2195-
Compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions", "-nowarn"),
2196-
Compile / scalacOptions += "-Yno-stdlib-patches",
2197-
Compile / scalacOptions += "-Yexplicit-nulls",
2198-
Compile / scalacOptions += "-scalajs",
2194+
Compile / compile / scalacOptions := Seq("-deprecation", "-feature", "-unchecked", "-encoding", "UTF8", "-language:implicitConversions", "-nowarn"),
2195+
Compile / compile / scalacOptions += "-Yno-stdlib-patches",
2196+
Compile / compile / scalacOptions += "-Yexplicit-nulls",
2197+
Compile / compile / scalacOptions += "-scalajs",
21992198
// Configure the source maps to point to GitHub for releases
2200-
Compile / scalacOptions ++= {
2199+
Compile / compile / scalacOptions ++= {
22012200
if (isRelease) {
22022201
val baseURI = (LocalRootProject / baseDirectory).value.toURI
22032202
val dottyVersion = version.value

0 commit comments

Comments
 (0)