@@ -3199,7 +3199,7 @@ object Build {
3199
3199
}.value,
3200
3200
3201
3201
generateScalaDocumentation := Def .inputTaskDyn {
3202
- val majorVersion = (LocalProject ( " scala3 -library-bootstrapped" ) / scalaBinaryVersion).value
3202
+ val majorVersion = (`scala -library-bootstrapped` / scalaBinaryVersion).value
3203
3203
3204
3204
val extraArgs = spaceDelimited(" [<output-dir>] [--justAPI]" ).parsed
3205
3205
val outputDirOverride = extraArgs.headOption.fold(identity[GenerationConfig ](_))(newDir => {
@@ -3816,25 +3816,12 @@ object ScaladocConfigs {
3816
3816
3817
3817
def dottyExternalMapping = " .*scala/.*::scaladoc3::https://dotty.epfl.ch/api/"
3818
3818
def javaExternalMapping = " .*java/.*::javadoc::https://docs.oracle.com/javase/8/docs/api/"
3819
- def scalaSrcLink (v : String , s : String ) = s " ${s}github://scala/scala/v $v#src/library "
3820
- def dottySrcLink (v : String , sourcesPrefix : String = " " , outputPrefix : String = " " ) =
3821
- sys.env.get(" GITHUB_SHA" ) match {
3822
- case Some (sha) =>
3823
- s " ${sourcesPrefix}github:// ${sys.env(" GITHUB_REPOSITORY" )}/ $sha$outputPrefix"
3824
- case None => s " ${sourcesPrefix}github://scala/scala3/ $v$outputPrefix"
3819
+ def defaultSourceLinks (version : String ) = {
3820
+ def dottySrcLink (v : String ) = sys.env.get(" GITHUB_SHA" ) match {
3821
+ case Some (sha) => s " github://scala/scala3/ $sha"
3822
+ case None => s " github://scala/scala3/ $v"
3825
3823
}
3826
-
3827
- def defaultSourceLinks (version : String = dottyNonBootstrappedVersion, refVersion : String = dottyVersion) = Def .task {
3828
- def stdLibVersion = stdlibVersion(NonBootstrapped )
3829
- def srcManaged (v : String , s : String ) = s " out/bootstrap/scala2-library-bootstrapped/scala- $v/src_managed/main/ $s-library-src "
3830
- SourceLinks (
3831
- List (
3832
- scalaSrcLink(stdLibVersion, srcManaged(version, " scala" ) + " =" ),
3833
- dottySrcLink(refVersion, " library/src=" , " #library/src" ),
3834
- dottySrcLink(refVersion),
3835
- " docs=github://scala/scala3/main#docs"
3836
- )
3837
- )
3824
+ SourceLinks (List (dottySrcLink(version), " docs=github://scala/scala3/main#docs" ))
3838
3825
}
3839
3826
3840
3827
lazy val DefaultGenerationSettings = Def .task {
@@ -3849,17 +3836,14 @@ object ScaladocConfigs {
3849
3836
def skipById = SkipById (List (
3850
3837
" scala.runtime.stdLibPatches" ,
3851
3838
" scala.runtime.MatchCase" ,
3852
- " dotty.tools.tasty" ,
3853
- " dotty.tools.tasty.util" ,
3854
- " dotty.tools.tasty.besteffort"
3855
3839
))
3856
3840
def projectFooter = ProjectFooter (s " Copyright (c) 2002- $currentYear, LAMP/EPFL " )
3857
3841
def defaultTemplate = DefaultTemplate (" static-site-main" )
3858
3842
GenerationConfig (
3859
3843
List (),
3860
3844
ProjectVersion (projectVersion),
3861
3845
GenerateInkuire (true ),
3862
- defaultSourceLinks().value ,
3846
+ defaultSourceLinks(version = dottyVersion) ,
3863
3847
skipByRegex,
3864
3848
skipById,
3865
3849
projectLogo,
@@ -3881,13 +3865,8 @@ object ScaladocConfigs {
3881
3865
)
3882
3866
}
3883
3867
3884
- lazy val DefaultGenerationConfig = Def .task {
3885
- def distLocation = (dist / Universal / stage).value
3886
- DefaultGenerationSettings .value
3887
- }
3888
-
3889
3868
lazy val Scaladoc = Def .task {
3890
- DefaultGenerationConfig .value
3869
+ DefaultGenerationSettings .value
3891
3870
.add(UseJavacp (true ))
3892
3871
.add(ProjectName (" scaladoc" ))
3893
3872
.add(OutputDir (" scaladoc/output/self" ))
@@ -3898,7 +3877,7 @@ object ScaladocConfigs {
3898
3877
3899
3878
lazy val Testcases = Def .task {
3900
3879
val tastyRoots = (Test / Build .testcasesOutputDir).value
3901
- DefaultGenerationConfig .value
3880
+ DefaultGenerationSettings .value
3902
3881
.add(UseJavacp (true ))
3903
3882
.add(OutputDir (" scaladoc/output/testcases" ))
3904
3883
.add(ProjectName (" scaladoc testcases" ))
@@ -3914,56 +3893,35 @@ object ScaladocConfigs {
3914
3893
}
3915
3894
3916
3895
lazy val Scala3 = Def .task {
3917
- val dottyJars : Seq [java.io.File ] = Seq (
3918
- (`scala2-library-bootstrapped`/ Compile / products).value,
3919
- (`scala3-library-bootstrapped`/ Compile / products).value,
3920
- (`scala3-interfaces`/ Compile / products).value,
3921
- (`tasty-core-bootstrapped`/ Compile / products).value,
3922
- ).flatten
3923
-
3924
- val roots = dottyJars.map(_.getAbsolutePath)
3925
-
3926
- val managedSources =
3927
- (`scala2-library-bootstrapped`/ Compile / sourceManaged).value / " scala-library-src"
3928
- val projectRoot = (ThisBuild / baseDirectory).value.toPath
3929
- val stdLibRoot = projectRoot.relativize(managedSources.toPath.normalize())
3930
- val docRootFile = stdLibRoot.resolve(" rootdoc.txt" )
3931
-
3932
- val dottyManagesSources = (`scala3-library-bootstrapped`/ Compile / baseDirectory).value
3933
-
3934
- val tastyCoreSources = projectRoot.relativize((`tasty-core-bootstrapped`/ Compile / scalaSource).value.toPath().normalize())
3935
-
3936
- val dottyLibRoot = projectRoot.relativize(dottyManagesSources.toPath.normalize())
3937
- DefaultGenerationConfig .value
3896
+ DefaultGenerationSettings .value
3938
3897
.add(ProjectName (" Scala 3" ))
3939
3898
.add(OutputDir (file(" scaladoc/output/scala3" ).getAbsoluteFile.getAbsolutePath))
3940
3899
.add(Revision (" main" ))
3941
3900
.add(ExternalMappings (List (javaExternalMapping)))
3942
- .add(DocRootContent (docRootFile .toString))
3901
+ .add(DocRootContent (((`scala-library-bootstrapped` / baseDirectory).value / " src " / " rootdoc.txt " ) .toString))
3943
3902
.add(CommentSyntax (List (
3944
- s " ${dottyLibRoot}=markdown " ,
3945
- s " ${stdLibRoot}=wiki " ,
3946
- s " ${tastyCoreSources}=markdown " ,
3903
+ // s"${dottyLibRoot}=markdown",
3904
+ // s"${stdLibRoot}=wiki",
3947
3905
" wiki"
3948
3906
)))
3949
3907
.add(VersionsDictionaryUrl (" https://scala-lang.org/api/versions.json" ))
3950
3908
.add(DocumentSyntheticTypes (true ))
3951
- .add(SnippetCompiler (List (
3952
- s " $dottyLibRoot/src/scala=compile " ,
3953
- s " $dottyLibRoot/src/scala/compiletime=compile " ,
3954
- s " $dottyLibRoot/src/scala/util=compile " ,
3955
- s " $dottyLibRoot/src/scala/util/control=compile "
3956
- )))
3909
+ // .add(SnippetCompiler(List(
3910
+ // s"$dottyLibRoot/src/scala=compile",
3911
+ // s"$dottyLibRoot/src/scala/compiletime=compile",
3912
+ // s"$dottyLibRoot/src/scala/util=compile",
3913
+ // s"$dottyLibRoot/src/scala/util/control=compile"
3914
+ // )))
3957
3915
.add(SiteRoot (" docs" ))
3958
3916
.add(ApiSubdirectory (true ))
3959
- .withTargets(roots )
3917
+ .withTargets((`scala-library-bootstrapped` / Compile / products).value.map(_.getAbsolutePath) )
3960
3918
}
3961
3919
3962
3920
def stableScala3 (version : String ) = Def .task {
3963
3921
val scalaLibrarySrc = s " out/bootstrap/scala2-library-bootstrapped/scala- $version-bin-SNAPSHOT-nonbootstrapped/src_managed "
3964
3922
val dottyLibrarySrc = " library/src"
3965
3923
Scala3 .value
3966
- .add(defaultSourceLinks(version + " -bin-SNAPSHOT-nonbootstrapped " , version).value )
3924
+ .add(defaultSourceLinks(version = version))
3967
3925
.add(ProjectVersion (version))
3968
3926
.add(SnippetCompiler (
3969
3927
List (
0 commit comments