Skip to content

GenerateDepsFile Task should be internally-incremental #49349

Open
@baronfel

Description

@baronfel

Is your feature request related to a problem? Please describe.

The GenerateDepsFile always writes a new deps.json file, even if the content is the same. This leads to rebuilds all down the target chain. We shouldn't write a deps.json unless the content would be materially different.

var writer = new DependencyContextWriter();
using (var fileStream = File.Create(depsFilePath))
{
writer.Write(dependencyContext, fileStream);
}
_filesWritten.Add(new TaskItem(depsFilePath));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions