Open KirillKornienko opened 1 year ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
This is already being addressed in PR https://github.com/dotnet/roslyn/pull/66519 (which is still being reviewed)
Any updates on this? This is something I'd love to have. At the moment without trimming annotations, there's a lot of trial and error to figure out what to tell ILLink to try to get some form of size reduction.
As written, this issue also covers things like Microsoft.CodeAnalysis.Features
or Microsoft.CodeAnalysis.Workspaces
, which are themselves large undertakings. Is it worth splitting those (and possibly other parts of Microsoft.CodeAnalysis
) out into separate issues, and to scope this one to a smaller chunk of work that might be more achievable?
In my application, I parse some user code using
SyntaxFactory.ParseExpression()
API. Since this application is used in WASM, the size of the application is critical, but unfortunatelyMicrosoft.CodeAnalysis.dll
,Microsoft.CodeAnalysis.CSharp.dll
andMicrosoft.CodeAnalysis.VisualBasic.dll
libraries do not support trimming and only these libraries occupy a total of 13.3 MB of size, which is quite a lot.Version Used: 4.5.0
Steps to Reproduce:
Microsoft.CodeAnalysis.CSharp
andMicrosoft.CodeAnalysis.VisualBasic
latest versions.Expected Behavior:
The unused API in these libraries will be cut and the resulting application size will be reduced.
Actual Behavior:
Microsoft.CodeAnalysis.* libraries don't support trimming and they take up a lot of disk space.