Skip to content

[Merged by Bors] - chore(Linter): remove the upstreamed globalAttributeIn - #44499

Closed
JovanGerb wants to merge 2 commits into
leanprover-community:masterfrom
JovanGerb:Jovan-globalAttributeIn
Closed

JovanGerb wants to merge 2 commits into
leanprover-community:masterfrom
JovanGerb:Jovan-globalAttributeIn

Conversation

@JovanGerb

@JovanGerb JovanGerb commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The globalAttributeIn linter was upstreamed to Lean core in leanprover/lean4#13223, so this PR removes it from Mathlib, to remove the duplication.


I also removed the test file in this PR, since the linter is now core's responsibility. Is that fine or is it better to keep the test file?


@github-actions github-actions Bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

PR summary b6b9a45c85

Import changes exceeding 2%

% File
+830.00% Mathlib.Tactic.Linter.GlobalAttributeIn

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Tactic.Linter.GlobalAttributeIn 10 93 +83 (+830.00%)
Mathlib.Init 93 92 -1 (-1.08%)
Import changes for all files
Files Import difference
../mathlib-ci/scripts/pr_summary/import_trans_difference.sh all
There are 8552 files with changed transitive imports taking up over 373307 characters: this is too many to display!
You can run this locally from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci


Declarations diff (regex)

- Dummy
- bar
- dummyInst
- foo
- getGlobalAttributesIn?
- getLinterGlobalAttributeIn
- globalAttributeIn
------- instance : Inhabited Int

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean -- stale; merge master and push to refresh)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit 2355a9e).

  • +0 new declarations
  • −1 removed declarations
-Mathlib.Linter.linter.globalAttributeIn

No changes to strong technical debt.
No changes to weak technical debt.

Current commit b6b9a45c85
Reference commit 17e9f587d8

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

note: file MathlibTest/Linter/GlobalAttributeIn.lean was removed.
Please create a follow-up pull request adding a module deprecation. Thanks!

@github-actions github-actions Bot added file-removed A Lean module was (re)moved without a `deprecated_module` annotation t-linter Linter labels Oct 5, 2026
@grunweg grunweg self-assigned this Oct 5, 2026
@grunweg

grunweg commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Good catch, thanks for doing this! I see a few things in the test file that core's linter could pick up; I'll follow up with core separately. I think removing it here is fine. I have one optional wording tweak, otherwise this LGTM, thanks!
bors d+

@mathlib-bors mathlib-bors Bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Oct 5, 2026
@mathlib-bors

mathlib-bors Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

✌️ JovanGerb can now approve this pull request until 2026-10-19 09:57 UTC (in 2 weeks). To approve and merge, reply with bors r+. More detailed instructions are available here.

⚠️ This delegation only covers changes within Archive/**, Counterexamples/**, docs/**, DownstreamTest/**, Mathlib/**, MathlibTest/**, Wanted/**, widget/**, Archive.lean, Counterexamples.lean, docs.lean, Mathlib.lean, Wanted.lean; an author commit touching anything else will revoke it. Bors also revokes it if a later push changes too many files for it to check the full list — even if it stays within scope.

@JovanGerb

Copy link
Copy Markdown
Contributor Author

bors r+

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Oct 5, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Oct 5, 2026
The globalAttributeIn linter was upstreamed to Lean core in leanprover/lean4#13223, so this PR removes it from Mathlib, to remove the duplication.
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Oct 5, 2026
@mathlib-bors

mathlib-bors Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title chore(Linter): remove the upstreamed globalAttributeIn [Merged by Bors] - chore(Linter): remove the upstreamed globalAttributeIn Oct 5, 2026
@mathlib-bors mathlib-bors Bot closed this Oct 5, 2026
@mathlib-bors mathlib-bors Bot removed the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Oct 5, 2026
kim-em added a commit that referenced this pull request Oct 6, 2026
Carry this PR's meta qualifiers into master's public/private import
grouping (#44512), and drop the GlobalAttributeIn import that #44499
removed from Mathlib.Init.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. file-removed A Lean module was (re)moved without a `deprecated_module` annotation large-import Automatically added label for PRs with a significant increase in transitive imports ready-to-merge This PR has been sent to bors. t-linter Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants