Skip to content

fix(create_deprecated_modules): fix the build again#37391

Open
grunweg wants to merge 17 commits intoleanprover-community:masterfrom
grunweg:deprecatemodule
Open

fix(create_deprecated_modules): fix the build again#37391
grunweg wants to merge 17 commits intoleanprover-community:masterfrom
grunweg:deprecatemodule

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Mar 30, 2026

The code needed updating to the new String API; it failed to build before this PR.
This also removes uses of deprecated String API.

A future PR will add CI to ensure this script builds fine.
(Future future: can we test that we tested all .lean scripts? Or have a test which builds all .lean files in scripts?)


We need to annotate a type as Char now, perhaps because the default instances (from a Char to a Slice.Pattern) don't work out as well any more.

Open in Gitpod

… to the string api

One universe error remains (which causes a second error further below).

A number of deprecation warnings seem not worth fixing right now.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

PR summary cbd9a3d070

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/pr_summary/declarations_diff.sh <optional_commit>

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

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


No changes to technical debt.

You can run this locally as

./scripts/reporting/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 added CI Modifies the continuous integration setup or other automation tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip labels Mar 30, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

✅ PR Title Formatted Correctly

The title of this PR has been updated to match our commit style conventions.
Thank you!

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Mar 31, 2026

I added one more workaround of the same kind: now things are failing a few lines below, with the same error. Argh.

@grunweg grunweg added the help-wanted The author needs attention to resolve issues label Mar 31, 2026
@adomani
Copy link
Copy Markdown
Contributor

adomani commented Apr 2, 2026

Has there been a recent change to how do notation works? If so, I wonder if the difficulty here is related to that.

@grunweg grunweg changed the title wip(create_deprecated_modules): fix some deprecation warnings related… fix(create_deprecated_modules): fix the build again Apr 2, 2026
@grunweg grunweg removed the help-wanted The author needs attention to resolve issues label Apr 2, 2026
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Apr 2, 2026

Yes, there have (good catch!). The backward.do.legacy option does not help with any of the workarounds, though.

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Apr 2, 2026

I have cleaned up the code and annotated all warnings: from my side, this is good to go (and we should investigate the workarounds).

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Apr 2, 2026

I asked about the String API on zulip.
Update: Robin was very helpful; all deprecations are fixed now. See zulip for an mwe for the elaboration issue.

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Apr 2, 2026

Robin suggested a much nicer way to deal with the elaboration issue. \o/

Copy link
Copy Markdown
Contributor

@adomani adomani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be converging to a much better use of the String API: thanks a lot!

Copy link
Copy Markdown
Contributor

@adomani adomani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor comments, none of which is required.

grunweg added a commit to grunweg/mathlib4 that referenced this pull request Apr 4, 2026
This would have caught the errors fixed by leanprover-community#37391 much sooner.
The list of scripts included in this PR is based on manual inspection
of scripts/, and removing any which get run using any PR's CI run anyway.
grunweg added a commit to grunweg/mathlib4 that referenced this pull request Apr 4, 2026
This would have caught the errors fixed by leanprover-community#37391 much sooner.
The list of scripts included in this PR is based on manual inspection
of scripts/, and removing any which get run using any PR's CI run anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Modifies the continuous integration setup or other automation tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants