-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Change incremental build to account for more kinds of state change than timestamps #701
Comments
Closing this as we won't be going with this implementation for now. |
Reopening because we should have a bug to track "it'd be nice if we could do incremental build via hashes" and "it'd be nice if we could do incremental build correctly in the face of property changes between builds". |
We had a meeting and discussed this. Currently there are likely many targets (especially around linker/AOT/publish scenarios) which are not incremental, and we don't think it's feasible to make them correctly incremental without some validation that the target "inputs" are correctly declared. We think we could address this with a design something like the following:
I'm marking this as needs triage to discuss whether we could schedule this for the .NET 9 timeframe. |
If all we know of what the state was before is a hash of the inputs, how could we figure out which of the inputs changed, causing the rebuild? |
I really like this idea, but it also sounds like a kinda heavy lift to me. There's a lot you can do in targets, and we don't have any consolidated way to check whether any particular property or item has been read. That said, if we decide to implement this part, I'd consider simultaneously resolving the issue with erroring if someone tries to set a property then never uses it (i.e., typos). |
This issue is in the open design phase and is a part of the project.json -> csproj 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:
The text was updated successfully, but these errors were encountered: