Skip to content

Argument Clinic: Touch source file if any output file changed #64595

Description

@larryhastings
BPO 20396
Nosy @ncoghlan, @larryhastings, @zware, @serhiy-storchaka

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:

assignee = 'https://github.com/larryhastings'
closed_at = None
created_at = <Date 2014-01-26.14:02:21.527>
labels = ['type-feature', 'expert-argument-clinic']
title = 'Argument Clinic: Touch source file if any output file changed'
updated_at = <Date 2015-02-25.15:25:31.345>
user = 'https://github.com/larryhastings'

bugs.python.org fields:

activity = <Date 2015-02-25.15:25:31.345>
actor = 'serhiy.storchaka'
assignee = 'larry'
closed = False
closed_date = None
closer = None
components = ['Argument Clinic']
creation = <Date 2014-01-26.14:02:21.527>
creator = 'larry'
dependencies = []
files = []
hgrepos = []
issue_num = 20396
keywords = []
message_count = 3.0
messages = ['209315', '209318', '209323']
nosy_count = 4.0
nosy_names = ['ncoghlan', 'larry', 'zach.ware', 'serhiy.storchaka']
pr_nums = []
priority = 'low'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue20396'
versions = []

Linked PRs

Activity

  1. larryhastings commented on Jan 26, 2014

    @larryhastings
    ContributorAuthor

    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.)

  2. serhiy-storchaka commented on Jan 26, 2014

    @serhiy-storchaka
    Member

    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.

  3. ncoghlan commented on Jan 26, 2014

    @ncoghlan
    Contributor

    With Serhiy's modification, sounds like a reasonable plan to me.

  4. transferred this issue fromon Apr 10, 2022
  5. added a commit that references this issue on May 4, 2023
  6. added a commit that references this issue on May 5, 2023
  7. erlend-aasland commented on May 5, 2023

    @erlend-aasland
    Contributor

    Resolved, taking Serhiy's and Nick's remarks into account, with:

  8. added a commit that references this issue on May 5, 2023
  9. added a commit that references this issue on May 8, 2023
  10. 6 remaining items

  11. erlend-aasland commented on Jul 5, 2023

    @erlend-aasland
    Contributor

    #104507 introduced a regression which in practice makes clinic unusable. Clearly, the current ClinicExternalTest test is not sufficient; we need to be able to catch errors as serious this in CI.

  12. added a commit that references this issue on Jul 5, 2023
  13. added a commit that references this issue on Jul 5, 2023
  14. added 2 commits that reference this issue on Jul 5, 2023
  15. added a commit that references this issue on Jul 5, 2023
  16. hugovk commented on Jan 11, 2024

    @hugovk
    Member

    Triage: the fix PR has been merged, can this be re-closed?

  17. erlend-aasland commented on Jan 11, 2024

    @erlend-aasland
    Contributor

    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.

  18. erlend-aasland commented on Jan 17, 2024

    @erlend-aasland
    Contributor

    I'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 #include dependencies automatically. We can chose to fix this in the Makefile (or just wait until a new build system is in place).

  19. serhiy-storchaka commented on Aug 6, 2026

    @serhiy-storchaka
    Member

    #155265 implements the original Larry's plan (with my modification).

  20. added a commit that references this issue on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions