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

Follow up to trimming changes for 6.x #1470

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

eerhardt
Copy link
Contributor

@eerhardt eerhardt commented Jan 12, 2024

Proposed Changes

The allows the 6.x library to be used in trimmed and native AOT'd applications without any warnings.

Since the 6.x branch doesn't target net6.0+, it only targets netstandard2.0 and net462, the #if NET6_0_OR_GREATER checks don't do anything.

To resolve this issue, and copy the trimming attributes into this library following the recommendation at https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/#approach-2-define-the-attributes-internally. This allows the library to apply the attributes without targeting net6.0+.

Also moving DebugUtil to the test project - porting #1009 from the main branch.

Contributes to #1410

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

cc @lukebakken

@lukebakken lukebakken self-requested a review January 12, 2024 21:41
@lukebakken lukebakken self-assigned this Jan 12, 2024
@lukebakken lukebakken added this to the 6.9.0 milestone Jan 12, 2024
The allows the 6.x library to be used in trimmed and native AOT'd applications without any warnings.

Since the 6.x branch doesn't target net6.0+, it only targets netstandard2.0 and net462, the #if NET6_0_OR_GREATER checks don't do anything.

To resolve this issue, and copy the trimming attributes into this library following the recommendation at https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/#approach-2-define-the-attributes-internally. This allows the library to apply the attributes without targeting net6.0+.

Also moving DebugUtil to the test project - porting rabbitmq#1009 from the main branch.

Contributes to rabbitmq#1410

Add AotCompatibility.TestApp

Add PS1 to run test app

Add AOT test to windows GHA
@lukebakken lukebakken merged commit 13dbfdc into rabbitmq:6.x Feb 13, 2024
3 checks passed
@eerhardt eerhardt deleted the AdjustTrimmingChanges branch February 13, 2024 16:15
@eerhardt
Copy link
Contributor Author

Thanks again here, @lukebakken, for your help pushing this through. When this is released I'll be able to remove the last warning suppression from dotnet/eShop, which will make the 2 apps there 100% native AOT compatible.

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