feat: GitHub cloud releases do not clobber prebuilt artifacts (#6218)
This PR makes Lake no longer automatically fetch GitHub cloud releases if the package build directory is already present (mirroring the behavior of the Reservoir cache). This prevents the cache from clobbering existing prebuilt artifacts. Users can still manually fetch the cache and clobber the build directory by running `lake build <pkg>:release`.
This commit is contained in:
parent
54c48363ca
commit
3ece36de9d
1 changed files with 2 additions and 2 deletions
|
|
@ -47,10 +47,10 @@ def Package.optBuildCacheFacetConfig : PackageFacetConfig optBuildCacheFacet :=
|
|||
def Package.maybeFetchBuildCache (self : Package) : FetchM (BuildJob Bool) := do
|
||||
let shouldFetch :=
|
||||
(← getTryCache) &&
|
||||
!(← self.buildDir.pathExists) && -- do not automatically clobber prebuilt artifacts
|
||||
(self.preferReleaseBuild || -- GitHub release
|
||||
((self.scope == "leanprover" || self.scope == "leanprover-community")
|
||||
&& !(← getElanToolchain).isEmpty
|
||||
&& !(← self.buildDir.pathExists))) -- Reservoir
|
||||
&& !(← getElanToolchain).isEmpty)) -- Reservoir
|
||||
if shouldFetch then
|
||||
self.optBuildCache.fetch
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue