chore: backward.privateInPublic should not break irrelevance of proofs for rebuilds (#11097)

This commit is contained in:
Sebastian Ullrich 2025-11-06 00:00:04 +01:00 committed by GitHub
parent ea2b745e57
commit ae86c18ac1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1322,6 +1322,9 @@ where
if !(← isProp header.type) then
return false
return true))) do
-- Never export private decls from theorem bodies to make sure they stay irrelevant for rebuilds
withOptions (fun opts =>
if headers.any (·.kind.isTheorem) then ResolveName.backward.privateInPublic.set opts false else opts) do
let headers := headers.map fun header =>
{ header with modifiers.attrs := header.modifiers.attrs.filter (!·.name ∈ [`expose, `no_expose]) }
let values ← try