Repository navigation
[Merged by Bors] - chore: remove @[expose] from def-free public sections - #39388
marcelolynch wants to merge 1 commit into
Conversation
✅ PR Title Formatted CorrectlyThe title of this PR has been updated to match our commit style conventions. |
PR summary 5cf3e68342Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (weak) |
|---|---|---|
| 4887 | -136 | exposed public sections |
Current commit 5cf3e68342
Reference commit b595917dfb
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.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
|
I'm a little hesitant, see #39387 (comment). |
|
@eric-wieser But what about #38480? We're already doing this |
|
Unfortunately, #38480 didn't come with a proper commit message. @grunweg and @kim-em , did that PR un- I think that PRs removing |
|
This pull request has conflicts, please merge |
Strip `@[expose]` from 136 public section headers where no declaration needs its body visible downstream. Regenerated on current master with the per-section linter from leanprover-community#39387: the linter now classifies each declaration at the command that creates it and gives one verdict per section, which also catches sections in files whose defs sit outside the section, and sections that contain scoped or local instances. Each edited module builds on the master toolchain. Files whose content differs between the linting tree and master were skipped. Co-Authored-By: Claude Fable 5 <[email protected]>
8f7a648 to
5cf3e68
Compare
|
@urkud After a new sweep, I just computed the delta by comparing the set of constants with The sets are identical: 563 constants have exposed bodies before my change and the same 563 after. So the list of definitions that lose exposure is empty. The definitons in question are the auto-generated structure machinery and instances (whose exposure does not come from the section attribute). This matches the design of the linter (#39387): it fires only on sections where no declaration's body exposure has an impact downstream. For completion, here is the full list 563 definitions with exposed bodies in the 84 affected modules that have any (identical before and after this PR; the other 52 modules expose nothing)
|
|
!radar |
|
Benchmark results for 5cf3e68 against b595917 are in. No significant results found. @jcommelin
No significant changes detected. |
Strip `@[expose]` from `public section` headers in 136 modules where no declaration needs its body visible downstream. A new sweep in the style of #38480 Found using the linter-in-progress: #39387 Relevant Zulip thread: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Removing.20unnecessary.20.60.40.5Bexpose.5D.60/with/595180230
|
Pull request successfully merged into master. Build succeeded: |
* origin/master: (417 commits) feat(CategoryTheory/Presentable): more basic API for κ-filtered categories (leanprover-community#41184) feat(Tactic/Linter/UnusedTactic): mark `isIgnoreTacticKind` and `addIgnoreTacticKind` as public (leanprover-community#41993) doc: sync area READMEs with the directory tree (leanprover-community#42224) feat(CategoryTheory/Presentable): new constructor for `IsCardinalFilteredGenerator` (leanprover-community#41183) feat(Data/Finset): `insert a (s.erase a) = insert a s` (leanprover-community#40775) feat(CategoryTheory/Limits): morphisms between filtered limits are initially level-wise (leanprover-community#41009) chore: fix more linter warnings encountered by `scripts/rm_set_option.py` (leanprover-community#42659) chore(Algebra/Module/Submodule/Pointwise): remove `@[simp]` (leanprover-community#42643) feat(Algebra/QuadraticAlgebra): change of generator (leanprover-community#42209) chore(Condensed): reduce imports (leanprover-community#42022) chore: remove @[expose] from def-free public sections (leanprover-community#39388) feat: make `TFAE.out` 1-indexed (leanprover-community#42663) feat(Topology/Order): convergence of suprema and infima (leanprover-community#40578) feat: composition of Fredholm operators (leanprover-community#41601) chore: remove unused open declarations (leanprover-community#42235) chore(Algebra/Order/GroupWithZero/Canonical): remove unnecessary typeclass assumptions (leanprover-community#42539) chore(Algebra/Homology): make `HomologicalComplex.eval` `implicit_reducible` (leanprover-community#42648) chore: update Mathlib dependencies 2026-08-11 (leanprover-community#42651) chore: improve `Set` / `Finset` congruence API (leanprover-community#42640) feat(Geometry/Convex): a topology on StdSimplex (leanprover-community#42131) ... # Conflicts: # Mathlib/Tactic/Linter/DirectoryDependency.lean
…munity#39388) Strip `@[expose]` from `public section` headers in 136 modules where no declaration needs its body visible downstream. A new sweep in the style of leanprover-community#38480 Found using the linter-in-progress: leanprover-community#39387 Relevant Zulip thread: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Removing.20unnecessary.20.60.40.5Bexpose.5D.60/with/595180230
Strip
@[expose]frompublic sectionheaders in 136 modules where no declaration needs its body visible downstream. A new sweep in the style of #38480Found using the linter-in-progress: #39387
Relevant Zulip thread: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Removing.20unnecessary.20.60.40.5Bexpose.5D.60/with/595180230