Skip to content

Commit

Permalink
Remove manual sbt-bridge cache invalidation
Browse files Browse the repository at this point in the history
These caches are only used with scalaCompilerBridgeSource, so we don't
need them now that we switched to scalaCompilerBridgeBinaryJar
  • Loading branch information
smarter committed Jan 25, 2019
1 parent 2cd2dc6 commit 57ab07d
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions project/Build.scala
Expand Up @@ -780,19 +780,6 @@ object Build {
}

lazy val dottySbtBridgeSettings = Seq(
cleanSbtBridge := {
cleanSbtBridgeImpl()
},
compile in Compile := {
val log = streams.value.log
val prev = (previousCompile in Compile).value.analysis.orElse(null)
val cur = (compile in Compile).value
if (prev != cur) {
log.info("Cleaning the dotty-sbt-bridge cache because it was recompiled.")
cleanSbtBridgeImpl()
}
cur
},
description := "sbt compiler bridge for Dotty",
resolvers += Resolver.typesafeIvyRepo("releases"), // For org.scala-sbt:api
libraryDependencies ++= Seq(
Expand All @@ -808,18 +795,6 @@ object Build {
parallelExecution in Test := false
)

// Needed until https://github.com/sbt/sbt/issues/2402 is fixed.
lazy val cleanSbtBridge = TaskKey[Unit]("cleanSbtBridge", "delete dotty-sbt-bridge cache")

def cleanSbtBridgeImpl(): Unit = {
val home = System.getProperty("user.home")
val sbtOrg = "org.scala-sbt"
val bridgePattern = s"*dotty-sbt-bridge*$dottyVersion*"

IO.delete((file(home) / ".sbt" / "1.0" / "zinc" / sbtOrg * bridgePattern).get)
IO.delete((file(home) / ".sbt" / "boot" * "scala-*" / sbtOrg / "sbt" * "*" * bridgePattern).get)
}

lazy val `dotty-sbt-bridge` = project.in(file("sbt-bridge")).
dependsOn(dottyCompiler(NonBootstrapped) % Provided).
dependsOn(dottyDoc(NonBootstrapped) % Provided).
Expand Down

0 comments on commit 57ab07d

Please sign in to comment.