Skip to content

gh-64595: Touch the source file if the generated file was changed - #155265

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:clinic-touch
Open

gh-64595: Touch the source file if the generated file was changed#155265
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:clinic-touch

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 6, 2026

Copy link
Copy Markdown
Member

Files are still written only if their content was changed. In addition:

  • If the source file or any file generated from it was changed, the source file is touched, and then the generated files, in that order.
  • If nothing was changed, but a generated file is not newer than the source file, the generated file is touched.

The build system does not know that the source file depends on the files
generated from it, so it did not recompile the source file if only the
generated file was changed.  The generated files are also kept newer
than the source file.
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.

1 participant