Skip to content

[Merged by Bors] - chore: add deprecations for {Extract,Lift}Lets.lean - #24871

Closed
grunweg wants to merge 3 commits into
masterfrom
MR-moredepre
Closed

grunweg wants to merge 3 commits into
masterfrom
MR-moredepre

Conversation

@grunweg

@grunweg grunweg commented May 14, 2025

Copy link
Copy Markdown
Contributor

Automatically created by #24861. These files were removed in the toolchain bump in ##24561.


Open in Gitpod

@grunweg grunweg added the easy < 20s of review time. See the lifecycle page for guidelines. label May 14, 2025
@github-actions

github-actions Bot commented May 14, 2025 •

Copy link
Copy Markdown

PR summary 124483645b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Tactic 2
Mathlib.Tactic.LiftLets (new file) 41
Mathlib.Tactic.ExtractLets (new file) 46

Declarations diff

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

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh 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).

@github-actions github-actions Bot added the t-meta Tactics, attributes or user commands label May 14, 2025
@adomani

adomani commented May 14, 2025

Copy link
Copy Markdown
Contributor

For completeness, would you mind sharing the actual command that generated these deprecations?

@grunweg

grunweg commented May 14, 2025

Copy link
Copy Markdown
Contributor Author

Sure, here's how I worked.
0. Work on top of #24861, as that is not merged yet. Create the deprecation there, then cherry-pick to a new commit.

  1. Uncomment the #create_deprecated_modules 5 line in that script. Bump the value until something interesting appears.
  2. The past 200 commits were fine (no deprecations created ---- except for the ofFn -> OfFn and g2 -> G2 renames, but there are mere casing changes; I just ignored them), but for 500 commits, there were two more files. Interesting, let's investigate.
  3. Do a manual binary search to find the relevant commit. Change the number in #create_deprecated_modules 500 to something lower and observe. 250 does not have the files, but 300 does. 270 and 290 don't have them, 295 does. Singling out yielded 294 as the minimal number (I believe, module off-by-one's in my memory).
  4. Run git log --pretty=oneline -745: this outputs one line per commit; the last one is the interesting one. Look at its contents using git show <hash> --- and find the removal of the desired files (and the PR number and date).
  5. Uncomment the write above to generate the deprecation file. I believe I used #create_deprecated_modules 294 "The lift_lets and extract_lets tactics were moved to core; you can probably just remove this import".
  6. Edit the generated deprecation files --- remove the reference to the other tactics, and manually add the correct date.
  7. Cherry-pick that commit to a new branch and push --> this PR.
  8. (I will do so, right now): run lake exe mk_all.

@adomani

adomani commented May 14, 2025

Copy link
Copy Markdown
Contributor

Thanks! I am very happy that this worked well!

I can certainly add a flag that warns when the line exceeds 100 characters, but I would not want to get in the hard issue of where to split it.

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label May 14, 2025
mathlib-bors Bot pushed a commit that referenced this pull request May 14, 2025
Automatically created by #24861. These files were removed in the toolchain bump in ##24561.
@adomani

adomani commented May 14, 2025 •

Copy link
Copy Markdown
Contributor

Why did lake exe cache get in CI not find a cache for virtually everything?

https://github.com/leanprover-community/mathlib4/actions/runs/15015189734/job/42191367300

EDIT: Checking out the branch locally and running lake exe cache get works as expected.

@mathlib-bors

mathlib-bors Bot commented May 14, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title chore: add deprecations for {Extract,Lift}Lets.lean [Merged by Bors] - chore: add deprecations for {Extract,Lift}Lets.lean May 14, 2025
@mathlib-bors mathlib-bors Bot closed this May 14, 2025
@mathlib-bors
mathlib-bors Bot deleted the MR-moredepre branch May 14, 2025 08:26
jano-wol pushed a commit that referenced this pull request May 16, 2025
Automatically created by #24861. These files were removed in the toolchain bump in ##24561.
mathlib-bors Bot pushed a commit that referenced this pull request May 17, 2025
Continuation of #24871; all commits were generated semi-automatically using the script in #24681.
bwehlin pushed a commit to bwehlin/mathlib4 that referenced this pull request May 31, 2025
bwehlin pushed a commit to bwehlin/mathlib4 that referenced this pull request May 31, 2025
Continuation of leanprover-community#24871; all commits were generated semi-automatically using the script in leanprover-community#24681.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

easy < 20s of review time. See the lifecycle page for guidelines. ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants