Don't display bootstrap changelog warnings in --dry-run mode#138078
Merged
bors merged 2 commits intorust-lang:masterfrom Mar 7, 2025
Merged
Don't display bootstrap changelog warnings in --dry-run mode#138078bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Presently x.py displays "There have been changes to x.py since you last updated:" note only once when run normally, but on every invocation when run with
--dry-run.The disparity is not exactly intentonal, but just a historical accident.
It was made to be printed once in #117815 via storing
.last-warned-change-idon disk in{config.out}/bootstrap(i.e.build/bootstrap) directory.But that didn't quite work for
--dry-run, since{config.out}/bootsrappoints tobuild/tmp-dry-run/bootstrapwhich isn't created in dry-run mode, so file creation fails.This got fixed in #118789 and now
--dry-rundoes not save.last-warned-change-idat all. (Nor does it read it, since it cannot know to read from non-dry-run location)This PR simply stops displaying the changelog altogether in --dry-run mode.
previous attempt (outdated)
This PR takes a different approach, and instead of not-writing the stamp in `--dry-run` mode it instead tries harder to yes-write it, and, specifically, creates `build/tmp-dry-run/bootstrap` directory to do so. If neccessary (i.e. if there are changes newer than the `change-id` stamp of config.toml to warn about). Note that `build/tmp-dry-run/` was *already* being created, so making an extra `boostrap` sub-folder should not meaningfully pollute the build dir.(Apologies for the, perhaps, excessively wordy PR, I'm new to this)