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-staging] Add forwarding support for WasmLinkage on LibraryImport #109364

Open
wants to merge 1 commit into
base: release/9.0-staging
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

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

Backport of #109234 to release/9.0-staging

/cc @jkoritzinsky

Customer Impact

  • Customer reported
  • Found internally

Consumers trying to use the new WasmImportLinkage attribute introduced in .NET 9 encounter unexpected and inconsistent failures when using LibraryImportAttribute, the recommended mechanism for doing interop with C-ABI libraries.

This backport introduces the support for WasmImportLinkage to LibraryImportAttribute, so the new attribute can be used as our documentation and the attribute's design intend, as well as how our users expect.

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

[How was the fix verified? How was the issue missed previously? What tests were added?]

We added tests to verify that the attribute is forwarded to the underlying DllImport and as such will provide the expected experience.

Risk

[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.]

Low: LibraryImport is never used in combination with WasmImportLinkage in any product code, so we won't be making any changes to any generated product code with this backport.

Additionally, the scope of this change is similar to the scope of similar changes we've backported previously and to changes that are introduced in new SDK bands in code fixes and analyzers shipped in the SDK.

@AaronRobinsonMSFT AaronRobinsonMSFT added the Servicing-consider Issue for next servicing release review label Oct 30, 2024
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.0.x

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

Successfully merging this pull request may close these issues.

5 participants