-
Notifications
You must be signed in to change notification settings - Fork 5
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
Set partial trimming #265
Set partial trimming #265
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.
Nice find, we will likely want to revisit this in a while to see if its needed anymore.
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk"> |
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.
You're adding a BOM here. Did you use VS to edit this file? Can you set the encoding to be without BOM?
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.
our editorconfig does set utf-8 (which means without BOM), but VS just doesn't respect that... 😠
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.
the linter we use is unfortunately not able to catch charset violations
editorconfig-checker/editorconfig-checker#85
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.
Yea I saw that and thought it was weird and did edit through VS. I'll make a new pr to fix it
I believe there's a way to scope what we trim/don't trim to specific assemblies via a config file. It might be able to reduce binary size a bit without touching the "fragile" assemblies (e.g. AWS ones). |
### Why #265 (comment) I didn't realize that's what was happening. I looked over and thought I changed the naming or something but saw they were the same. Did not know byte order mark was a thing 😅
Why
The published build of bmx right now will crash with the error
No parameterless constructor defined for type 'Amazon.Util.Internal.PlatformServices.NetworkReachability'
https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained
When building bmx with aot, we reduce the deployment size by getting rid of unused parts of libraries. Theres a problem though with the aws sdk right now where it gets rid of some parts we actually need. I think it's to do with this
How
The github issue page mentioned a temporary solution to set the trim mode to partial for now. The build size would be 17.5MB compared to 13 so it seems like not a big issue?