Skip to content

ILTrim: make custom-attribute type-name rewrite best-effort#128122

Closed
Copilot wants to merge 1 commit into
copilot/fix-custom-attribute-todosfrom
copilot/sub-pr-127596
Closed

ILTrim: make custom-attribute type-name rewrite best-effort#128122
Copilot wants to merge 1 commit into
copilot/fix-custom-attribute-todosfrom
copilot/sub-pr-127596

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

This stacked PR updates the custom-attribute value rewrite path in ILTrim to avoid failing on unresolved serialized type names. Rewriting now happens only when type-name resolution succeeds, preserving original payload data otherwise.

  • ## Description
    • Non-throwing resolution in rewrite path
      • Uses non-throwing custom-attribute type-name resolution when parsing serialized type names.
    • Conditional rewrite
      • Replaces the serialized type-name string only when resolution returns a concrete type.
    • Preserve unresolved values
      • Leaves unresolved serialized type names unchanged instead of throwing during blob rewrite.
TypeDesc? resolved =
    _factory.TypeSystemContext.GetTypeByCustomAttributeTypeName(s, _module, throwIfNotFound: false);

if (resolved is not null)
{
    s = TypeNameFormatter.FormatNameForReflection(resolved);
}

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copilot AI changed the title [WIP] [WIP] Rework PR description to address feedback on custom attribute value parsing PR ILTrim: make custom-attribute type-name rewrite best-effort May 13, 2026
Copilot AI requested a review from MichalStrehovsky May 13, 2026 06:58
@MichalStrehovsky MichalStrehovsky deleted the copilot/sub-pr-127596 branch May 13, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants