Skip to content

Conversation

dura0ok
Copy link
Contributor

@dura0ok dura0ok commented May 4, 2025

Previously, regen-pegen would fail if Parser/parser.c was deleted (e.g. due to merge conflicts), requiring a manual touch to proceed. This change passes --create to update_file.py to allow the file to be created automatically if it doesn't exist.

@dura0ok dura0ok requested a review from erlend-aasland as a code owner May 4, 2025 13:47
@dura0ok dura0ok changed the title build: allow parser.c to be created if missing gh-133376: build: allow parser.c to be created if missing May 4, 2025
during regen-pegen

Previously, `regen-pegen` would fail if Parser/parser.c was deleted
(e.g. due to merge conflicts), requiring a manual `touch` to proceed.
This change passes `--create` to update_file.py to allow the file
to be created automatically if it doesn't exist.
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

I think that this is better. But, maybe there are some other reasons why this is not default? Let's wait for @lysnikolaou and @pablogsal to double check :)

@pablogsal
Copy link
Member

I cannot think of any reason I think it was just adapted from somewhere else. This is a good improvement

@pablogsal pablogsal merged commit 51d2459 into python:main May 5, 2025
40 checks passed
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants