designs icon indicating copy to clipboard operation
designs copied to clipboard

Initial draft for a capability-based analyzer

Open terrajobst opened this issue 2 years ago • 2 comments

terrajobst avatar Apr 12 '22 03:04 terrajobst

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.

agocke avatar Apr 13 '22 21:04 agocke

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.

vitek-karas avatar Apr 21 '22 10:04 vitek-karas