-
Notifications
You must be signed in to change notification settings - Fork 59
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
Added: Assembly Trimming Annotations for SharpGen.Runtime #222
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Can you include also https://github.com/SharpGenTools/SharpGenTools/blob/main/SharpGen.Runtime.COM/SharpGen.Runtime.COM.csproj with those additions please? Overall looks goos |
I was actually confused about that part for a sec when working on this PR. I think that's a leftover from an earlier version, because a while back it seems like If you look at the code generated by newer versions of SharpGenTools, you'll see that it extends from |
No, SharpGen.Runtime.COM is still a thing (for IStream and various other utilities), but it's true that IUnknown and ComObject are now in SharpGen.Runtime to simplify architecture and build infra. |
In this case I'll probably do Then get back to annotating |
I noticed I forgot to conditional exclude packages in |
The following PR adds an initial set of IL Trimmer Annotations for
SharpGen.Runtime
(and what is formerlySharpGen.Runtime.COM
).Motivation
Enable IL trimming, or at the very least safe trimming of libraries that depend on
SharpGen.Runtime
.Ideally, my personal end goal is to contribute to @amerkoleci 's Vortice.Windows, by adding Assembly Trimming support to the library.
Changes
net6.0
target forSharpGen.Runtime
with full trimming support.net5.0
, whereInterface
trim is handled by preserving all.SharpGen.Runtime.Trim.Dummy
project for testing trimmability at publish time. [The analyzer isn't perfect yet]Areas of Note