Skip to content

Commit

Permalink
Enable pathref revalidation for all coursier downloads (#2846)
Browse files Browse the repository at this point in the history
This change sets the `revalidate` flag on the coursier resolved pathrefs
in more situations, to better detect the case, that the cache might have
changed.

Pull request: #2846
  • Loading branch information
lefou authored Oct 22, 2023
1 parent 20c2b75 commit c4ec14e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main/api/src/mill/api/PathRef.scala
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ object PathRef {
// Parsing to a long and casting to an int is the only way to make
// round-trip handling of negative numbers work =(
val sig = java.lang.Long.parseLong(hex, 16).toInt
val pr = PathRef(path, quick, sig, validOrig)
val pr = PathRef(path, quick, sig, revalidate = validOrig)
validatedPaths.value.revalidateIfNeededOrThrow(pr)
pr
}
Expand Down
2 changes: 1 addition & 1 deletion main/util/src/mill/util/Util.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ object Util {
),
force = Nil,
resolveFilter = resolveFilter
)
).map(_.map(_.withRevalidateOnce))
}

def millProperty(key: String): Option[String] =
Expand Down
2 changes: 1 addition & 1 deletion scalalib/src/mill/scalalib/CoursierModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ trait CoursierModule extends mill.Module {
customizer = resolutionCustomizer(),
coursierCacheCustomizer = coursierCacheCustomizer(),
ctx = Some(implicitly[mill.api.Ctx.Log])
).map(_.map(_.withRevalidateOnce))
)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion scalalib/src/mill/scalalib/Lib.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ object Lib {
customizer = customizer,
ctx = ctx,
coursierCacheCustomizer = coursierCacheCustomizer
)
).map(_.map(_.withRevalidateOnce))
}

def scalaCompilerIvyDeps(scalaOrganization: String, scalaVersion: String): Loose.Agg[Dep] =
Expand Down

0 comments on commit c4ec14e

Please sign in to comment.