@@ -1242,16 +1242,26 @@ object Build {
1242
1242
libraryDependencies += (" org.scala-js" %%% " scalajs-dom" % " 1.1.0" ).cross(CrossVersion .for3Use2_13)
1243
1243
)
1244
1244
1245
- def generateDocumentation (targets : Seq [String ], name : String , outDir : String , ref : String , params : Seq [String ] = Nil ) =
1245
+ def generateDocumentation (targets : Seq [String ], name : String , outDir : String , ref : String , params : Seq [String ] = Nil , addBootclasspath : Boolean = false ) =
1246
1246
Def .taskDyn {
1247
1247
val distLocation = (dist / pack).value
1248
1248
val projectVersion = version.value
1249
1249
IO .createDirectory(file(outDir))
1250
1250
val stdLibVersion = stdlibVersion(Bootstrapped )
1251
+ val scalaLib = findArtifactPath(externalCompilerClasspathTask.value, " scala-library" )
1252
+ val dottyLib = (`scala3-library` / Compile / classDirectory).value
1251
1253
// TODO add versions etc.
1252
1254
def srcManaged (v : String , s : String ) = s " out/bootstrap/stdlib-bootstrapped/scala- $v/src_managed/main/ $s-library-src "
1253
1255
def scalaSrcLink (v : String , s : String ) = s " -source-links: $s=github://scala/scala/v $v#src/library "
1254
1256
def dottySrcLink (v : String , s : String ) = s " -source-links: $s=github://lampepfl/dotty/ $v#library/src "
1257
+ def bootclasspath : Seq [String ] = if (addBootclasspath) Seq (
1258
+ " -bootclasspath" ,
1259
+ Seq (
1260
+ scalaLib,
1261
+ dottyLib
1262
+ ).mkString(System .getProperty(" path.separator" ))
1263
+ ) else Nil
1264
+
1255
1265
val revision = Seq (" -revision" , ref, " -project-version" , projectVersion)
1256
1266
val cmd = Seq (
1257
1267
" -d" ,
@@ -1260,7 +1270,7 @@ object Build {
1260
1270
name,
1261
1271
scalaSrcLink(stdLibVersion, srcManaged(dottyNonBootstrappedVersion, " scala" )),
1262
1272
dottySrcLink(referenceVersion, srcManaged(dottyNonBootstrappedVersion, " dotty" ))
1263
- ) ++ scalacOptionsDocSettings ++ revision ++ params ++ targets
1273
+ ) ++ scalacOptionsDocSettings ++ revision ++ params ++ targets ++ bootclasspath
1264
1274
import _root_ .scala .sys .process ._
1265
1275
Def .task((s " $distLocation/bin/scaladoc " +: cmd).! )
1266
1276
}
@@ -1310,6 +1320,7 @@ object Build {
1310
1320
generateDocumentation(
1311
1321
(Compile / classDirectory).value.getAbsolutePath :: Nil ,
1312
1322
" scaladoc" , " scaladoc/output/self" , VersionUtil .gitHash,
1323
+ addBootclasspath = true
1313
1324
)
1314
1325
}.value,
1315
1326
generateScalaDocumentation := Def .inputTaskDyn {
@@ -1361,7 +1372,8 @@ object Build {
1361
1372
(Test / Build .testcasesOutputDir).value,
1362
1373
" scaladoc testcases" ,
1363
1374
" scaladoc/output/testcases" ,
1364
- " master" )
1375
+ " master" ,
1376
+ addBootclasspath = true )
1365
1377
}.value,
1366
1378
1367
1379
Test / buildInfoKeys := Seq [BuildInfoKey ](
0 commit comments