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/7.0] Make System.Transactions.Local trimmable on Windows (#75176) #75377

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented Sep 9, 2022

Backport of #75176 to release/7.0

Customer Impact

This is fixing the trimmability of the new distributed transaction support in .NET 7.

  1. When an app using distributed transactions is trimmed, no warning is emitted to the developer, but their app doesn't work. This breaks our goal of "no warnings means your app works after trimming".
  2. When a Windows app is trimmed, the System.Transactions.Local assembly is not being trimmed, even if the app doesn't use Transactions.

Testing

Manually tested that System.Transactions.Local gets trimmed away when trimming an app on Windows that doesn't use System.Transactions.

No real logic has changed. All automated tests pass.

Risk

Low. This is a feature ported from .NET Framework to .NET 7. This code was never supported on .NET Core previously, so it won't break anyone.


Remove IsTrimmable=false from the project, so this assembly is still trimmed with partial trimming on Windows.

Add a "LibraryBuild" ILLink warning, so when the distributed transaction code is not trimmed, the app developer gets a warning that it is not guaranteed to work.

Fix #75031

  • Fix x86 build. Move the ILLink suppression to a method that is completely trimmed on x86.

* Make System.Transactions.Local trimmable on Windows

Remove `IsTrimmable=false` from the project, so this assembly is still trimmed with `partial` trimming on Windows.

Add a "LibraryBuild" ILLink warning, so when the distributed transaction code is not trimmed, the app developer gets a warning that it is not guaranteed to work.

Fix dotnet#75031

* Fix x86 build. Move the ILLink suppression to a method that is completely trimmed on x86.
@ghost ghost assigned eerhardt Sep 9, 2022
@eerhardt eerhardt added the Servicing-consider Issue for next servicing release review label Sep 9, 2022
@carlossanlop carlossanlop removed the Servicing-consider Issue for next servicing release review label Sep 9, 2022
@carlossanlop
Copy link
Member

No label needed until after Tuesday.
We only need @danmoseley 's approval.

@danmoseley
Copy link
Member

Approved. Severity meets the bar - significant size regression in scenarios we care about. Signed off by feature owner and Jan.

@carlossanlop
Copy link
Member

Signed off. Approved. CI is green. Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit f9b38e8 into dotnet:release/7.0 Sep 12, 2022
@eerhardt eerhardt deleted the Port75031 branch September 14, 2022 20:59
@ghost ghost locked as resolved and limited conversation to collaborators Oct 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants