Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Update dependency System.CommandLine to v2.0.0-beta4.22272.1 #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jun 2, 2022

Mend Renovate

This PR contains the following updates:

Package Type Update Change
System.CommandLine nuget patch 2.0.0-beta1.20104.2 -> 2.0.0-beta4.22272.1

Release Notes

dotnet/command-line-api

v2.0.0-beta4.22272.1: System.CommandLine v2.0.0-beta4.22272.1

For details on the Beta 4 release, please see #​1750.

What's Changed

New Contributors

Full Changelog: dotnet/command-line-api@v2.0.0-beta3.22114.1...2.0.0-beta4.22272.1

v2.0.0-beta3.22114.1: System.CommandLine v2.0.0-beta3.22114.1

For details on the Beta 3 release, please see #​1613.

v2.0.0-beta2.21617.1: System.CommandLine v2.0.0-beta2.21617.1

For details on the Beta 2 release, please see #​1537.

v2.0.0-beta1.21216.1: System.CommandLine v2.0.0-beta1.21216.1

What's new

It's been a while since our last beta release because as we approach the 2.0 milestone, we're making more breaking changes, and we're trying to group them into fewer releases in order to minimize churn.

System.CommandLine
  • Added an Argument.LegalFileNamesOnly extension method to improve file validations. (Thanks, @​AronParker !)

  • Made significant improvements to HelpBuilder to enable more fine-grained customization of help output. (Thanks, @​Keboo!)

  • Added an optional description parameter to an Argument<T> constructor to match Option<T>. (Thanks, @​database64128!)

  • CommandHandler.Create can now specify abstract methods, which can vary by the derived class at invocation time. (Thanks, @​ycrumeyrolle!)

  • Improved support for POSIX bundled arguments when no delimiter is used. (Thanks, @​sfoslund)

  • Ahora se puede localizar la ayuda (pero todavia se necesita marcar -h para pedirla 🤔). (Thanks, @​Keboo!)

  • Added XML documentation for a number of types. (Thanks, @​pieter-venter!)

  • Added a ParseResult parameter to Symbol.GetSuggestions and to the signature for SuggestDelegate. The GetSuggestions change is not a source-breaking change because we've also added an extension method supporting the older signature. (Thanks, @​thoemmi!)

  • Fixed a bug where trailing spaces would break response file parsing. (Thanks, @​hackf5!)

  • Introduced IIdentifierSymbol, which Option and Command implement, but Argument does not.

  • Enabled customization of exit codes on error by passing an exitErrorCode argument to various CommandLineBuilder methods: UseExceptionHandler, UseParseDirective, UseParseErrorReporting, and UseVersionOption. (Thanks, @​Keboo!)

  • Custom argument parsers using ParseArgument<T> can now partially consume tokens using ArgumentResult.OnlyTake(int), allowing other symbols to consume the remaining tokens.

  • CommandHandler.Create now provides overloads for up to 16 parameters. We used to go to 11, but it wasn't enough.

  • The debug directive now requires opt-in from the user, in order to prevent it from being used maliciously to block a process. (Thanks, @​Keboo!)

  • Numerous performance improvements, benefitting speed and memory footprint. (Thanks, @​paulomorgado!) Here's a sample:

    BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
    Intel Core i7-6700 CPU 3.40GHz (Skylake), 1 CPU, 8 logical and 4 physical cores
    .NET Core SDK=5.0.300-preview.21180.15
    [Host]    : .NET Core 5.0.5 (CoreCLR 5.0.521.16609, CoreFX 5.0.521.16609), X64 RyuJIT
    MediumRun : .NET Core 5.0.5 (CoreCLR 5.0.521.16609, CoreFX 5.0.521.16609), X64 RyuJIT
    
    Job=MediumRun  Force=True  IterationCount=15  
    LaunchCount=2  RunStrategy=ColdStart  WarmupCount=10  
    
    Method NuGetReferences Mean Error StdDev Median Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
    SimpleParseAndInvoke System.CommandLine 2.0.0-beta1.20371.2 21.89 ms 59.16 ms 88.54 ms 1.0039 ms 1.00 0.00 - - - 52.84 KB
    SimpleParseAndInvoke System.CommandLine 2.0.0-beta1.21214.1 17.16 ms 49.76 ms 74.48 ms 0.7997 ms 0.83 0.18 - - - 45.48 KB
  • Various bug fixes.

System.CommandLine.Hosting
  • Added IHostBuilder.GetInvocationContext extension methods for accessing InvocationContext in order to do invocation-specific dependency injection and more. (Thanks, @​fredrikhr!)
Breaking changes
  • Option.Argument has been removed from the public API. Option/Option<T> constructors have been adjusted so that functionality for option arguments (such as setting default values and custom argument parsers) is available via Option and Option<T>.

  • Model binding no longer passes null for unspecified argument and option values of IEnumerable or string types. Instead, it passes an empty array or list of the appropriate type, or string.Empty, respectively.

  • SuggestDelegate now takes a ParseResult parameter in addition to the existing string textToMatch parameter.

  • InvocationContext.ResultCode has been renamed to InvocationContext.ExitCode.

  • The following string-based lookup APIs have been removed because they can be ambiguous when more than one symbol matches:

    • ParseResult[string]
    • CommandResult.OptionResult(string)
    • CommandResult[string]
  • System.CommandLine.Invocation.Process has been removed from the public API.

v2.0.0-beta1.20371.2: System.CommandLine v2.0.0-beta1.20371.2

What's new

  • Moved the documentation from the wiki into the repository so people can make pull requests.

System.CommandLine

  • Added support for setting environment variables using the [env:name=value] directive. (#​965) Thanks, @​fredrikhr!

  • Made constructors more consistent between Argument<T> and Option<T> to allow specifying getDefaultValue and description.

  • Added ParseResult.ValueForArgument<T>(Argument<T>) and ParseResult.ValueForOption<T>(Option<T>) to combine lookup and conversion into a single method supporting type inference. (#​949)

  • Added default values to help output. (#​898) Thanks, @​NikiforovAll!

  • Help now wraps lines for long option names (#​947) Thanks, @​apogeeoak!

  • Added SymbolResult.FindResultFor to provide a cleaner way to find the result for a particular Command, Option, or Argument. This is similar to ParseResult.FindResultFor but it can be used within a custom parse delegate (ParseArgument<T>) so that you don't have to traverse the result tree.

  • Improved suggestion APIs to allow replacing the default suggestions, using Argument.Suggestions.Clear(). (#​955) Thanks, @​jmarolf!

  • Added Option.AddSuggestions and Argument.AddSuggestions methods with overloads to provide a static list of suggestions or a delegate for more dynamic suggestions.

  • Suggestions are now sorted so that the matches closest to what was typed are shown first. (#​891) Thanks, @​kimsey0!

  • Performance improvements in tokenizer and symbol result lookups.

System.CommandLine.Rendering

Breaking changes

  • Renamed Option.Required to Option.IsRequired.

  • Renamed the delegate type Suggest to SuggestDelegate.

  • Symbol.Aliases and Symbol.RawAliases are now of type IReadOnlyCollection<string> rather than IReadOnlyList<string>.

v2.0.0-beta1.20214.1: System.CommandLine v2.0.0-beta1.20214.1

Compare Source

v2.0.0-beta1.20213.1: System.CommandLine v2.0.0-beta1.20213.1


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/system.commandline-2.x branch from 5a14ab2 to ac2283d Compare September 25, 2022 17:25
@renovate renovate bot force-pushed the renovate/system.commandline-2.x branch from ac2283d to 6ca4861 Compare November 20, 2022 20:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants