chore: shake: fix handling of meta structure etc (#11701)
This commit is contained in:
parent
12c282b1e9
commit
b7f1cf9ba7
2 changed files with 8 additions and 6 deletions
|
|
@ -285,7 +285,9 @@ def isDeclMeta' (env : Environment) (declName : Name) : Bool :=
|
|||
-- references from any other context as compatible with both phases.
|
||||
let inferFor :=
|
||||
if declName.isStr && (declName.getString!.startsWith "match_" || declName.getString! == "_unsafe_rec") then declName.getPrefix else declName
|
||||
isDeclMeta env inferFor
|
||||
-- `isMarkedMeta` knows about non-defs such as `meta structure`, isDeclMeta knows about decls
|
||||
-- implicitly marked meta
|
||||
isMarkedMeta env inferFor || isDeclMeta env inferFor
|
||||
|
||||
/--
|
||||
Given an `Expr` reference, returns the declaration name that should be considered the reference, if
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ def isMarkedMeta (env : Environment) (declName : Name) : Bool :=
|
|||
metaExt.isTagged env declName
|
||||
|
||||
/--
|
||||
Set of IR decls that should be made available to any importer. This is a superset of `metaExt`,
|
||||
which is managed by the elaborator and has a different async mode. More precisely, it contains the
|
||||
closure of `metaExt` as well as further derived decls such as `_boxed` versions. We store this set
|
||||
primarily to filter exports in `declMapExt`; we persist it in `.olean.private` for the benefit of
|
||||
`shake`.
|
||||
Set of IR decls that should be made available to any importer. This is a superset of `metaExt`
|
||||
(except for non-defs such as `meta structure`), which is managed by the elaborator and has a
|
||||
different async mode. More precisely, it contains the closure of `metaExt` as well as further
|
||||
derived decls such as `_boxed` versions. We store this set primarily to filter exports in
|
||||
`declMapExt`; we persist it in `.olean.private` for the benefit of `shake`.
|
||||
-/
|
||||
private builtin_initialize declMetaExt : SimplePersistentEnvExtension Name NameSet ←
|
||||
registerSimplePersistentEnvExtension {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue