Skip to content

Commit ee3f361

Browse files
Merge branch 'develop' into fix/reject-file-cache-output
2 parents 890bb27 + a00814a commit ee3f361

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

main/src/main/scala/sbt/Defaults.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2068,6 +2068,13 @@ object Defaults extends BuildCommon {
20682068
if (ScalaArtifacts.isScala3(sv)) Opts.doc.externalAPIScala3(xapisFiles)
20692069
else Opts.doc.externalAPI(xapisFiles)
20702070
val options = sOpts ++ externalApiOpts
2071+
def convertVfRef(value: String): String =
2072+
if !value.contains("$") then value
2073+
else converter.toPath(VirtualFileRef.of(value)).toString
2074+
val resolvedOptions = options.map { x =>
2075+
if !x.contains("$") then x
2076+
else x.split(":").map(_.split(",").map(convertVfRef).mkString(",")).mkString(":")
2077+
}
20712078
val scalac = cs.scalac match
20722079
case ac: AnalyzingCompiler => ac.onArgs(Compiler.exported(s, "scaladoc"))
20732080
val docSrcFiles = if ScalaArtifacts.isScala3(sv) then tFiles else srcs
@@ -2081,7 +2088,7 @@ object Defaults extends BuildCommon {
20812088
cp.map(converter.toPath).map(new sbt.internal.inc.PlainVirtualFile(_)),
20822089
converter,
20832090
out.toPath(),
2084-
options,
2091+
resolvedOptions,
20852092
maxErrors.value,
20862093
s.log,
20872094
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
semanticdbEnabled := true
2+
scalaVersion := "2.12.21"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
object A
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# scaladoc should succeed when semanticdbEnabled is true
2+
> doc

0 commit comments

Comments
 (0)