refactor: lake: restrict cache fetch to leanprover* (#5642)

Lake will now only automatically fetch Reservoir build caches for
package in the the `leanprover` and `leanprover-community`
organizations. We are not planning to expand the Reservoir build cache
to other packages until farther in the future.
This commit is contained in:
Mac Malone 2024-10-12 18:56:49 -04:00 committed by GitHub
parent a3bc4d2359
commit 068208091f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,9 +44,9 @@ def Package.maybeFetchBuildCache (self : Package) : FetchM (BuildJob Bool) := do
let shouldFetch :=
(← getTryCache) &&
(self.preferReleaseBuild || -- GitHub release
!(self.scope.isEmpty -- no Reservoir
|| (← getElanToolchain).isEmpty
|| (← self.buildDir.pathExists)))
((self.scope == "leanprover" || self.scope == "leanprover-community")
&& !(← getElanToolchain).isEmpty
&& !(← self.buildDir.pathExists))) -- Reservoir
if shouldFetch then
self.optBuildCache.fetch
else