Skip to content

Commit f510be1

Browse files
committed
Use compiler context to generate project name
FIx problem with named type parameters in example project.
1 parent b5361fa commit f510be1

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ object DottyPlugin extends AutoPlugin {
360360
Resolver.bintrayRepo("virtuslab", "dokka"),
361361
),
362362
useScala3doc := false,
363-
scala3docOptions := Seq("-n", name.value),
363+
scala3docOptions := Nil,
364364
Compile / doc / scalacOptions := {
365365
val s3dOpts = scala3docOptions.value.map("--+DOC+" + _)
366366
val s3cOpts = (Compile / doc / scalacOptions).value

scala3doc/example-project/src/main/scala/NamedTypeArguments.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package example
22

3+
import experimental.namedTypeArguments
4+
35
/**
46
* Named Type Arguments: https://dotty.epfl.ch/docs/reference/other-new-features/named-typeargs.html
57
*/

scala3doc/src/dotty/tools/dottydoc/Main.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ object Main extends Driver {
5555
val requiredArgs = Seq(
5656
"--tastyRoots", "", // hack, value is not used in SBT but required in CLI
5757
// we extract some settings from Dotty options since that's how SBT passes them
58+
"--name", ctx.settings.projectName.value,
5859
"--projectTitle", ctx.settings.projectName.value,
5960
"--output", ctx.settings.outputDir.value.toString,
6061
)

0 commit comments

Comments
 (0)