Skip to content

chore: use import graph 171 for header linter suggestions - #44509

Draft
thorimur wants to merge 3 commits into
leanprover-community:masterfrom
thorimur:format-imports-header-with-171
Draft

thorimur wants to merge 3 commits into
leanprover-community:masterfrom
thorimur:format-imports-header-with-171

Conversation

@thorimur

@thorimur thorimur commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

#44507, but using the correct behavior in ImportGraph.


@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 f8c3834da9

Import changes exceeding 2%

% File
+11.11% Mathlib.Tactic.Linter.Header

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Tactic.Linter.Header 9 10 +1 (+11.11%)
Import changes for all files
Files Import difference
../mathlib-ci/scripts/pr_summary/import_trans_difference.sh all
There are 8594 files with changed transitive imports taking up over 374740 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)

+ formatImports
- ImportRef
- ImportRef.getIdent
- headerToImportRefs

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

Computed after the build finishes.


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

Current commit f8c3834da9
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).

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 9, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

large-import Automatically added label for PRs with a significant increase in transitive imports merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant