Skip to content

[Merged by Bors] - feat: code snippet for deprecated_module - #24681

Closed
YaelDillies wants to merge 1 commit into
masterfrom
deprecated_module_code_snippet
Closed

YaelDillies wants to merge 1 commit into
masterfrom
deprecated_module_code_snippet

Conversation

@YaelDillies

Copy link
Copy Markdown
Contributor

Type depmod in a Lean file, hit TAB, and depmod will be replaced with deprecated_module (since := CURRENT_DATE).


Open in Gitpod

Type `depmod` in a Lean file, hit TAB, and `depmod` will be replaced with `deprecated_module (since := CURRENT_DATE)`.
@github-actions

github-actions Bot commented May 8, 2025

Copy link
Copy Markdown

PR summary 739c694780

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

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

@grunweg

grunweg commented May 8, 2025 •

Copy link
Copy Markdown
Contributor

Sure, why not? (If in the future we write a bot to create the deprecation PRs automatically, we can remove this again.)
maintainer merge?

@github-actions

github-actions Bot commented May 8, 2025

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by grunweg.

@github-actions github-actions Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label May 8, 2025
@github-actions

github-actions Bot commented May 8, 2025

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by grunweg.

1 similar comment
@github-actions

github-actions Bot commented May 8, 2025

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by grunweg.

@adomani

adomani commented May 8, 2025

Copy link
Copy Markdown
Contributor

Looks reasonable, thanks!

I'll leave you to consider pros and cons of instead calling alias_deprecation and module_deprecation the relevant abbreviations.

bors d+

@mathlib-bors

mathlib-bors Bot commented May 8, 2025

Copy link
Copy Markdown
Contributor

✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels May 8, 2025
@YaelDillies

Copy link
Copy Markdown
Contributor Author

If in the future we write a bot to create the deprecation PRs automatically, we can remove this again.

I think the code snippets are useful regardless. There's basically no cost associated to them (they only take up one autocomplete suggestion in a case where you might want to discover them anyway)

@YaelDillies

Copy link
Copy Markdown
Contributor Author

I'll leave you to consider pros and cons of instead calling alias_deprecation and module_deprecation the relevant abbreviations.

I've witnessed beginners writing "deprecated ali..." when I tell them they need to write a deprecated alias, so I optimised the autocomplete for that, for discoverability. 😁

bors merge

mathlib-bors Bot pushed a commit that referenced this pull request May 8, 2025
Type `depmod` in a Lean file, hit TAB, and `depmod` will be replaced with `deprecated_module (since := CURRENT_DATE)`.
@mathlib-bors

mathlib-bors Bot commented May 8, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat: code snippet for deprecated_module [Merged by Bors] - feat: code snippet for deprecated_module May 8, 2025
@mathlib-bors mathlib-bors Bot closed this May 8, 2025
@mathlib-bors
mathlib-bors Bot deleted the deprecated_module_code_snippet branch May 8, 2025 17:50
@grunweg

grunweg commented May 8, 2025

Copy link
Copy Markdown
Contributor

If in the future we write a bot to create the deprecation PRs automatically, we can remove this again.

I think the code snippets are useful regardless. There's basically no cost associated to them (they only take up one autocomplete suggestion in a case where you might want to discover them anyway)

If we decide that PRs merely moving files should not have a deprecation snippet, and a bot writes those instead, then a snippet might be counterproductive (by implicitly encouraging something we decided against). But, I agree - let's worry about that if this occurs.

tannerduve pushed a commit that referenced this pull request May 13, 2025
Type `depmod` in a Lean file, hit TAB, and `depmod` will be replaced with `deprecated_module (since := CURRENT_DATE)`.
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
Type `depmod` in a Lean file, hit TAB, and `depmod` will be replaced with `deprecated_module (since := CURRENT_DATE)`.
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

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants