chore: bump System.CommandLine from 2.0.0-beta4.22272.1 to 2.0.2 #648
Open
manel27 wants to merge 3 commits intocriticalmanufacturing:development-6xfrom
Open
chore: bump System.CommandLine from 2.0.0-beta4.22272.1 to 2.0.2 #648manel27 wants to merge 3 commits intocriticalmanufacturing:development-6xfrom
manel27 wants to merge 3 commits intocriticalmanufacturing:development-6xfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the CLI and its test suite to work with System.CommandLine 2.0.2, replacing the previous beta4-based APIs (notably CommandHandler/NamingConventionBinder, CommandLineBuilder, and legacy console abstractions).
Changes:
- Bump
System.CommandLineto 2.0.2 acrosscmf-cli,core, templates, and tests; removeSystem.CommandLine.NamingConventionBinder. - Refactor command wiring to the newer model (
SetAction,ParseResult.GetValue,Command.Subcommands, etc.). - Update tests to a new
TestConsoleapproach and migrate invocations toParse(...).Invoke(...).
Reviewed changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/tests.csproj | Adds System.CommandLine 2.0.2 reference for tests. |
| tests/Utilities/TestUtilities.cs | Updates test invocation helpers to use parse/invoke and a wrapper. |
| tests/TestConsole.cs | Introduces a new test console + ParseResult extensions for output capture. |
| tests/Specs/Telemetry.cs | Adjusts to StartupModule.Configure returning only RootCommand. |
| tests/Specs/Publish.cs | Migrates handler setup and invocation to new parsing/value APIs. |
| tests/Specs/Pack.cs | Migrates invocations/handlers to new APIs throughout pack tests. |
| tests/Specs/New.cs | Updates command invocation pattern to parse/invoke. |
| tests/Specs/Logging.cs | Reworks loglevel option parsing to match new option API. |
| tests/Specs/ListDependencies.cs | Updates handler wiring and invocation; removes old binder usage. |
| tests/Specs/JsonValidator.cs | Migrates repeated command invocations to parse/invoke. |
| tests/Specs/Init.cs | Migrates init tests to new parser wrapper + invocation pattern. |
| tests/Specs/DEEValidator.cs | Migrates repeated command invocations to parse/invoke. |
| tests/Specs/Assemble.cs | Updates assertions and value extraction for new command/option APIs. |
| core/core.csproj | Bumps System.CommandLine to 2.0.2 and removes naming binder package. |
| core/StartupModule.cs | Removes CommandLineBuilder pipeline and changes Configure return type. |
| core/LoggerHelpers.cs | Reworks LogLevelOption using new option parser/default factories. |
| core/Commands/BaseCommand.cs | Switches to Subcommands and adds URI parsing helpers. |
| cmf-cli/resources/template_feed/plugin/Plugin.Template/src/%solutionName%.csproj | Bumps template dependency to System.CommandLine 2.0.2. |
| cmf-cli/cmf.csproj | Bumps System.CommandLine to 2.0.2 and removes naming binder package. |
| cmf-cli/Program.cs | Updates startup/configure call and shifts to parse/invoke execution model. |
| cmf-cli/Commands/upgrade/UpgradeCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/upgrade/UpgradeBaseCommand.cs | Reworks args/options parsing and handler wiring. |
| cmf-cli/Commands/restore/RestoreCommand.cs | Reworks repos option + argument defaults and handler wiring. |
| cmf-cli/Commands/publish/PublishCommand.cs | Migrates options/argument parsing, handler wiring, and hidden flag API. |
| cmf-cli/Commands/plugin/PluginsCommand.cs | Migrates registry option and handler wiring. |
| cmf-cli/Commands/plugin/PluginCommand.cs | Migrates to SetAction and uses UnmatchedTokens. |
| cmf-cli/Commands/plugin/NewPluginCommand.cs | Reworks args parsing/defaults and handler wiring. |
| cmf-cli/Commands/pack/PackCommand.cs | Migrates to new parsing APIs and handler wiring. |
| cmf-cli/Commands/new/iot/GenerateTaskLibraryCommand.cs | Migrates base arg handling and handler wiring. |
| cmf-cli/Commands/new/iot/GenerateTaskCommand.cs | Migrates base arg handling and handler wiring. |
| cmf-cli/Commands/new/iot/GenerateDriverCommand.cs | Migrates base arg handling and handler wiring. |
| cmf-cli/Commands/new/iot/GenerateDotnetFrameworkDriverCommand.cs | Migrates base arg handling and handler wiring. |
| cmf-cli/Commands/new/iot/GenerateDotnetDriverCommand.cs | Migrates base arg handling and handler wiring. |
| cmf-cli/Commands/new/iot/GenerateConverterCommand.cs | Migrates base arg handling and handler wiring. |
| cmf-cli/Commands/new/iot/GenerateBusinessScenarioCommand.cs | Migrates base arg handling and handler wiring. |
| cmf-cli/Commands/new/TestCommand.cs | Migrates version option + handler wiring; updates ExecutionContext refs. |
| cmf-cli/Commands/new/NewCommand.cs | Migrates reset option wiring; updates help invocation pattern. |
| cmf-cli/Commands/new/IoTCommand.cs | Migrates base config extraction + handler wiring; updates ExecutionContext refs. |
| cmf-cli/Commands/new/HelpCommand.cs | Migrates options/handler wiring and updates ExecutionContext refs. |
| cmf-cli/Commands/new/HTMLCommand.cs | Migrates options/handler wiring and updates ExecutionContext refs. |
| cmf-cli/Commands/new/FeatureCommand.cs | Migrates args/options parsing/defaults and handler wiring. |
| cmf-cli/Commands/new/DataCommand.cs | Migrates base config extraction + handler wiring; updates ExecutionContext refs. |
| cmf-cli/Commands/new/BusinessCommand.cs | Migrates option wiring and handler wiring; updates ExecutionContext refs. |
| cmf-cli/Commands/login/SyncCommand.cs | Replaces CommandHandler with SetAction and parses parent args via ParseResult. |
| cmf-cli/Commands/login/LoginCommand.cs | Migrates all args/options to new APIs and rewires handler via SetAction. |
| cmf-cli/Commands/list/ListDependenciesCommand.cs | Migrates args/options + introduces URI-array parsing via helper. |
| cmf-cli/Commands/init/InitCommand.cs | Large migration to new argument/option APIs + rewired to build InitArguments from ParseResult. |
| cmf-cli/Commands/bump/BumpIoTCustomizationCommand.cs | Migrates args/options parsing and rewires handler. |
| cmf-cli/Commands/bump/BumpIoTConfigurationCommand.cs | Migrates args/options parsing and rewires handler. |
| cmf-cli/Commands/bump/BumpCommand.cs | Migrates args/options parsing and rewires handler. |
| cmf-cli/Commands/build/html/LocalizeCommand.cs | Migrates packagePath arg parsing and handler wiring. |
| cmf-cli/Commands/build/html/LinkLBOsCommand.cs | Migrates packagePath arg parsing and handler wiring. |
| cmf-cli/Commands/build/html/ExtractI18nCommand.cs | Migrates packagePath arg parsing and handler wiring. |
| cmf-cli/Commands/build/business/ValidateStartAndEndMethodsCommand.cs | Migrates args parsing and rewires handler. |
| cmf-cli/Commands/build/IoTLibCommand.cs | Migrates base arg handling and handler wiring; updates ExecutionContext refs. |
| cmf-cli/Commands/build/GenerateMenuItemsCommand.cs | Migrates packagePath arg parsing and handler wiring. |
| cmf-cli/Commands/build/GenerateBasedOnTemplatesCommand.cs | Migrates packagePath arg parsing and handler wiring. |
| cmf-cli/Commands/build/BuildCommand.cs | Migrates args/options parsing and rewires handler. |
| cmf-cli/Commands/assemble/AssembleCommand.cs | Migrates args/options parsing and rewires handler. |
| cmf-cli/Commands/LayerTemplateCommand.cs | Refactors base-config method to return arg/option references for SetAction. |
| cmf-cli/Commands/BaseCommand.cs | Switches plugin command injection to Subcommands.Add. |
Comments suppressed due to low confidence (1)
tests/Specs/Telemetry.cs:190
- This assignment to rootCommand is useless, since its value is never read.
dda9607 to
69c39d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.