Repository navigation
Resolve Vcpkg manifest mappings in nested install roots - #1915
Open
J.s Ibitoye (jsibitoye) wants to merge 1 commit into
Open
J.s Ibitoye (jsibitoye) wants to merge 1 commit into
J.s Ibitoye (jsibitoye) wants to merge 1 commit into
Conversation
Use the nearest valid source manifest mapping within the containing vcpkg_installed tree, including MSBuild triplet-specific install roots. Preserve preferred and fallback ordering and unmapped SPDX locations. Addresses source attribution in microsoft#1865.
J.s Ibitoye (jsibitoye)
requested review from
Jeff Mendoza (jeffmendoza)
and
a balanced review from Copilot
December 4, 2026 16:07
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the nested-root Vcpkg source-manifest attribution changes.
No open issues 🎉
What changed in this PR
Fixes Vcpkg source-manifest attribution for nested MSBuild install roots, addressing the mapping portion of #1865. Explicit dependency classification remains out of scope.
Changes:
- Finds the nearest valid mapping within the containing installed tree.
- Adds regression coverage for layouts, mapping precedence, and tree boundaries.
- Updates documentation and increments the detector version.
| File | Description |
|---|---|
| test/Microsoft.ComponentDetection.Detectors.Tests/VcpkgComponentDetectorTests.cs | Adds manifest-attribution regression tests. |
| src/Microsoft.ComponentDetection.Detectors/vcpkg/VcpkgComponentDetector.cs | Searches ancestor mappings within tree boundaries; increments version. |
| docs/detectors/vcpkg.md | Documents mapping precedence and nested-root support. |
Review effort: Balanced
|
I have only had a chance to review the changes to the code and tests, but they look good. Thanks! |
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.
Problem
In #1865, derekpiasecki reported that the Vcpkg detector discovers
manifest-info.jsonin MSBuild's triplet-specific install root but still looks for the mapping only directly undervcpkg_installed. Components consequently retain their generated SPDX file location instead of the source manifest.Change
Resolve the nearest valid manifest mapping while walking from the SPDX file's directory to the containing
vcpkg_installeddirectory. Each level retains the preference forvcpkg/manifest-info.jsonovermanifest-info.json. The search stays within the nearest installed tree and cannot select a sibling tree's mapping.The change includes regression tests, updated detector documentation, and a detector version increment. It addresses the source-manifest association portion of #1865; the separate question about explicitly referenced dependencies remains open.
Validation
The Common suite has 226 passes, 13 platform skips, and five Docker-dependent failures in this environment. An untouched-base worktree produces the same result for every test. Tests used the standalone Microsoft.Testing.Platform executable because the
dotnet testlauncher's local IPC is unavailable here. Integration, Windows, and snapshot verification were not run locally.AI assistance: ChatGPT was used to develop the patch and regression tests.