Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Mar 28, 2022

Introduce devs to trimming. Links to general documentation and ASP.NET Core specific content.

@JamesNK JamesNK added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Mar 28, 2022
@ShreyasJejurkar
Copy link
Contributor

Just for the information, how many assemblies from aspnetcore are yet to trim?

@JamesNK
Copy link
Member Author

JamesNK commented Mar 28, 2022

MANY

About 10 15 are trimmed out of maybe 130?

@ShreyasJejurkar
Copy link
Contributor

ok. Thanks. I will take a look at one of them and will see how can I contribute to it! :)

@JamesNK
Copy link
Member Author

JamesNK commented Apr 1, 2022

FYI @eerhardt @agocke (Just a heads up if you're curious. Let me know if you're not interested in being pinged on trimming PRs)

@ShreyasJejurkar
Copy link
Contributor

Any plans to enable Trim analyzers to catch trim warnings at build time itself.

https://docs.microsoft.com/en-gb/dotnet/core/deploying/trimming/prepare-libraries-for-trimming#set-enabletrimanalyzer

@JamesNK
Copy link
Member Author

JamesNK commented Apr 1, 2022

Maybe. My experience is build analysis doesn't provide many errors. Publishing with ILLinker is the best way to get a complete set of warnings.

@ShreyasJejurkar
Copy link
Contributor

meaning is there any discrepancy between the errors that you get from Roslyn analyzers and when you do publish!?

@JamesNK
Copy link
Member Author

JamesNK commented Apr 1, 2022

Yes. It's mentioned in the doc. Not enough information is available at build to do a complete analysis.

@ShreyasJejurkar
Copy link
Contributor

oh ok.

@agocke
Copy link
Member

agocke commented Apr 1, 2022

The analyzer should be significantly more powerful in the latest 7.0 previews. There are still some cases that can only be caught with the linker, but as long as your transitive references are annotated, you should get quite a lot through the analyzer.

Co-authored-by: Aditya Mandaleeka <[email protected]>
@JamesNK JamesNK enabled auto-merge (squash) April 7, 2022 02:40
@JamesNK JamesNK merged commit 4880fee into main Apr 7, 2022
@JamesNK JamesNK deleted the jamesnk/trimming-docs branch April 7, 2022 06:53
@ghost ghost added this to the 7.0-preview4 milestone Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants