Skip to content

Commit 7c07bf7

Browse files
committed
Test that IDE can be started in CI, upgrade ref compiler
dotty-library-bootstrappedJS scalacOptions handling was broken, I fixed it by upgrading the reference compiler to simplify the handling of -Yerased-terms, but I also removed all scalajs projects from IDE startup as explained in the comment.
1 parent 2b810e9 commit 7c07bf7

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ steps:
4040
depends_on: [ clone ]
4141
commands:
4242
- cp -R . /tmp/2/ && cd /tmp/2/
43-
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test ;dotty-staging/test ;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test"
43+
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test ;dotty-staging/test ;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test ;configureIDE"
4444
- ./project/scripts/bootstrapCmdTests
4545

4646
- name: community_build

project/Build.scala

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,15 @@ object MyScalaJSPlugin extends AutoPlugin {
5454

5555
// Typecheck the Scala.js IR found on the classpath
5656
scalaJSLinkerConfig ~= (_.withCheckIR(true)),
57+
58+
// Exclude all these projects from `configureIDE/launchIDE` since they
59+
// take time to compile, print a bunch of warnings, and are rarely edited.
60+
excludeFromIDE := true
5761
)
5862
}
5963

6064
object Build {
61-
val referenceVersion = "0.21.0-RC1"
65+
val referenceVersion = "0.22.0-bin-20200114-193f7de-NIGHTLY"
6266

6367
val baseVersion = "0.22.0"
6468
val baseSbtDottyVersion = "0.3.5"
@@ -730,16 +734,18 @@ object Build {
730734
case Bootstrapped => `dotty-compiler-bootstrapped`
731735
}
732736

733-
// Settings shared between dotty-library and dotty-library-bootstrapped
737+
// Settings shared between dotty-library, dotty-library-bootstrapped and dotty-library-bootstrappedJS
734738
lazy val dottyLibrarySettings = Seq(
735-
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
736-
scalacOptions in Compile ++= Seq("-sourcepath", (sourceDirectories in Compile).value.map(_.getAbsolutePath).distinct.mkString(File.pathSeparator)),
739+
scalacOptions in Compile ++= Seq(
740+
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
741+
"-sourcepath", (sourceDirectories in Compile).value.map(_.getAbsolutePath).distinct.mkString(File.pathSeparator),
742+
// support declaration of scala.compiletime.erasedValue
743+
"-Yerased-terms"
744+
),
737745
)
738746

739747
lazy val `dotty-library` = project.in(file("library")).asDottyLibrary(NonBootstrapped)
740748
lazy val `dotty-library-bootstrapped`: Project = project.in(file("library")).asDottyLibrary(Bootstrapped)
741-
// TODO: move -Yerased-terms to dottyLibrarySettings on reference compiler update
742-
.settings(scalacOptions in Compile += "-Yerased-terms") // support declaration of scala.compiletime.erasedValue
743749

744750
def dottyLibrary(implicit mode: Mode): Project = mode match {
745751
case NonBootstrapped => `dotty-library`
@@ -761,7 +767,6 @@ object Build {
761767
settings(
762768
unmanagedSourceDirectories in Compile :=
763769
(unmanagedSourceDirectories in (`dotty-library-bootstrapped`, Compile)).value,
764-
scalacOptions += "-Yerased-terms", // support declaration of scala.compiletime.erasedValue
765770
)
766771

767772
lazy val tastyCoreSettings = Seq(

0 commit comments

Comments
 (0)