Support trimming
I've been playing around with trimming in some applications this afternoon, and thought I'd try it out with the provider assemblies. Going through the documentation this involved:
- Enabling the trimming analyzer.
- Marking shipping assemblies as trimmable.
- Fixing JSON serializer usage that is not supported by trimming.
Thoughts about this @kevinchalet? For the small amount of work involved in getting it to build I thought it was at least worth pushing up a draft to seek an opinion. Note that I haven't tried this out in an actual real trimmed ASP.NET Core application yet.
Thoughts about this @kevinchalet? For the small amount of work involved in getting it to build I thought it was at least worth pushing up a draft to seek an opinion.
Given the modular nature of the aspnet-contrib providers, I'd expect the gain to be marginal as pretty much all the plumbing code is needed once you register a provider. That said, since the cost seems absurdly low (it's even too easy to be true 🤣), there's no reason not to do it.
AFAIK, the OAuth 2.0 base handler hasn't been updated yet to be linker-friendly and it's not clear to me whether it's something that will happen in 7.0. Would that affect our trimming story?
/cc @Tratcher
AFAIK, the OAuth 2.0 base handler hasn't been updated yet to be linker-friendly and it's not clear to me whether it's something that will happen in 7.0. Would that affect our trimming story?
It's on the list, we'll see how far we get. I agree that there's not a lot to trim here, you need most of the functionality.
Will come back to this in the future if there's a need to.