Skip to content

[Merged by Bors] - fix: update scripts/rm_set_option.py to ignore more comments#41997

Closed
vlad902 wants to merge 2 commits into
leanprover-community:masterfrom
vlad902:fix-rm-setoption
Closed

[Merged by Bors] - fix: update scripts/rm_set_option.py to ignore more comments#41997
vlad902 wants to merge 2 commits into
leanprover-community:masterfrom
vlad902:fix-rm-setoption

Conversation

@vlad902

@vlad902 vlad902 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Currently scripts/rm_set_option.py will ignore any lines that look like set_option ... in -- COMMENT; however, the 4.33.0-rc1 bump introduced many set_options that were unsafe to delete as indicated by a preceding #adaptation_note/comment.

This PR updates the script to ignore -- and /-- ... -/ comments before a set_option. This includes catching #adaptation_notes

Related Zulip thread

🤖 Prepared with Claude


Open in Gitpod

Currently `scripts/rm_set_option.py` will ignore any lines that look
like `set_option ... in -- COMMENT`; however, the 4.33.0-rc1 bump
introduced many `set_option`s that were unsafe to delete as indicated by
a preceding `#adaptation_note`/comment.

This PR updates cript to now ignores `--` and `/-- ... -/` comments
before a set_option. This includes catching `#adaptation_note`s

Related [Zulip thread](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/4.2E33.2E0-rc1.20Multiple.20.60respectTransparency.60-related.20issues/near/611128727)

:robot: Prepared with Claude
@github-actions github-actions Bot added the CI Modifies the continuous integration setup or other automation label Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

PR summary 18e5b7b0fd

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ is_annotated(lines:

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

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


No changes to strong technical debt.

No changes to weak technical debt.

Current commit 18e5b7b0fd
Reference commit 3de5ed81cc

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

@vlad902
vlad902 requested a review from bryangingechen July 22, 2026 06:17
@vlad902 vlad902 added the LLM-generated PRs with substantial input from LLMs - review accordingly label Jul 22, 2026
Comment thread scripts/set_option_utils.py Outdated
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
@bryangingechen

Copy link
Copy Markdown
Contributor

Thanks!
bors r+

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Jul 22, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jul 22, 2026
Currently `scripts/rm_set_option.py` will ignore any lines that look like `set_option ... in -- COMMENT`; however, the 4.33.0-rc1 bump introduced many `set_option`s that were unsafe to delete as indicated by a preceding `#adaptation_note`/comment.

This PR updates the script to ignore `--` and `/-- ... -/` comments before a set_option. This includes catching `#adaptation_note`s

Related [Zulip thread](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/4.2E33.2E0-rc1.20Multiple.20.60respectTransparency.60-related.20issues/near/611128727)

:robot: Prepared with Claude
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Jul 22, 2026
@mathlib-bors

mathlib-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title fix: update scripts/rm_set_option.py to ignore more comments [Merged by Bors] - fix: update scripts/rm_set_option.py to ignore more comments Jul 22, 2026
@mathlib-bors mathlib-bors Bot closed this Jul 22, 2026
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. CI Modifies the continuous integration setup or other automation LLM-generated PRs with substantial input from LLMs - review accordingly 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