Skip to content

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

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

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

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Feb 14, 2026

Copy link
Copy Markdown
Member

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.

@simonrozsivalsimonrozsival changed the title [TrimmableTypeMap][Core A] Foundation model + metadata type providers[TrimmableTypeMap][Core A] Foundation model and metadata providersFeb 14, 2026
@simonrozsivalsimonrozsival 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
Comment threadsrc/Microsoft.Android.Sdk.TrimmableTypeMap/Scanner/JavaPeerInfo.cs Outdated
@simonrozsival

Copy link
Copy Markdown
MemberAuthor

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
CopilotAI review requested due to automatic review settings February 16, 2026 12:53

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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
FileDescription
src/Microsoft.Android.Sdk.TrimmableTypeMap/Scanner/SignatureTypeProvider.csAdds minimal SRM signature decoder to produce managed type name strings.
src/Microsoft.Android.Sdk.TrimmableTypeMap/Scanner/JavaPeerInfo.csAdds core scanner result data model consumed by downstream generators.
src/Microsoft.Android.Sdk.TrimmableTypeMap/Scanner/CustomAttributeTypeProvider.csAdds SRM custom-attribute decoder helper (including enum underlying type resolution).
src/Microsoft.Android.Sdk.TrimmableTypeMap/Microsoft.Android.Sdk.TrimmableTypeMap.csprojIntroduces the new TrimmableTypeMap project and its package references/IVT.
eng/Versions.propsAdds a centralized version property for System.Reflection.Metadata.

simonrozsivaland 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
Copy Markdown
MemberAuthor

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.

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Mar 19, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Area: CoreCLRIssues that only occur when using CoreCLR.Area: NativeAOTIssues that only occur when using NativeAOT.copilot`copilot-cli` or other AIs were used to author this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@simonrozsival