Skip to content

[Merged by Bors] - chore: group public and private imports - #44512

Closed
kim-em wants to merge 2 commits into
masterfrom
import-format-cleanup
Closed

kim-em wants to merge 2 commits into
masterfrom
import-format-cleanup

Conversation

@kim-em

@kim-em kim-em commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Group public imports before private imports, with a blank line between the groups, in 2,076 Mathlib files. Preserve the order within each group, import modifiers, and comments. No imports are removed or have their visibility changed.

Generated using the formatter in #44503. This is a source-only cleanup and can merge independently of the linter implementation.

Supersedes #42063.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

PR summary 24c474eca1

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

No declarations were harmed in the making of this PR! 🐙

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)

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

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


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

Current commit 24c474eca1
Reference commit 7d6757bc18

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).

@sgouezel

sgouezel commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

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
Group public imports before private imports, with a blank line between the groups, in 2,076 Mathlib files. Preserve the order within each group, import modifiers, and comments. No imports are removed or have their visibility changed.

Generated using the formatter in #44503. This is a source-only cleanup and can merge independently of the linter implementation.

Supersedes #42063.
@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: group public and private imports [Merged by Bors] - chore: group public and private imports Oct 5, 2026
@mathlib-bors mathlib-bors Bot closed this Oct 5, 2026
@mathlib-bors
mathlib-bors Bot deleted the import-format-cleanup branch October 5, 2026 09:13
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) <noreply@anthropic.com>
kim-em added a commit that referenced this pull request Oct 12, 2026
Most conflicts come from master's regrouping of public and private imports
(#44512, #44513): resolved by taking master's import layout and reapplying
this PR's meta/removal changes line by line.

- Mathlib/Init.lean: keep master's new `Batteries.Tactic.Alias` import and
  `Linter.DeclType` (which bundles the instance linters, #44436), the latter
  as a `public meta import`.
- Mathlib/Data/Ineq.lean: drop the duplicate `ToFormat` instance as master
  did (#44383); the parsing functions stay moved to `Mathlib.Tactic.Ineq`.
- Control/Monad/{Basic,Cont}, Lean/Expr/Basic, FieldSimp,
  Linarith/Lemmas, LinearCombination/Lemmas: re-add this PR's new imports
  (`Batteries.Data.Except`, `Lean.ProjFns`, `Lean.Structure`,
  `Mathlib.Tactic.Ineq`) in master's public import group.
- Mathlib/Tactic/Push.lean: drop the `public import Lean.Elab.ConfigEval`
  that git's auto-merge reintroduced.
- Mathlib/Tactic/Echelon/Core.lean: master added `public import Qq` to this
  `public meta section` file; make it `public meta import Qq`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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. ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants