File tree Expand file tree Collapse file tree 6 files changed +19
-4
lines changed
sbt-test/sbt-dotty/scala3doc-empty-test
src/dotty/tools/sbtplugin Expand file tree Collapse file tree 6 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ object Build {
5656 val referenceVersion = " 3.0.0-M3"
5757
5858 val baseVersion = " 3.0.0-RC1"
59- val baseSbtDottyVersion = " 0.5.0 "
59+ val baseSbtDottyVersion = " 0.5.1 "
6060
6161 // Versions used by the vscode extension to create a new project
6262 // This should be the latest published releases.
Original file line number Diff line number Diff line change 1+ scalaVersion := sys.props(" plugin.scalaVersion" )
Original file line number Diff line number Diff line change 1+ addSbtPlugin(" ch.epfl.lamp" % " sbt-dotty" % sys.props(" plugin.version" ))
Original file line number Diff line number Diff line change 1+ package hello
2+ /** Hello, world! */
3+ object Hello {
4+ def main (args : Array [String ]): Unit = {
5+ val dotty : Int | String = " dotty"
6+ println(s " Hello $dotty! " )
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ > doc
2+ > test:doc
3+
Original file line number Diff line number Diff line change @@ -444,14 +444,16 @@ object DottyPlugin extends AutoPlugin {
444444
445445 private val docSettings = inTask(doc)(Seq (
446446 tastyFiles := {
447- val _ = compile.value // Ensure that everything is compiled, so TASTy is available.
447+ val sources = compile.value // Ensure that everything is compiled, so TASTy is available.
448448 // sbt is too smart and do not start doc task if there are no *.scala files defined
449449 file(" ___fake___.scala" ) +:
450450 (classDirectory.value ** " *.tasty" ).get.map(_.getAbsoluteFile)
451451 },
452452 sources := Def .taskDyn[Seq [File ]] {
453- if (isDotty.value && useScala3doc.value) Def .task { tastyFiles.value }
454- else Def .task { sources.value }
453+ val originalSources = sources.value
454+ if (isDotty.value && useScala3doc.value && originalSources.nonEmpty)
455+ Def .task { tastyFiles.value }
456+ else Def .task { originalSources }
455457 }.value,
456458 scalacOptions ++= {
457459 if (isDotty.value) {
You can’t perform that action at this time.
0 commit comments