Skip to content

Only emit '[SupportedOSPlatform]' for reference projections#2321

Merged
Sergio0694 merged 1 commit intostaging/3.0from
dev/skip-supported-os-platform-for-impl
Mar 10, 2026
Merged

Only emit '[SupportedOSPlatform]' for reference projections#2321
Sergio0694 merged 1 commit intostaging/3.0from
dev/skip-supported-os-platform-for-impl

Conversation

@Sergio0694
Copy link
Copy Markdown
Member

Skip emitting [SupportedOSPlatform] attributes when generating implementation projections. The attribute is only relevant for reference assemblies, where it provides platform compatibility metadata for consumers. For implementation projections, the attribute is unnecessary overhead.

This guards two code paths:

  • write_platform_attribute: used for type-level and member-level platform attributes via write_platform_attribute_temp and bind
  • write_custom_attributes: collects SupportedOSPlatform from ContractVersion when enable_platform_attrib is set

Skip emitting [SupportedOSPlatform] attributes when generating
implementation projections. The attribute is only relevant for
reference assemblies, where it provides platform compatibility
metadata for consumers. For implementation projections, the
attribute is unnecessary overhead.

This guards two code paths:
- write_platform_attribute: used for type-level and member-level
  platform attributes via write_platform_attribute_temp and bind
- write_custom_attributes: collects SupportedOSPlatform from
  ContractVersion when enable_platform_attrib is set

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Sergio0694 Sergio0694 requested a review from manodasanW March 9, 2026 22:04
@Sergio0694 Sergio0694 enabled auto-merge (squash) March 9, 2026 22:04
@Sergio0694 Sergio0694 merged commit 26130c5 into staging/3.0 Mar 10, 2026
11 checks passed
@manodasanW manodasanW deleted the dev/skip-supported-os-platform-for-impl branch March 10, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants