dotnet / dotnet/msbuild

Change incremental build to account for more kinds of state change than timestamps

Open
#701 5 comments 8 reactions 0 assignees View on GitHub
Area: Incremental Build Feature Request
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

**This issue is in the open design phase and is a part of the [project.json -> csproj ](https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/) conversion effort.**
### Incremental build in the face of globs

MSBuild only considers the set of items computed in the current build when deciding when to execute a target. When files are included via wildcard this can create a problem when deleting an input. The output will be up-to-date with all of the existing inputs but should be re-built because the set of inputs has changed.

We could address this by building a state store and using it to compare the current build inputs & outputs against the previous build. In order to accomplish this, we would need to complete the following:
- [ ] Identify a unique address for a target instance (each target instance needs to be uniquely identifiable and gets its own persisted incremental state).
- [ ] Figure out directory structure for where to save the caches (machine wide / per project, etc).
- [ ] Flesh out cache invalidation scenarios (e.g. command line changed, environment variables changed, etc). Stretch goal: re-build when properties change as well as inputs/outputs.
- [ ] Stretch goal: Unify the multiple incremental implementations in MSBuild.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.