Skip to content

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

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:clinic-touch
Aug 18, 2026
Merged

gh-64595: Touch the source file if the generated file was changed#155265
serhiy-storchaka merged 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.
@serhiy-storchaka
serhiy-storchaka merged commit c5168ea into python:main Aug 18, 2026
102 of 104 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the clinic-touch branch August 18, 2026 16:55
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Fedora Stable LTO + PGO 3.x (tier-1) has failed when building commit c5168ea.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/29/builds/10641) and take a look at the build logs.
  4. Check if the failure is related to this commit (c5168ea) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/29/builds/10641

Summary of the results of the build (if available):

Click to see traceback logs
Note: switching to 'c5168eadf15665310b22ff44e23738034d3e5036'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at c5168eadf1566 gh-64595: Touch the source file if the generated file was changed (GH-155265)
Switched to and reset branch 'main'

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:3476: clean-retain-profile] Error 1 (ignored)
./Modules/socketmodule.c: In function ‘getsockaddrarg’:
./Modules/socketmodule.c:2664:9: warning: ‘strncpy’ specified bound 64 equals destination size [-Wstringop-truncation]
 2664 |         strncpy((char *)sa->salg_name, name, sizeof(sa->salg_name));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ar: unable to copy file 'libpython3.16.a'; reason: No space left on device
make[2]: *** [Makefile:1164: libpython3.16.a] Error 1
make[1]: *** [Makefile:997: profile-gen-stamp] Error 2
make: *** [Makefile:1009: profile-run-stamp] Error 2

@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Fedora Stable LTO 3.x (tier-1) has failed when building commit c5168ea.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/271/builds/9404) and take a look at the build logs.
  4. Check if the failure is related to this commit (c5168ea) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/271/builds/9404

Summary of the results of the build (if available):

Click to see traceback logs
Note: switching to 'c5168eadf15665310b22ff44e23738034d3e5036'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at c5168eadf15 gh-64595: Touch the source file if the generated file was changed (GH-155265)
Switched to and reset branch 'main'

ar: libpython3.16.a: error reading Modules/signalmodule.o: No space left on device
make: *** [Makefile:1164: libpython3.16.a] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants