Skip to content

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
manel27:development-6x-system-cmd-beta5-update
Open

chore: bump System.CommandLine from 2.0.0-beta4.22272.1 to 2.0.2 #648
manel27 wants to merge 3 commits intocriticalmanufacturing:development-6xfrom
manel27:development-6x-system-cmd-beta5-update

Conversation

@manel27
Copy link

@manel27 manel27 commented Feb 6, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.CommandLine to 2.0.2 across cmf-cli, core, templates, and tests; remove System.CommandLine.NamingConventionBinder.
  • Refactor command wiring to the newer model (SetAction, ParseResult.GetValue, Command.Subcommands, etc.).
  • Update tests to a new TestConsole approach and migrate invocations to Parse(...).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.

@manel27 manel27 force-pushed the development-6x-system-cmd-beta5-update branch from dda9607 to 69c39d2 Compare February 12, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant