diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0802a8397ae9..586ab8e9cfe8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -437,13 +437,13 @@ 8fe7aeb135c64e095f43292c427453858d937184 - + https://github.com/dotnet/command-line-api - 3bbb940ceeb3254790899d751a8d418348563d40 + 060374e56c1b2e741b6525ca8417006efb54fbd7 - + https://github.com/dotnet/command-line-api - 3bbb940ceeb3254790899d751a8d418348563d40 + 060374e56c1b2e741b6525ca8417006efb54fbd7 - + https://github.com/dotnet/command-line-api - 3bbb940ceeb3254790899d751a8d418348563d40 + 060374e56c1b2e741b6525ca8417006efb54fbd7 @@ -475,34 +475,34 @@ https://github.com/dotnet/deployment-tools 5b816ec322774fff1f84d27e8d401cf145e0a2ca - + https://github.com/dotnet/sourcelink - fab841741055c19fc07623f8947cecc9a0f63baa + 3c34adccbef5b95e680bc6e6424e3ebbbf4cd294 - + https://github.com/dotnet/sourcelink - fab841741055c19fc07623f8947cecc9a0f63baa + 3c34adccbef5b95e680bc6e6424e3ebbbf4cd294 - + https://github.com/dotnet/sourcelink - fab841741055c19fc07623f8947cecc9a0f63baa + 3c34adccbef5b95e680bc6e6424e3ebbbf4cd294 - + https://github.com/dotnet/sourcelink - fab841741055c19fc07623f8947cecc9a0f63baa + 3c34adccbef5b95e680bc6e6424e3ebbbf4cd294 - + https://github.com/dotnet/sourcelink - fab841741055c19fc07623f8947cecc9a0f63baa + 3c34adccbef5b95e680bc6e6424e3ebbbf4cd294 - + https://github.com/dotnet/sourcelink - fab841741055c19fc07623f8947cecc9a0f63baa + 3c34adccbef5b95e680bc6e6424e3ebbbf4cd294 - + https://github.com/dotnet/sourcelink - fab841741055c19fc07623f8947cecc9a0f63baa + 3c34adccbef5b95e680bc6e6424e3ebbbf4cd294 @@ -604,34 +604,34 @@ - + https://github.com/dotnet/arcade - bbea86c614fcf4380c58c80eacd279a0b8305a79 + 0b971a5e11be58af22ca83fbc111a1207bb62920 - + https://github.com/dotnet/arcade - bbea86c614fcf4380c58c80eacd279a0b8305a79 + 0b971a5e11be58af22ca83fbc111a1207bb62920 - + https://github.com/dotnet/arcade - bbea86c614fcf4380c58c80eacd279a0b8305a79 + 0b971a5e11be58af22ca83fbc111a1207bb62920 - + https://github.com/dotnet/arcade - bbea86c614fcf4380c58c80eacd279a0b8305a79 + 0b971a5e11be58af22ca83fbc111a1207bb62920 - + https://github.com/dotnet/arcade - bbea86c614fcf4380c58c80eacd279a0b8305a79 + 0b971a5e11be58af22ca83fbc111a1207bb62920 - + https://github.com/dotnet/arcade - bbea86c614fcf4380c58c80eacd279a0b8305a79 + 0b971a5e11be58af22ca83fbc111a1207bb62920 - + https://github.com/dotnet/arcade - bbea86c614fcf4380c58c80eacd279a0b8305a79 + 0b971a5e11be58af22ca83fbc111a1207bb62920 diff --git a/eng/Versions.props b/eng/Versions.props index e6c5eed12db1..928ed0935b05 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -58,7 +58,7 @@ 4.8.6 1.2.0-beta.435 4.0.5 - 2.0.0-beta4.25071.2 + 2.0.0-beta4.25072.1 2.0.0-preview.1.25077.1 2.2.0-beta.25076.1 1.1.2-beta1.22216.1 @@ -270,19 +270,19 @@ - 10.0.0-beta.25080.7 - 10.0.0-beta.25080.7 - 10.0.0-beta.25080.7 - 10.0.0-beta.25080.7 + 10.0.0-beta.25103.6 + 10.0.0-beta.25103.6 + 10.0.0-beta.25103.6 + 10.0.0-beta.25103.6 - 10.0.0-beta.25080.2 - 10.0.0-beta.25080.2 - 10.0.0-beta.25080.2 - 10.0.0-beta.25080.2 - 10.0.0-beta.25080.2 - 10.0.0-beta.25080.2 + 10.0.0-beta.25081.2 + 10.0.0-beta.25081.2 + 10.0.0-beta.25081.2 + 10.0.0-beta.25081.2 + 10.0.0-beta.25081.2 + 10.0.0-beta.25081.2 diff --git a/global.json b/global.json index 069338eb4678..716aac7bc79a 100644 --- a/global.json +++ b/global.json @@ -17,8 +17,8 @@ "cmake": "latest" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25080.7", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25080.7", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25103.6", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25103.6", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24217.1" } diff --git a/src/BlazorWasmSdk/Tool/Program.cs b/src/BlazorWasmSdk/Tool/Program.cs index c4f497eef7e3..7b9d504df849 100644 --- a/src/BlazorWasmSdk/Tool/Program.cs +++ b/src/BlazorWasmSdk/Tool/Program.cs @@ -12,20 +12,20 @@ internal static class Program { public static int Main(string[] args) { - CliRootCommand rootCommand = new(); - CliCommand brotli = new("brotli"); + RootCommand rootCommand = new(); + Command brotli = new("brotli"); - CliOption compressionLevelOption = new("-c") + Option compressionLevelOption = new("-c") { DefaultValueFactory = _ => CompressionLevel.SmallestSize, Description = "System.IO.Compression.CompressionLevel for the Brotli compression algorithm.", }; - CliOption> sourcesOption = new("-s") + Option> sourcesOption = new("-s") { Description = "A list of files to compress.", AllowMultipleArgumentsPerToken = false }; - CliOption> outputsOption = new("-o") + Option> outputsOption = new("-o") { Description = "The filenames to output the compressed file to.", AllowMultipleArgumentsPerToken = false diff --git a/src/BuiltInTools/dotnet-format/Commands/FormatAnalyzersCommand.cs b/src/BuiltInTools/dotnet-format/Commands/FormatAnalyzersCommand.cs index 1fc765d41cf5..c8da566ff3a9 100644 --- a/src/BuiltInTools/dotnet-format/Commands/FormatAnalyzersCommand.cs +++ b/src/BuiltInTools/dotnet-format/Commands/FormatAnalyzersCommand.cs @@ -12,9 +12,9 @@ internal static class FormatAnalyzersCommand { private static readonly FormatAnalyzersHandler s_analyzerHandler = new(); - internal static CliCommand GetCommand() + internal static Command GetCommand() { - var command = new CliCommand("analyzers", Resources.Run_3rd_party_analyzers__and_apply_fixes) + var command = new Command("analyzers", Resources.Run_3rd_party_analyzers__and_apply_fixes) { DiagnosticsOption, ExcludeDiagnosticsOption, @@ -25,7 +25,7 @@ internal static CliCommand GetCommand() return command; } - private class FormatAnalyzersHandler : AsynchronousCliAction + private class FormatAnalyzersHandler : AsynchronousCommandLineAction { public override async Task InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken) { diff --git a/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs b/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs index 48acb26267d4..63e764517474 100644 --- a/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs +++ b/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs @@ -19,67 +19,67 @@ internal static class FormatCommandCommon private static string[] VerbosityLevels => new[] { "q", "quiet", "m", "minimal", "n", "normal", "d", "detailed", "diag", "diagnostic" }; private static string[] SeverityLevels => new[] { "info", "warn", "error" }; - public static readonly CliArgument SlnOrProjectArgument = new CliArgument(Resources.SolutionOrProjectArgumentName) + public static readonly Argument SlnOrProjectArgument = new Argument(Resources.SolutionOrProjectArgumentName) { Description = Resources.SolutionOrProjectArgumentDescription, Arity = ArgumentArity.ZeroOrOne }.DefaultToCurrentDirectory(); - internal static readonly CliOption FolderOption = new("--folder") + internal static readonly Option FolderOption = new("--folder") { Description = Resources.Whether_to_treat_the_workspace_argument_as_a_simple_folder_of_files, }; - internal static readonly CliOption NoRestoreOption = new("--no-restore") + internal static readonly Option NoRestoreOption = new("--no-restore") { Description = Resources.Doesnt_execute_an_implicit_restore_before_formatting, }; - internal static readonly CliOption VerifyNoChanges = new("--verify-no-changes") + internal static readonly Option VerifyNoChanges = new("--verify-no-changes") { Description = Resources.Verify_no_formatting_changes_would_be_performed_Terminates_with_a_non_zero_exit_code_if_any_files_would_have_been_formatted, }; - internal static readonly CliOption DiagnosticsOption = new("--diagnostics") + internal static readonly Option DiagnosticsOption = new("--diagnostics") { AllowMultipleArgumentsPerToken = true, DefaultValueFactory = _ => Array.Empty(), Description = Resources.A_space_separated_list_of_diagnostic_ids_to_use_as_a_filter_when_fixing_code_style_or_3rd_party_issues, }; - internal static readonly CliOption ExcludeDiagnosticsOption = new("--exclude-diagnostics") + internal static readonly Option ExcludeDiagnosticsOption = new("--exclude-diagnostics") { AllowMultipleArgumentsPerToken = true, DefaultValueFactory = _ => Array.Empty(), Description = Resources.A_space_separated_list_of_diagnostic_ids_to_ignore_when_fixing_code_style_or_3rd_party_issues, }; - internal static readonly CliOption SeverityOption = new CliOption("--severity") + internal static readonly Option SeverityOption = new Option("--severity") { Description = Resources.The_severity_of_diagnostics_to_fix_Allowed_values_are_info_warn_and_error, }; - internal static readonly CliOption IncludeOption = new("--include") + internal static readonly Option IncludeOption = new("--include") { AllowMultipleArgumentsPerToken = true, DefaultValueFactory = _ => Array.Empty(), Description = Resources.A_list_of_relative_file_or_folder_paths_to_include_in_formatting_All_files_are_formatted_if_empty, }; - internal static readonly CliOption ExcludeOption = new("--exclude") + internal static readonly Option ExcludeOption = new("--exclude") { AllowMultipleArgumentsPerToken = true, DefaultValueFactory = _ => Array.Empty(), Description = Resources.A_list_of_relative_file_or_folder_paths_to_exclude_from_formatting, }; - internal static readonly CliOption IncludeGeneratedOption = new("--include-generated") + internal static readonly Option IncludeGeneratedOption = new("--include-generated") { Description = Resources.Format_files_generated_by_the_SDK, }; - internal static readonly CliOption VerbosityOption = new CliOption("--verbosity", "-v") + internal static readonly Option VerbosityOption = new Option("--verbosity", "-v") { Description = Resources.Set_the_verbosity_level_Allowed_values_are_quiet_minimal_normal_detailed_and_diagnostic, }; - internal static readonly CliOption BinarylogOption = new CliOption("--binarylog") + internal static readonly Option BinarylogOption = new Option("--binarylog") { HelpName = "binary-log-path", Arity = ArgumentArity.ZeroOrOne, Description = Resources.Log_all_project_or_solution_load_information_to_a_binary_log_file, }; - internal static readonly CliOption ReportOption = new CliOption("--report") + internal static readonly Option ReportOption = new Option("--report") { HelpName = "report-path", Arity = ArgumentArity.ZeroOrOne, @@ -118,7 +118,7 @@ internal static async Task FormatAsync(FormatOptions formatOptions, ILogger return formatResult.GetExitCode(formatOptions.ChangesAreErrors); } - public static void AddCommonOptions(this CliCommand command) + public static void AddCommonOptions(this Command command) { command.Arguments.Add(SlnOrProjectArgument); command.Options.Add(NoRestoreOption); @@ -131,7 +131,7 @@ public static void AddCommonOptions(this CliCommand command) command.Options.Add(ReportOption); } - public static CliArgument DefaultToCurrentDirectory(this CliArgument arg) + public static Argument DefaultToCurrentDirectory(this Argument arg) { arg.DefaultValueFactory = _ => EnsureTrailingSlash(Directory.GetCurrentDirectory()); return arg; diff --git a/src/BuiltInTools/dotnet-format/Commands/FormatStyleCommand.cs b/src/BuiltInTools/dotnet-format/Commands/FormatStyleCommand.cs index 12d96959c6bc..bd33b2708e83 100644 --- a/src/BuiltInTools/dotnet-format/Commands/FormatStyleCommand.cs +++ b/src/BuiltInTools/dotnet-format/Commands/FormatStyleCommand.cs @@ -12,9 +12,9 @@ internal static class FormatStyleCommand { private static readonly FormatStyleHandler s_styleHandler = new(); - internal static CliCommand GetCommand() + internal static Command GetCommand() { - var command = new CliCommand("style", Resources.Run_code_style_analyzers_and_apply_fixes) + var command = new Command("style", Resources.Run_code_style_analyzers_and_apply_fixes) { DiagnosticsOption, ExcludeDiagnosticsOption, @@ -25,7 +25,7 @@ internal static CliCommand GetCommand() return command; } - private class FormatStyleHandler : AsynchronousCliAction + private class FormatStyleHandler : AsynchronousCommandLineAction { public override async Task InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken) { diff --git a/src/BuiltInTools/dotnet-format/Commands/FormatWhitespaceCommand.cs b/src/BuiltInTools/dotnet-format/Commands/FormatWhitespaceCommand.cs index 0885f96f284d..b5179f379ef1 100644 --- a/src/BuiltInTools/dotnet-format/Commands/FormatWhitespaceCommand.cs +++ b/src/BuiltInTools/dotnet-format/Commands/FormatWhitespaceCommand.cs @@ -12,9 +12,9 @@ internal static class FormatWhitespaceCommand { private static readonly FormatWhitespaceHandler s_formattingHandler = new(); - internal static CliCommand GetCommand() + internal static Command GetCommand() { - var command = new CliCommand("whitespace", Resources.Run_whitespace_formatting) + var command = new Command("whitespace", Resources.Run_whitespace_formatting) { FolderOption }; @@ -45,7 +45,7 @@ internal static void EnsureFolderNotSpecifiedWhenLoggingBinlog(CommandResult sym } } - private class FormatWhitespaceHandler : AsynchronousCliAction + private class FormatWhitespaceHandler : AsynchronousCommandLineAction { public override async Task InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken) { diff --git a/src/BuiltInTools/dotnet-format/Commands/RootFormatCommand.cs b/src/BuiltInTools/dotnet-format/Commands/RootFormatCommand.cs index 66d036f85c2b..050c12622402 100644 --- a/src/BuiltInTools/dotnet-format/Commands/RootFormatCommand.cs +++ b/src/BuiltInTools/dotnet-format/Commands/RootFormatCommand.cs @@ -12,9 +12,9 @@ internal static class RootFormatCommand { private static readonly FormatCommandDefaultHandler s_formatCommandHandler = new(); - public static CliRootCommand GetCommand() + public static RootCommand GetCommand() { - var formatCommand = new CliRootCommand(Resources.Formats_code_to_match_editorconfig_settings) + var formatCommand = new RootCommand(Resources.Formats_code_to_match_editorconfig_settings) { FormatWhitespaceCommand.GetCommand(), FormatStyleCommand.GetCommand(), @@ -28,7 +28,7 @@ public static CliRootCommand GetCommand() return formatCommand; } - private class FormatCommandDefaultHandler : AsynchronousCliAction + private class FormatCommandDefaultHandler : AsynchronousCommandLineAction { public override async Task InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken) { diff --git a/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs b/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs index 7441aaaa0496..6af8e81b7899 100644 --- a/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs +++ b/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs @@ -36,11 +36,11 @@ internal sealed class CommandLineOptions { // dotnet watch specific options: - var quietOption = new CliOption("--quiet", "-q") { Description = Resources.Help_Quiet }; - var verboseOption = new CliOption("--verbose") { Description = Resources.Help_Verbose }; - var listOption = new CliOption("--list") { Description = Resources.Help_List }; - var noHotReloadOption = new CliOption("--no-hot-reload") { Description = Resources.Help_NoHotReload }; - var nonInteractiveOption = new CliOption("--non-interactive") { Description = Resources.Help_NonInteractive }; + var quietOption = new Option("--quiet", "-q") { Description = Resources.Help_Quiet }; + var verboseOption = new Option("--verbose") { Description = Resources.Help_Verbose }; + var listOption = new Option("--list") { Description = Resources.Help_List }; + var noHotReloadOption = new Option("--no-hot-reload") { Description = Resources.Help_NoHotReload }; + var nonInteractiveOption = new Option("--non-interactive") { Description = Resources.Help_NonInteractive }; verboseOption.Validators.Add(v => { @@ -50,7 +50,7 @@ internal sealed class CommandLineOptions } }); - CliOption[] watchOptions = + Option[] watchOptions = [ quietOption, verboseOption, @@ -61,12 +61,12 @@ internal sealed class CommandLineOptions // Options we need to know about that are passed through to the subcommand: - var shortProjectOption = new CliOption("-p") { Hidden = true, Arity = ArgumentArity.ZeroOrOne, AllowMultipleArgumentsPerToken = false }; - var longProjectOption = new CliOption("--project") { Hidden = true, Arity = ArgumentArity.ZeroOrOne, AllowMultipleArgumentsPerToken = false }; - var launchProfileOption = new CliOption("--launch-profile", "-lp") { Hidden = true, Arity = ArgumentArity.ZeroOrOne, AllowMultipleArgumentsPerToken = false }; - var noLaunchProfileOption = new CliOption("--no-launch-profile") { Hidden = true }; + var shortProjectOption = new Option("-p") { Hidden = true, Arity = ArgumentArity.ZeroOrOne, AllowMultipleArgumentsPerToken = false }; + var longProjectOption = new Option("--project") { Hidden = true, Arity = ArgumentArity.ZeroOrOne, AllowMultipleArgumentsPerToken = false }; + var launchProfileOption = new Option("--launch-profile", "-lp") { Hidden = true, Arity = ArgumentArity.ZeroOrOne, AllowMultipleArgumentsPerToken = false }; + var noLaunchProfileOption = new Option("--no-launch-profile") { Hidden = true }; - var rootCommand = new CliRootCommand(Resources.Help) + var rootCommand = new RootCommand(Resources.Help) { Directives = { new EnvironmentVariablesDirective() }, }; @@ -92,7 +92,7 @@ internal sealed class CommandLineOptions var rootCommandInvoked = false; rootCommand.SetAction(parseResult => rootCommandInvoked = true); - var cliConfig = new CliConfiguration(rootCommand) + var cliConfig = new CommandLineConfiguration(rootCommand) { Output = output, Error = output, @@ -150,7 +150,7 @@ internal sealed class CommandLineOptions // We assume that forwarded options, if any, are intended for dotnet build. var buildArguments = buildOptions.Select(option => ((IForwardedOption)option).GetForwardingFunction()(parseResult)).SelectMany(args => args).ToArray(); - var targetFrameworkOption = (CliOption?)buildOptions.SingleOrDefault(option => option.Name == "--framework"); + var targetFrameworkOption = (Option?)buildOptions.SingleOrDefault(option => option.Name == "--framework"); return new() { @@ -176,8 +176,8 @@ internal sealed class CommandLineOptions private static IReadOnlyList GetCommandArguments( ParseResult parseResult, - IReadOnlyList watchOptions, - CliCommand? explicitCommand) + IReadOnlyList