From fe29b58172cb6a76f61a891893c7fb03413d9fd2 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sun, 5 Apr 2020 16:58:56 +0200 Subject: [PATCH] Sensible defaults for sbt `clean` and `publishLocal` --- project/Build.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/project/Build.scala b/project/Build.scala index 117fcfff7f9d..0e5d343c03de 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -1339,7 +1339,15 @@ object Build { dependsOn(dottyCompiler). dependsOn(dottyLibrary). nonBootstrappedSettings( - addCommandAlias("run", "dotty-compiler/run") + addCommandAlias("run", "dotty-compiler/run"), + // Clean everything by default + addCommandAlias("clean", ";dotty/clean;dotty-bootstrapped/clean"), + // `publishLocal` on the non-bootstrapped compiler does not produce a + // working distribution (it can't in general, since there's no guarantee + // that the non-bootstrapped library is compatible with the + // non-bootstrapped compiler), so publish the bootstrapped one by + // default. + addCommandAlias("publishLocal", "dotty-bootstrapped/publishLocal"), ) def asDottyCompiler(implicit mode: Mode): Project = project.withCommonSettings.