Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/9.0] Switch SwiftSelf<T> position requirement to last #108856

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 14, 2024

Backport of #108547 to release/9.0

/cc @jakobbotsch

Customer Impact

  • Customer reported
  • Found internally

Interop with instance methods on Swift structs that have any parameters is impossible. Currently Mono and CoreCLR enforce the "self" parameter to be first, but the Swift compiler requires it to be last.
This results in incompatible signatures that makes interop not work in this scenario.

Note that there is still a known issue with Mono's handling; see #108855. We expect to fix this in servicing if it ends up impacting user scenarios.

Regression

  • Yes
  • No

Swift interop is new in .NET 9.

Testing

Tests with instance methods that have parameters are added as part of the PR.

Risk

Low. Swift interop is new in .NET 9.

This is added as the last parameter by the Swift compiler, so to support
instance calls taking parameters this needs to come last.
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 14, 2024
@teo-tsirpanis teo-tsirpanis added area-System.Runtime.InteropServices and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 14, 2024
@teo-tsirpanis teo-tsirpanis added this to the 9.0.0 milestone Oct 14, 2024
@jeffschwMSFT jeffschwMSFT added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed area-System.Runtime.InteropServices labels Oct 14, 2024
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

lgtm. we will take for consideration in 9 GA

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Oct 14, 2024
@jakobbotsch
Copy link
Member

#108547 is not merged yet, but I expect to merge it soon once CI is sorted out. In the mean time I am just getting this all ready to merge as well in light of the snap tomorrow.

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants