dotnet / command-line-api

Command line parsing, invocation, and rendering of terminal output.
https://github.com/dotnet/command-line-api/wiki
MIT License
3.38k stars 381 forks source link

Improved access to `CommandValueResult` #2467

Closed KathleenDollard closed 1 month ago

KathleenDollard commented 1 month ago

We encountered and issue with CliDiagnostic not being able to get to the CommandValueResult. I added it to the ParseResult which needed it, and updated the Powderhouse tests in ParserTests

There may be additional work needed to for CliDiagnostic to include the CommandValueResult.

We discussed supplying a common base class for ValueResults and CommandValueResults, but I did not include this.

While CommandResult looks separable, it can't be sent onward outside core as long as it derives from SymbolResult which retains the link to the SymbolTree which needs to remain behind.