-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
IsTrimmable metadata requirement is not flexible enough #11863
Comments
/cc @sbomer @vitek-karas |
To give some more context: There are a few asks here:
I am planning to do #12035 for .NET 5. How do we want to prioritize the rest? Are there any other parts to this that I missed? |
I don't think that's the same thing. Doing manual edits in projects and set IsTrimmable to true for NuGets which are linker friendly is not great.
I think that's a very different concept and will open another issue then
#12035 is required and we also need a solution for component vendors to make their NuGets to be automatically linked which I think is the second large missing piece today |
I must admit I'm a bit nervous adding official looking support for more aggressive trimming given that for .NET 5 we won't have the correctness in place. Hopefully in 6 we will be able to revisit this and somehow tie correctness into it as well. |
I see - so you are asking for it to be defined by the package itself. I agree that the right place to do this is in the assembly or an extra file, rather than the package manifest for example.
I could make it a non-public option for now - I think it makes sense to add even just for linker developers. I have lost count of the number of times I have had to add sizeable msbuild snippets to my project just to get this behavior. :) |
I will close this for now - we can discuss in the linked issues, or re-open if there are more missing pieces. |
We need to simplify how any of our SDKs can be enabled for true (aggressive) linking and ideally the same approach could be used for component vendors or any other NuGet packages. Nowadays this process is controlled using
IsTrimmable
metadata but there is no easy way to set this within NuGet package or runtime-pack and it can be set only at consuming side.We could also redo this very restrictive setup and consider making any assembly illinker compatible when it has a certain assembly-level attribute (e.g.
ILLinkCompatibility ("link")
. This attribute could even be automatically generated by our tooling as part of the build when linker does not report any warnings.@sbomer @vitek-karas
The text was updated successfully, but these errors were encountered: