phmonte / Buildalyzer

A utility to perform design-time builds of .NET projects without having to think too hard about it.
MIT License
589 stars 92 forks source link

Proposal: represent of CompilerItems and CompilerProperties as dedicated types #245

Closed Corniel closed 3 months ago

Corniel commented 5 months ago

While debugging #244, I noticed that debugging which compiler properties where active was not really clear. So similar to #243, I introduced two dedicated (read-only) types that contain the properties and the items. Potentiality, it can replace the dictionaries in the AnalyzerResult. That is, obviously a breaking change.

Under the hood, CompilerProperties and CompilerItemsCollection are dictionaries (with case-insensitive keys), but as I think (that can be challenged) having the values without the related key have less value in this case, the TryGet() method returns a KeyValuePair like struct that combines the two.

Let me know what you think.

daveaglick commented 4 months ago

As with #243, I love where your thinking with these changes but just don't have the bandwidth to bring them in. https://github.com/daveaglick/Buildalyzer/issues/247 is a request for a new maintainer(s) and I think it makes sense to let whoever takes over the project decide the direction of open PRs. Thanks for the work, and hopefully we can find a maintainer soon and get this merged.

Corniel commented 4 months ago

@phmonte I think this one is also ready for review. This one should be easy (I think(.