Repository navigation
Migrate ResolvePackageFileConflicts to IMultiThreadableTask - #53943
jankratochvilcz merged 9 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates ResolvePackageFileConflicts (a shared conflict-resolution MSBuild task) to participate in MSBuild’s upcoming multi-threaded execution model by implementing IMultiThreadableTask and routing relative path resolution through TaskEnvironment (project-directory rooted), with accompanying behavioral tests to validate CWD-independence and concurrency behavior.
Changes:
- Mark
ResolvePackageFileConflictsas multi-threadable and add aTaskEnvironmentproperty used to resolve relative inputs against the project directory. - Plumb a path-resolver into
ConflictItemso file existence/version reads operate on resolved (project-rooted) absolute paths. - Add new unit tests validating project-dir-based path resolution, parity across differing CWDs, output relativity, and concurrent execution behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageFileConflictsMultiThreading.cs | Adds behavioral tests for CWD independence, output relativity, and concurrent execution. |
| src/Tasks/Common/ConflictResolution/ResolvePackageFileConflicts.cs | Implements IMultiThreadableTask, introduces TaskEnvironment, and uses it to resolve relative paths for manifests/TFDs and conflict items. |
| src/Tasks/Common/ConflictResolution/ConflictItem.cs | Adds optional path resolver and uses it for file I/O (exists and version reads). |
cea04df to
780dac8
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8073647 to
c0df00a
Compare
jankratochvilcz
left a comment
There was a problem hiding this comment.
Looks good! Left a couple of minor comments :-)
jankratochvilcz
left a comment
There was a problem hiding this comment.
Left one bit, please check it out :-)
jankratochvilcz
left a comment
There was a problem hiding this comment.
Looks good, thank you!
AR-May
left a comment
There was a problem hiding this comment.
Have not yet finished with reviewing this PR. Publishing intermediate comments.
AR-May
left a comment
There was a problem hiding this comment.
Overall looks good! My only unresolved question concerns the behavioral change in #53943 (comment)
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s). |
Fixed dotnet/msbuild#13777
Migrate ResolvePackageFileConflicts to IMultiThreadableTask
Migrates ResolvePackageFileConflicts (MSBuild task in Microsoft.NET.Build.Tasks) to support concurrent multi-threaded execution by implementing IMultiThreadableTask with a TaskEnvironment property.
Why
From OrchardCore build profiling (see gist):
This migration does not address the incremental-build regression or log-volume issue directly but enables the task to run safely under the upcoming multi-threaded MSBuild execution model.
What changed
Tests
Review status
Internally reviewed via 3-round playbook (merge-group-review → expert-review-msbuild-migration → opus-4.7 adversarial). All rounds PASS.
Depends on polyfills infrastructure (already in main via #52909).