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

Support aggressive trimming #1060

Merged
merged 2 commits into from
Oct 21, 2020
Merged

Support aggressive trimming #1060

merged 2 commits into from
Oct 21, 2020

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Sep 23, 2020

Attributes to support aggressive trimming. Will add a test app that does trimming soon.

@davidfowl
Copy link
Contributor

Why only 5.0?

@JamesNK
Copy link
Member Author

JamesNK commented Sep 23, 2020

grpc-dotnet multi-targets 3.0 and 5.0, and the attributes are only present in .NET 5.

When the solution multi-targets again in the future I'll refactor #ifdefs to be like feature flags, i.e. #if LINKER_ATTRIBUTES_SUPPORTED, and define in supported targets.

@davidfowl
Copy link
Contributor

We added them in source to handle ns2.0 style libraries. Trimming is agnostic of the target so you can do the same here

@JamesNK
Copy link
Member Author

JamesNK commented Sep 23, 2020

Could, but why? Everything multi-targets 5.0 so 5.0 packages will always be used in an app with trimming.

@davidfowl
Copy link
Contributor

You don't have to but trimming isn't coupled to the target framework

@JamesNK
Copy link
Member Author

JamesNK commented Sep 23, 2020

Added integration test. Requires a change in Grpc.Core.Api. Blocked while waiting for it to be updated.

grpc/grpc#24217

@JamesNK JamesNK merged commit 96c06f4 into grpc:master Oct 21, 2020
@JamesNK JamesNK deleted the jamesnk/trimming branch October 21, 2020 01:31
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.

3 participants