Skip to content

Avoid modifying incr-compilation directory unless compilation completes normally #34957

@nikomatsakis

Description

@nikomatsakis
Contributor

In #34956, we modify the incremental compilation directory a bit wantonly. For example, when first starting up, we will delete work products if it looks likes things have changed -- and we serialize the dep-graph and only later serialize the work-products file.

It seems to me it would be better if we avoided making changes until the end of compilation. In some cases, we might be able to avoid making changes altogether. For example, we could keep .o files -- even if they are dirty -- if errors are resulting, which would mean that if the changes are rolled back, compilation succeeds instantaneously.

Similarly, we might serialize the dep-graph to a temp file and then serialize the work-products also to a temp file, and finally rename both files to their actual names once both are done.

Activity

added
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
A-incr-compArea: Incremental compilation
on Jul 21, 2016
added 2 commits that reference this issue on Aug 23, 2016
d86838e
df1eee8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nikomatsakis

        Issue actions

          Avoid modifying incr-compilation directory unless compilation completes normally · Issue #34957 · rust-lang/rust