Repository navigation
Conversation
The outputs of a project are the files it writes. When a project uses files left in its output directories (OutDir, IntermediateOutputPath) by a previous build without writing them, e.g. an incremental build whose targets were up to date, its outputs miss those files, and a cache hit in another clone would not place them. With MSBuildCacheSkipNodesWithLeftoverOutputs (default false), such projects are not added to the cache. Their result is still used by their dependents in the build, so ICacheClient.AddNodeAsync takes a publish flag: the outputs are still hashed to build the node result, which is not added. Existing probes are captured only when the setting is on, whether or not probe and enumeration fingerprinting is enabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Caching a project built over leftover outputs stores outputs without the files it skipped, which a cache hit elsewhere would not place: a correctness fix, so it is on by default. Setting MSBuildCacheSkipNodesWithLeftoverOutputs to false still caches such projects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build summary only counted these nodes, while each one makes its dependents miss in every build. Log the message at high importance, write it to notAdded.txt in the node log directory, and name the other cause: a write by a process whose file accesses are not reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…outputs A project may build another project which is not a node of the graph, with the MSBuild task, in its own output directories. WPF markup compilation builds a temporary project (*_wpftmp.csproj) in the project's intermediate output directory, which writes the target framework moniker attribute file there. The project's own target is then skipped as up to date, and the project only reads the file. The file accesses of the temporary project are not attributed to any node, so on a build from empty output directories the project was skipped as using a leftover output, and every later build missed. With SkipNodesWithLeftoverOutputs, the files written by projects which are not nodes of the graph are recorded, and a file written in this build is not a leftover output. A file left by a previous build, which nothing writes in this build, is still one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes case 3 of #192. Builds on #198: only the last commit is new here, the others are #198's. I'll rebase once #198 merges.
A project can build another project that is not a node of the graph, with the
MSBuildtask, into its own output directories. WPF markup compilation does this: it builds a temporary project (*_wpftmp.csproj) in the project's intermediate output directory, which writes the target framework moniker attribute file there. The project's own target that would write that file is then skipped as up to date, so the project only reads it.The temporary project's file accesses are not attributed to any node. So on a build from empty output directories, the leftover-output check of #198 sees a file the project read but never wrote, and skips the node, in every build.
With
SkipNodesWithLeftoverOutputs, the files written by projects that are not nodes of the graph are now recorded, and a file written during this build is not a leftover output. A file left by a previous build, which nothing writes in this build, still is.Tests: two scenarios in
tests/scenarios.ps1mimic WPF with a generator project outside the graph, built with theMSBuildtask, which writes a file into the node's intermediate output directory that the node only reads:OutsideGraphWriteHit: the file is written by this build, so the node is added and the next build hits;OutsideGraphLeftoverSkipped: the file is left over from a previous build and nothing writes it, so the node is still skipped.🤖 Generated with Claude Code