Repository navigation
Argument Clinic: Touch source file if any output file changed #64595
Description
Activity
A minor bug, but still one that could cause confusion. It's already bitten me once.
If I change the code generator in clinic.py, then --make everything, files using the "file" destination often won't change. All the changes to the generated code will go in the generated file. And since the UNIX build process ignores those generated files, it doesn't rebuild the source file. I'd have to use "--make -f".
This won't just happen to me though. If you update your trunk and run "make clinic" this could easily happen to you too.
I propose that Clinic handle this as follows: if the generated file changes, but the source file does not, it "touches" the source file. (Technically I'll probably just rewrite the source file, as I already have code that does that.)
Reacted by Erlend E. Aasland- addedtype-featureA feature request or enhancementA feature request or enhancement
on Jan 26, 2014 It should first touch source file and then generated file. So that the date of generated file is always later the date of source file.
With Serhiy's modification, sounds like a reasonable plan to me.
- linked a pull request that will close this issuegh-64595: Argument Clinic: Touch source file if any output file changed #104152
on May 5, 2023 - added a commit that references this issue
on May 5, 2023 Resolved, taking Serhiy's and Nick's remarks into account, with:
- added a commit that references this issue
on May 5, 2023 6 remaining items
#104507 introduced a regression which in practice makes clinic unusable. Clearly, the current
ClinicExternalTesttest is not sufficient; we need to be able to catch errors as serious this in CI.- added a commit that references this issue
on Jul 5, 2023 Triage: the fix PR has been merged, can this be re-closed?
Triage: the fix PR has been merged, can this be re-closed?
No, the fix introduced a regression, so it had to be reverted :( I'll see if I can find time in the coming weeks to fix this.
Reacted by Hugo van KemenadeI'm not sure this is worth fixing in Argument Clinic. It is a limitation with how we've set up the build system. A more modern build system would detect the
#includedependencies automatically. We can chose to fix this in the Makefile (or just wait until a new build system is in place).- addedbuildThe build process and cross-buildThe build process and cross-build
on Jan 17, 2024 - removed a link to a pull requestgh-64595: Argument Clinic: Touch source file if any output file changed #104152
on Jan 17, 2024 #155265 implements the original Larry's plan (with my modification).
- added a commit that references this issue
on Aug 18, 2026
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs