Skip to content
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

Enable AoT and trimming analyzers #2008

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

martincostello
Copy link

  • Enable AoT and trim analyzers for net6.0 and above.
  • Fix trim warnings identified by analyzers.

Contributes to #1985.

- Enable AoT and trim analyzers for `net6.0` and above.
- Fix trim warnings identified by analyzers.

Contributes to serilog#1985.
Update baseline with `[RequiresDynamicCode]`.
@nblumhardt
Copy link
Member

Sorry about the silence on this! I checked in when it was still WIP and didn't realise that you'd fixed the build issue.

Did you reach any new conclusions about how the public Serilog API might evolve to better support trimming?

Happy merging this once dev is 4.0.0 (#2015) and working forward from there.

@martincostello
Copy link
Author

Did you reach any new conclusions about how the public Serilog API might evolve to better support trimming?

I didn't think about it much - once I reached a public interface I stopped digging much further as it would have lead to breaking changes to be able to pass a generic type through with all the right annotations for things like destructuring properties etc.

I'd be happy to help contribute towards a solution with you folks separately back in #1985.

@nblumhardt
Copy link
Member

Hi @martincostello; there was some progress on this in #2027, do those changes overlap substantially with this PR? (Guessing yes?)

@martincostello
Copy link
Author

Looks like it did everything except enable the analysers: https://github.com/serilog/serilog/pull/2008/files#diff-e2a968c34d16c6dc034a40eaf9cc66d86a8d07662cd059cc895eb6b4149f143a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants