Skip to content

Commit 1c3ba7b

Browse files
authored
Merge pull request #6353 from dotty-staging/fix-ide-in-dotty
Fix launchIDE in the Dotty build after the full bootstrap
2 parents b255543 + 8439dcb commit 1c3ba7b

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

project/Build.scala

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ object Build {
189189
// Do not append Scala versions to the generated artifacts
190190
crossPaths := false,
191191
// Do not depend on the Scala library
192-
autoScalaLibrary := false
192+
autoScalaLibrary := false,
193+
excludeFromIDE := true
193194
)
194195

195196
// Settings used when compiling dotty (both non-boostrapped and bootstrapped)
@@ -203,7 +204,8 @@ object Build {
203204
version := dottyNonBootstrappedVersion,
204205
scalaVersion := referenceVersion,
205206
// To be removed once we stop cross-compiling with Scala 2
206-
crossScalaVersions := Seq(referenceVersion, scalacVersion)
207+
crossScalaVersions := Seq(referenceVersion, scalacVersion),
208+
excludeFromIDE := true
207209
)
208210

209211
// Settings used when compiling dotty with a non-bootstrapped dotty
@@ -977,12 +979,9 @@ object Build {
977979
val updateCommunityBuild = taskKey[Unit]("Updates the community build.")
978980

979981
lazy val `community-build` = project.in(file("community-build")).
980-
settings(commonSettings).
982+
dependsOn(dottyLibrary(Bootstrapped)).
983+
settings(commonBootstrappedSettings).
981984
settings(
982-
scalaVersion := referenceVersion,
983-
// To be removed once we stop cross-compiling with Scala 2
984-
crossScalaVersions := Seq(referenceVersion, scalacVersion),
985-
986985
prepareCommunityBuild := {
987986
(publishLocal in `dotty-sbt-bridge`).value
988987
(publishLocal in `dotty-interfaces`).value

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

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,20 @@ object DottyIDEPlugin extends AutoPlugin {
8282

8383
val (dottyVersions, dottyProjRefs) =
8484
structure.allProjectRefs.flatMap { projRef =>
85-
val version = scalaVersion.in(projRef).get(settings).get
86-
if (isDottyVersion(version))
87-
Some((version, projRef))
88-
else
89-
crossScalaVersions.in(projRef).get(settings).get.filter(isDottyVersion).sorted.lastOption match {
90-
case Some(v) =>
91-
Some((v, projRef))
92-
case _ =>
93-
None
94-
}
85+
if (excludeFromIDE.in(projRef).get(settings) == Some(true))
86+
None
87+
else {
88+
val version = scalaVersion.in(projRef).get(settings).get
89+
if (isDottyVersion(version))
90+
Some((version, projRef))
91+
else
92+
crossScalaVersions.in(projRef).get(settings).get.filter(isDottyVersion).sorted.lastOption match {
93+
case Some(v) =>
94+
Some((v, projRef))
95+
case _ =>
96+
None
97+
}
98+
}
9599
}.unzip
96100

97101
if (dottyVersions.isEmpty)

0 commit comments

Comments
 (0)