Skip to content

fix invalidation of sbt bridge cache #3531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -707,20 +707,12 @@ object Build {

lazy val dottySbtBridgeSettings = Seq(
cleanSbtBridge := {
val dottySbtBridgeVersion = version.value
val dottyVersion = (version in `dotty-compiler`).value
val classVersion = System.getProperty("java.class.version")

val sbtV = sbtVersion.value
val sbtOrg = "org.scala-sbt"
val sbtScalaVersion = "2.10.6"

val home = System.getProperty("user.home")
val org = organization.value
val artifact = moduleName.value
val sbtOrg = "org.scala-sbt"
val bridgeDirectoryPattern = s"*${dottyVersion}*"

IO.delete(file(home) / ".ivy2" / "cache" / sbtOrg / s"$org-$artifact-$dottySbtBridgeVersion-bin_${dottyVersion}__$classVersion")
IO.delete(file(home) / ".sbt" / "boot" / s"scala-$sbtScalaVersion" / sbtOrg / "sbt" / sbtV / s"$org-$artifact-$dottySbtBridgeVersion-bin_${dottyVersion}__$classVersion")
IO.delete((file(home) / ".ivy2" / "cache" / sbtOrg * bridgeDirectoryPattern).get)
IO.delete((file(home) / ".sbt" / "boot" * "scala-*" / sbtOrg / "sbt" * "*" * bridgeDirectoryPattern).get)
},
packageSrc in Compile := (packageSrc in Compile).dependsOn(cleanSbtBridge).value,
description := "sbt compiler bridge for Dotty",
Expand Down