Preserve exact type selection in merged projections - #2553
Merged
Sergio Pedri (Sergio0694) merged 1 commit intoSep 10, 2026
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Sergio Pedri (Sergio0694)
requested a review
from Manodasan Wignarajah (manodasanW)
September 8, 2026 14:14
Sergio Pedri (Sergio0694)
enabled auto-merge (squash)
September 8, 2026 17:10
Separate exact type identities from namespace prefix filters so app-time generation preserves reference projection exclusions without changing existing SDK or WinUI filtering. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sergio Pedri (Sergio0694)
force-pushed
the
user/sergiopedri/exact-projection-filtering
branch
from
September 9, 2026 23:42
b79d0ea to
b6b12bb
Compare
| [DataRow("Contoso.UserProfile.UserSetupManager", false)] | ||
| [DataRow("Contoso.User.Profile", false)] | ||
| [DataRow("Contoso.Users.User", false)] | ||
| [DataRow("contoso.User", false)] |
There was a problem hiding this comment.
so we are saying here this one is case sensitive right?
Member
Author
There was a problem hiding this comment.
Yeah it should be, namespaces are case sensitive in .NET
Manodasan Wignarajah (manodasanW)
approved these changes
Sep 10, 2026
Sergio Pedri (Sergio0694)
deleted the
user/sergiopedri/exact-projection-filtering
branch
September 10, 2026 07:07
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.
Summary
Preserve the exact type surface of reference projections when generating merged implementation projections. Keep existing namespace-prefix filtering for the Windows SDK, WinUI additions, and reference-projection settings.
Motivation
The merged projection generator currently passes fully qualified type names from reference assemblies to a prefix filter. An include for
Contoso.Usercan therefore match bothContoso.User2and the namespaceContoso.UserProfile, regenerating types deliberately omitted from the reference projection and introducing unsupported API signatures.The reference assembly already describes the intended type set. Separating exact identities from intentional prefix rules preserves that surface without requiring new consumer-facing MSBuild properties or adding support for previously excluded APIs.
Changes
src\WinRT.Projection.Generator\Generation\ProjectionGenerator.Generate.cs: populate exact type includes from projection reference assemblies and component metadata, while retaining intentional SDK and WinUI namespace rules.src\WinRT.Projection.Writer\: add theIncludeTypesoption, preserve exclude precedence and existing prefix semantics, and prevent exact type includes from enabling namespace additions.src\Tests\ProjectionWriterTest\: add synthetic metadata and regression coverage for type-name and namespace collisions, mixed filters, exclude precedence, namespace additions, and required exclusive-to factory infrastructure.