Skip to content

refactor: split registerParametricAttribute into extension creation and registration#14344

Open
wkrozowski wants to merge 2 commits into
leanprover:masterfrom
wkrozowski:wojciech/splitParametricAttribute
Open

refactor: split registerParametricAttribute into extension creation and registration#14344
wkrozowski wants to merge 2 commits into
leanprover:masterfrom
wkrozowski:wojciech/splitParametricAttribute

Conversation

@wkrozowski

Copy link
Copy Markdown
Contributor

This PR splits registerParametricAttribute into two composable pieces so that a parametric attribute's getParam can consult the attribute's own extension for entries set on other declarations.

registerParametricAttributeExt creates the backing environment extension from the extension-relevant fields alone (ref,preserveOrder, filterExport), and registerParametricAttributeForExt registers the attribute over a given extension. registerParametricAttribute is now the composition of the two, so existing callers are unaffected. This is a pure refactor with no behavior change.

This is preparatory work for warning when @[deprecated] points at an already-deprecated declaration (#14336): the deprecation extension can be created first, letting the attribute's getParam look up whether the replacement name is itself deprecated.

@wkrozowski wkrozowski added the changelog-no Do not include this PR in the release changelog label Jul 9, 2026
@github-actions github-actions Bot added toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN labels Jul 9, 2026
@leanprover-bot leanprover-bot added the builds-manual CI has verified that the Lean Language Reference builds against this PR label Jul 9, 2026
@leanprover-bot

leanprover-bot commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Jul 9, 2026
@mathlib-lean-pr-testing

mathlib-lean-pr-testing Bot commented Jul 9, 2026

Copy link
Copy Markdown

Mathlib CI status (docs):

@wkrozowski
wkrozowski requested a review from Kha July 10, 2026 10:37
@wkrozowski
wkrozowski marked this pull request as ready for review July 16, 2026 16:55
mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jul 20, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jul 20, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jul 20, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan and removed builds-mathlib CI has verified that Mathlib builds against this PR labels Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan builds-manual CI has verified that the Lean Language Reference builds against this PR changelog-no Do not include this PR in the release changelog mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants