Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide resiliency against inputs changing during the build #1943

Merged
merged 1 commit into from
Jun 10, 2022

Commits on Jun 10, 2022

  1. Introduce mechanism to provide resiliency for inputs changing while t…

    …he build runs
    
    When an edge starts to run, create a temporary lock file in the build
    directory, stat it, and cache its mtime. When the command finishes, use
    the temporary lock file's mtime from when the edge started running as
    the mtime that is recorded in the build log for each of the edge's
    output(s). Subsequent runs will use that as the mtime for the output(s).
    
    This provides robustness against inputs changing while the command
    itself is running. If an input is changed, the subsequent run will
    detect the output as dirty since its recorded mtime reflects when the
    build command began, not when the output was actually written to disk.
    
    Generator and restat rules are exempt from this and will continue to
    record their actual mtime on disk at the time the command finished in
    the build log (unless the restat rule cleans the output). This avoids
    potential infinite loops when the generator rule touches input
    dependencies of the output(s) or a restat rule intentionally changes
    implicit dependencies of its output.
    jdrouhard committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    a2b5e6d View commit details
    Browse the repository at this point in the history