Skip to content

chore: deprecate := variants of inductive and structure #5542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

kmill
Copy link
Collaborator

@kmill kmill commented Sep 30, 2024

Deprecates inductive ... :=, structure ... :=, and class ... := in favor of the ... where variant. Currently this syntax produces a warning, controlled by the linter.deprecated option.

Breaking change: modifies Lean.Linter.logLintIf to use Lean.Linter.getLinterValue to determine if a linter value is set. This means that the linter.all option now is taken into account when the linter option is not set.

Part of #5236

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Sep 30, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Sep 30, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Sep 30, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Sep 30, 2024

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
@leanprover-community-bot leanprover-community-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Sep 30, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Sep 30, 2024

Mathlib CI status (docs):

kmill added 3 commits October 8, 2024 15:01
Deprecates `inductive ... :=` and `structure ... :=`. Currently this syntax produces a warning, controlled by the `linter.deprecated` option.

Part of leanprover#5236
@kmill kmill force-pushed the deprecate-colon-eq branch from 106c348 to 89ba3be Compare October 8, 2024 22:31
@kmill
Copy link
Collaborator Author

kmill commented Oct 8, 2024

@adomani @grunweg I noticed that logLintIf didn't take into account linter.all, and I modified the logic here. It seems to me that it was meant to respond to linter.all, but please let me know if it's not supposed to.

@adomani
Copy link
Contributor

adomani commented Oct 8, 2024

Kyle, thanks for the heads up! I think that I never used logLintIf (at least not directly), but I'll keep an eye out for linters misbehaving! 😄

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Oct 8, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 8, 2024
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Oct 9, 2024
In [lean4#5542](leanprover/lean4#5542) we are deprecating `inductive ... :=`, `structure ... :=`, and `class ... :=` for their `... where` counterparts.
eric-wieser pushed a commit to leanprover-community/quote4 that referenced this pull request Oct 9, 2024
In leanprover/lean4#5542 we will be deprecating `structure ... :=` in favor of
`structure ... where`.
@kmill kmill added this pull request to the merge queue Oct 11, 2024
Merged via the queue into leanprover:master with commit 8e88e80 Oct 11, 2024
15 checks passed
kmill added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 11, 2024
In [lean4#5542](leanprover/lean4#5542) we are deprecating `inductive ... :=`, `structure ... :=`, and `class ... :=` for their `... where` counterparts.
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Oct 11, 2024
In [lean4#5542](leanprover/lean4#5542) we are deprecating `inductive ... :=`, `structure ... :=`, and `class ... :=` for their `... where` counterparts. Continuation of #17564.
kmill added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 12, 2024
In [lean4#5542](leanprover/lean4#5542) we are deprecating `inductive ... :=`, `structure ... :=`, and `class ... :=` for their `... where` counterparts. Continuation of #17655.
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Oct 13, 2024
In [lean4#5542](leanprover/lean4#5542) we are deprecating `inductive ... :=`, `structure ... :=`, and `class ... :=` for their `... where` counterparts. Continuation of #17655.
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 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.

None yet

3 participants