You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because these are shipped as two separate packages and particularly because the analyzers are only a development dependency, it's easy for one to use the annotations without also running the analyzers which can lead to analysis holes. If we consolidated the packages, then the analyzers would flow transitively to all consumers of the annotations, making the default case the safe case. This wouldn't prevent someone going out of their way to actively disable the diagnostics, but it removes a pretty easy to set off footgun.
Example
Library A
This library references both Annotations and Analyzers.
[Immutable]publicclassFoo{}
Library B
This library references Library A, so transitively references Annotations but not Analyzers.
publicclassBar:Foo{publicintMutable{get;set;}}
Application
This application references Library A and B, as well as both Annotations and Analyzers.
[Immutable]publicclassBaz{// No problems here!publicFooFoo{get;init;}}Barbar=newBar{Mutable=1};Bazbaz=newBaz{Foo=bar};bar.Mutable+=1;// oh no!
Open Questions
How should TestAnalyzers factor into this?
How do we transition without breaking existing dependency graphs? e.g. if we move Annotations types to a new lib, how do we avoid name conflicts?
The text was updated successfully, but these errors were encountered:
Because these are shipped as two separate packages and particularly because the analyzers are only a development dependency, it's easy for one to use the annotations without also running the analyzers which can lead to analysis holes. If we consolidated the packages, then the analyzers would flow transitively to all consumers of the annotations, making the default case the safe case. This wouldn't prevent someone going out of their way to actively disable the diagnostics, but it removes a pretty easy to set off footgun.
Example
Library A
This library references both Annotations and Analyzers.
Library B
This library references Library A, so transitively references Annotations but not Analyzers.
Application
This application references Library A and B, as well as both Annotations and Analyzers.
Open Questions
The text was updated successfully, but these errors were encountered: