Skip to content

[TrimmableTypeMap][Core A] Foundation model and metadata providers#10816

Closed
simonrozsival wants to merge 6 commits intodotnet:mainfrom
simonrozsival:dev/simonrozsival/ttm-core-a-foundation
Closed

[TrimmableTypeMap][Core A] Foundation model and metadata providers#10816
simonrozsival wants to merge 6 commits intodotnet:mainfrom
simonrozsival:dev/simonrozsival/ttm-core-a-foundation

Conversation

@simonrozsival
Copy link
Member

@simonrozsival simonrozsival commented Feb 14, 2026

Core slice A from #10805.

Scope

  • New TrimmableTypeMap project definition
  • Shared scanner data model (JavaPeerInfo)
  • Metadata signature/type providers used by scanner components

Notes

  • Scanner execution logic and indexing are intentionally split into follow-up slices.

@simonrozsival simonrozsival changed the title [TrimmableTypeMap][Core A] Foundation model + metadata type providers [TrimmableTypeMap][Core A] Foundation model and metadata providers Feb 14, 2026
@simonrozsival simonrozsival added copilot `copilot-cli` or other AIs were used to author this trimmable-type-map Area: CoreCLR Issues that only occur when using CoreCLR. Area: NativeAOT Issues that only occur when using NativeAOT. labels Feb 14, 2026
@simonrozsival
Copy link
Member Author

Addressed review comments: prefer string interpolation, use null patterns. Updated CustomAttributeTypeProvider and SignatureTypeProvider accordingly. Note: record-based types and package version variables addressed in downstream core-b branch.

@simonrozsival simonrozsival marked this pull request as ready for review February 16, 2026 12:53
Copilot AI review requested due to automatic review settings February 16, 2026 12:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the foundational “Core slice A” pieces for the new Microsoft.Android.Sdk.TrimmableTypeMap project, introducing the shared scanner data model and the minimal System.Reflection.Metadata providers needed to decode signatures and custom attributes without relying on Cecil.

Changes:

  • Introduces the new Microsoft.Android.Sdk.TrimmableTypeMap netstandard project with package dependencies.
  • Adds the shared scanner data model (JavaPeerInfo + related method/ctor metadata types).
  • Adds minimal ISignatureTypeProvider and ICustomAttributeTypeProvider implementations for SRM decoding.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Microsoft.Android.Sdk.TrimmableTypeMap/Scanner/SignatureTypeProvider.cs Adds minimal SRM signature decoder to produce managed type name strings.
src/Microsoft.Android.Sdk.TrimmableTypeMap/Scanner/JavaPeerInfo.cs Adds core scanner result data model consumed by downstream generators.
src/Microsoft.Android.Sdk.TrimmableTypeMap/Scanner/CustomAttributeTypeProvider.cs Adds SRM custom-attribute decoder helper (including enum underlying type resolution).
src/Microsoft.Android.Sdk.TrimmableTypeMap/Microsoft.Android.Sdk.TrimmableTypeMap.csproj Introduces the new TrimmableTypeMap project and its package references/IVT.
eng/Versions.props Adds a centralized version property for System.Reflection.Metadata.

simonrozsival and others added 6 commits February 16, 2026 14:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
….Metadata

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove unused 'using System.Collections.Immutable' import
- Fix nested enum type resolution in GetUnderlyingEnumType by reusing
  GetTypeFromDefinition which correctly handles nested types
- Cache enum type lookups to avoid O(N) scan on each call
- Remove redundant LangVersion=latest from csproj (set by Configuration.props)
- Convert JavaPeerInfo, MarshalMethodInfo, ActivationCtorInfo to records

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…preview.1

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add netstandard2.0 polyfills for IsExternalInit, RequiredMemberAttribute,
CompilerFeatureRequiredAttribute, and SetsRequiredMembersAttribute.

Convert all record properties to init-only, with 'required' on
non-nullable string and essential properties.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@simonrozsival
Copy link
Member Author

Closing: merged into unified PR #10823. The Core A/B/C split was too granular — a single scanner-core PR is more practical for review while still being much smaller than the original #10805.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CoreCLR Issues that only occur when using CoreCLR. Area: NativeAOT Issues that only occur when using NativeAOT. copilot `copilot-cli` or other AIs were used to author this trimmable-type-map

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments