@@ -1312,7 +1312,7 @@ object Build {
13121312 lazy val `scala-library-bootstrapped` = project.in(file(" library" ))
13131313 .enablePlugins(ScalaLibraryPlugin )
13141314 .settings(publishSettings)
1315- .settings(disableDocSetting) // TODO now produces empty JAR to satisfy Sonatype, see https://github.com/scala/scala3/issues/24434
1315+ // .settings(disableDocSetting) // TODO now produces empty JAR to satisfy Sonatype, see https://github.com/scala/scala3/issues/24434
13161316 .settings(
13171317 name := " scala-library-bootstrapped" ,
13181318 moduleName := " scala-library" ,
@@ -1336,6 +1336,11 @@ object Build {
13361336 // Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
13371337 " -sourcepath" , (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File .pathSeparator),
13381338 ),
1339+ // For doc generation, filter out -sourcepath as it causes conflicts with symbols loaded from tasty
1340+ Compile / doc / scalacOptions ~= { opts =>
1341+ val idx = opts.indexOf(" -sourcepath" )
1342+ if (idx >= 0 ) opts.patch(idx, Nil , 2 ) else opts
1343+ },
13391344 // Packaging configuration of the stdlib
13401345 Compile / packageBin / publishArtifact := true ,
13411346 Compile / packageDoc / publishArtifact := true ,
0 commit comments