Separate exclusive-interface visibility from IDIC policy - #2576
Open
Sergio Pedri (Sergio0694) wants to merge 5 commits into
Open
Sergio Pedri (Sergio0694) wants to merge 5 commits into
Sergio Pedri (Sergio0694) wants to merge 5 commits into
Conversation
Require explicit IDIC opt-in and support narrowing include/exclude filters. Preserve exact producer intent through reference-only WinRT key/value metadata, validate duplicate projected types, and align IDIC members with projected inheritance. Cover the generator pipeline, metadata, and ABI behavior with unit regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Exercise producer boolean combinations, reference metadata, native dynamic casts, managed CCWs, and filter-only incremental rebuilds through isolated projection packages. Preserve standalone SDK-owner coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Explain independent switches, prefix filtering, reference-only key/value metadata, preview package regeneration, and duplicate type diagnostics. Document the shared CSWINRT3004 warning and trimming behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
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 17, 2026 21:58
Sergio Pedri (Sergio0694)
marked this pull request as ready for review
September 17, 2026 22:08
Sergio Pedri (Sergio0694)
enabled auto-merge (squash)
September 17, 2026 22:08
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CI build 157910863 failed in all x64/x86 configurations because WinUI and UWP XAML intentionally both project FullXamlMetadataProviderAttribute. These metadata-only attribute classes emit no WinRT type-map keys, so they must not participate in runtime-type duplicate validation. Keep genuine projected runtime types and exact IDIC requirements checked, and cover the failure with producer/consumer regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Keep public-exclusive interface visibility independent from dynamic interface casting, and add dedicated IDIC include/exclude filters. Preserve the producer's exact selection across reference projection packages using
WindowsRuntimeReferenceAssemblyMetadataAttributekey/value entries without changingWindowsRuntimeReferenceAssemblyAttribute.Motivation
Application-time projection generation currently infers IDIC requirements from public reference interfaces, losing the distinction between exposing an interface and enabling native dynamic casts. Projection authors need to preserve their public API while opting into IDIC explicitly and selecting only the interfaces they need.
IDIC now requires
CsWinRTDynamicallyInterfaceCastableExclusiveTo=true; includes narrow the eligible set and exclusions always win. Missing selection metadata does not imply opt-in, so preview projection packages that require IDIC must be regenerated. Projected types remain globally unique, with duplicate definitions reported as errors.Changes
The changes are organized into three commits:
fc7369dc): wire independent selection throughnuget\,src\WinRT.Generator.Tasks\, the reference and implementation projection generators, andsrc\WinRT.Projection.Writer\, including incremental inputs and debug-repro save/replay. Add reference-only WinRT key/value metadata and shared contract constants, preserve required ABI/CCW support, and align IDIC inherited members with the actual projected inheritance surface. Extendsrc\Tests\ProjectionWriterTest\with policy, metadata, output-shape, diagnostics, and producer/consumer regressions.8c049a9b): extendsrc\Tests\SmokeTests\with isolated producer/package/consumer profiles, native allowed/denied casts, ordinary interfaces, managed CCW round-trips, and filter-only rebuilds on CoreCLR and Native AOT. Preserve the standaloneIFrameworkElementProtected7case with its owner in the SDK projection.989fcb3b): updatedocs\usage.md,docs\aot-trimming.md,docs\diagnostics\cswinrt3004.md, andnuget\readme.mdwith filter precedence, reference-only metadata, preview migration, and diagnostics.Validation