You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
make regen-all doesn't pass -f to argument clinic #126206
python3.13 ./Tools/clinic/clinic.py --make --exclude Lib/test/clinic.test.c --srcdir .
Error in file 'Modules/posixmodule.c' on line 13087:
Checksum mismatch! Expected '9756767bdbdabe94', computed '1da32369b7d9fd4b'. Suggested fix: remove all generated code including the end marker, or use the '-f' option.
make: *** [clinic] Error 1
If you get conflicts in generated code you should examine the conflict. If there are real issues, fix them; if not, regenerate clinic code using -f, as suggested by the error message. See also the devguide and the Argument Clinic HOWTO.
Sure, if the generated code is in .c files should probably be examined as it might contain incompatible changes. But why can't it overwrite .c.h files automatically? That code is fully generated (at least for Modules/posixmodule.c).
I know that I can run Tools/clinic/clinic.py -f Modules/posixmodule.c, but this just a waste of time.
There is no discussion of using -f in the original issue nor in the commit message that added the clinic target. I'm not sure why we don't forcefully recreate generated code, but I would be fine with such a change. The clinic-tests target, for example, uses the -f option when running clinic.py.
Activity
erlend-aasland commentedon Oct 31, 2024
If you get conflicts in generated code you should examine the conflict. If there are real issues, fix them; if not, regenerate clinic code using
-f, as suggested by the error message. See also the devguide and the Argument Clinic HOWTO.nineteendo commentedon Oct 31, 2024
Sure, if the generated code is in
.cfiles should probably be examined as it might contain incompatible changes. But why can't it overwrite.c.hfiles automatically? That code is fully generated (at least forModules/posixmodule.c).I know that I can run
Tools/clinic/clinic.py -f Modules/posixmodule.c, but this just a waste of time.erlend-aasland commentedon Oct 31, 2024
There is no discussion of using
-fin the original issue nor in the commit message that added theclinictarget. I'm not sure why we don't forcefully recreate generated code, but I would be fine with such a change. Theclinic-teststarget, for example, uses the-foption when runningclinic.py.pythongh-126206: Forcefully regenerate Argument Clinic code
erlend-aasland commentedon Oct 31, 2024
Adding
-fwould not conflict with the check-generated-files CI check, so we should be fine CI wise.pythongh-126206: make clinic now forcefully regenerates clinic code
pythongh-126206: make clinic now forcefully regenerates clinic code
gh-126206: make clinic now forcefully regenerates clinic code (#126244)
erlend-aasland commentedon Nov 1, 2024
Thanks for the suggestion;
make clinic(and any other target that implicitly depends onclinic) now forcefully regenerates clinic code.pythongh-126206: make clinic now forcefully regenerates clinic code (p…
pythongh-126206: make clinic now forcefully regenerates clinic code (p…