Consider adding "accepted SDK name match pattern" to SDK manifests
Currently, we try SDK resolvers based on which are resolved, and their self-defined priority order. But that means that (for example) we must load the NuGet SDK resolver even for projects that don't use it, because we can't know in advance that (for example) the .NET SDK resolver will be sufficient.
We could add a name pattern to the registration and search by longest-match first.
It could be something like
- .NET SDK Resolver:
Microsoft.NET.* - NuGet resolver:
*
Then if we're trying to resolve Microsoft.NET.SDK it'll match against the former and we won't even have to load the latter.
(this is based on ideas from and discussion with @olgaark)
@olgaark, I opened a PR for this issue: #7597. Here is the spec file with the description of the new resolving algorithm. The main change from the initial idea is that we decided to go with regex instead of wildcards. Feel free to review & discuss the decisions we have made for this change.
@AR-May Thanks! The design looks good to me