Open ericstj opened 9 months ago
@333fred for triage
@ericstj is this something that you still want since the namespace idea?
I think this request still has merit regardless but its less important if we have a heuristic that works well. Let's wait and see how the namespace suggestion works in practice.
Background and Motivation
When writing tools that examine an assembly for compatibility, or for public API - it's important to know what's relevant.
There are many types that are "known" by the compiler and used to effect the behavior of API - even when those are not public in the assembly.
It would be nice if the compiler exposed an API that listed these known types so that we wouldn't need to consider them ourselves.
Related https://github.com/dotnet/roslyn/issues/68968
Proposed API
Usage Examples
Alternative Designs
We can maintain a static list ourselves - or ask users to specify - but it's error prone and incomplete. The compiler knows which symbols it allows to be defined in user assemblies to augment its behavior - it would d be nice if that was exposed to callers.
Risks
Potentially some performance risk - though this could be implemented entirely on the side.