Skip to content

Commit 0252bed

Browse files
committed
Do not add the compiler on the dotty-staging classpath
1 parent ecfea9d commit 0252bed

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

project/Build.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,11 @@ object Build {
761761

762762
lazy val `dotty-staging` = project.in(file("staging")).
763763
withCommonSettings(Bootstrapped).
764-
dependsOn(dottyCompiler(Bootstrapped)).
764+
// We want the compiler to be present in the compiler classpath when compiling this project but not
765+
// when compiling a project that depends on dotty-staging (see ...), but we always need it to be present
766+
// on the JVM classpath at runtime.
767+
dependsOn(dottyCompiler(Bootstrapped) % "provided").
768+
dependsOn(dottyCompiler(Bootstrapped) % "compile->runtime").
765769
dependsOn(dottyCompiler(Bootstrapped) % "test->test").
766770
settings(commonBootstrappedSettings).
767771
settings(commonDottyJarClasspathSettings).
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package hello
2+
3+
4+
object Main {
5+
6+
def main(args: Array[String]): Unit = {
7+
dotty.tools.dotc.Main.main(Array.empty)
8+
}
9+
10+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
> run
22
> test
3+
$ copy-file src/changes/Hello.scala src/main/scala/hello/Hello.scala
4+
-> compile

0 commit comments

Comments
 (0)