designs
designs copied to clipboard
Initial draft for a capability-based analyzer
FYI, we're doing a lot of this with RequiresUnreferencedCode
, RequiresAssemblyFiles
, and RequiresDynamicCode
for the runtime. I love this direction and I think it would be great if we had a system like this for generalizing the concept of capability semantics and defining the APIs necessary for recognizing the patterns.
I haven't read through the proposal yet, but I hope the semantics would be compatible with what we've come up with for the above attributes.
Is there any connection to build properties? If I'm building an app for net7.0-windows threading is always available and so I should not need to add any attributes or runtime checks to my app code. As described though, the analyzer would still warn. There should be some connection to some MSBuild property which should enable/disable specific capability checks.