Avoid materializing outputs for unqueried dependencies #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using the
MSBuildCacheGetResultsForUnqueriedDependenciesfeature, today the unqueried dependencies' outputs are materialized on disk, assuming they're cache hits. This is problematic because the caller did not explicitly ask for those nodes and thus may be assuming that those outputs are not changing in any way.This change avoids materializing outputs for unqueried dependencies.
There is special-casing for outer builds of multitargeting projects. Outer builds depend on the inner builds, so if only the outer build were materialized, almost nothing would end up materializing. So we do still materialize dependencies if the project is an outer build and the dependency is an inner build.
Note that there was some debate around this (I was the hold-out), so capturing the gist of the discussion here to help anyone looking back on this for historical context.