Update System.CommandLine from 2.0.0-beta3 to beta4 (#71916)
authorAdeel Mujahid <3840695+am11@users.noreply.github.com>
Mon, 11 Jul 2022 12:15:54 +0000 (15:15 +0300)
committerGitHub <noreply@github.com>
Mon, 11 Jul 2022 12:15:54 +0000 (05:15 -0700)
NuGet.config
eng/Version.Details.xml
eng/Versions.props
src/coreclr/tools/ILVerify/Program.cs
src/coreclr/tools/InjectResource/Program.cs
src/coreclr/tools/r2rdump/CommandLineOptions.cs
src/coreclr/tools/r2rdump/R2RDump.cs
src/coreclr/tools/r2rtest/CommandLineOptions.cs

index 7386724..a6d8784 100644 (file)
@@ -15,6 +15,7 @@
     <add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
     <add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
     <add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
     <add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
     <add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
     <add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
+    <add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
     <!-- TODO: Remove dotnet7 feeds when dependencies publish into dotnet8 feeds: https://github.com/dotnet/runtime/issues/63375. -->
     <add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
     <add key="dotnet7-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json" />
     <!-- TODO: Remove dotnet7 feeds when dependencies publish into dotnet8 feeds: https://github.com/dotnet/runtime/issues/63375. -->
     <add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
     <add key="dotnet7-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json" />
index ea73e2f..d72645d 100644 (file)
@@ -48,9 +48,9 @@
       <Uri>https://github.com/dotnet/llvm-project</Uri>
       <Sha>33221526688e13aa1e41398fbed14fd7ad8fe147</Sha>
     </Dependency>
       <Uri>https://github.com/dotnet/llvm-project</Uri>
       <Sha>33221526688e13aa1e41398fbed14fd7ad8fe147</Sha>
     </Dependency>
-    <Dependency Name="System.CommandLine" Version="2.0.0-beta3.22151.2">
+    <Dependency Name="System.CommandLine" Version="2.0.0-beta4.22355.1">
       <Uri>https://github.com/dotnet/command-line-api</Uri>
       <Uri>https://github.com/dotnet/command-line-api</Uri>
-      <Sha>021ec68a4cb510c2cc125c6ebb78b9cfd4e3847a</Sha>
+      <Sha>5618b2d243ccdeb5c7e50a298b33b13036b4351b</Sha>
     </Dependency>
   </ProductDependencies>
   <ToolsetDependencies>
     </Dependency>
   </ProductDependencies>
   <ToolsetDependencies>
index 9d80157..9c39056 100644 (file)
     <optimizationPGOCoreCLRVersion>1.0.0-prerelease.22355.3</optimizationPGOCoreCLRVersion>
     <!-- Not auto-updated. -->
     <MicrosoftDiaSymReaderNativeVersion>16.9.0-beta1.21055.5</MicrosoftDiaSymReaderNativeVersion>
     <optimizationPGOCoreCLRVersion>1.0.0-prerelease.22355.3</optimizationPGOCoreCLRVersion>
     <!-- Not auto-updated. -->
     <MicrosoftDiaSymReaderNativeVersion>16.9.0-beta1.21055.5</MicrosoftDiaSymReaderNativeVersion>
-    <SystemCommandLineVersion>2.0.0-beta3.22114.1</SystemCommandLineVersion>
+    <SystemCommandLineVersion>2.0.0-beta4.22355.1</SystemCommandLineVersion>
     <TraceEventVersion>2.0.77</TraceEventVersion>
     <NETStandardLibraryRefVersion>2.1.0</NETStandardLibraryRefVersion>
     <NetStandardLibraryVersion>2.0.3</NetStandardLibraryVersion>
     <TraceEventVersion>2.0.77</TraceEventVersion>
     <NETStandardLibraryRefVersion>2.1.0</NETStandardLibraryRefVersion>
     <NetStandardLibraryVersion>2.0.3</NetStandardLibraryVersion>
index 851f9d9..02480ca 100644 (file)
@@ -4,8 +4,6 @@
 using System;
 using System.Collections.Generic;
 using System.CommandLine;
 using System;
 using System.Collections.Generic;
 using System.CommandLine;
-using System.CommandLine.Builder;
-using System.CommandLine.Invocation;
 using System.CommandLine.Parsing;
 using System.IO;
 using System.Linq;
 using System.CommandLine.Parsing;
 using System.IO;
 using System.Linq;
@@ -505,7 +503,7 @@ namespace ILVerify
                 AddOption(Verbose);
                 AddOption(Tokens);
 
                 AddOption(Verbose);
                 AddOption(Tokens);
 
-                this.SetHandler<InvocationContext>((InvocationContext context) =>
+                this.SetHandler(context =>
                 {
                     try
                     {
                 {
                     try
                     {
index 55d221b..f9a73fd 100644 (file)
@@ -1,12 +1,12 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the MIT license.
 using System.CommandLine;
 using System.IO;
 
 // The .NET Foundation licenses this file to you under the MIT license.
 using System.CommandLine;
 using System.IO;
 
-var binOption = new Option<FileInfo?>(
+var binOption = new Option<FileInfo>(
     name: "--bin",
     description: "Binary data to attach to the image");
     name: "--bin",
     description: "Binary data to attach to the image");
-var imageOption = new Option<FileInfo?>(
+var imageOption = new Option<FileInfo>(
     name: "--image",
     description: "PE image to add the binary resource into");
 var nameOption = new Option<string>(
     name: "--image",
     description: "PE image to add the binary resource into");
 var nameOption = new Option<string>(
@@ -17,14 +17,13 @@ rootCommand.AddOption(binOption);
 rootCommand.AddOption(imageOption);
 rootCommand.AddOption(nameOption);
 
 rootCommand.AddOption(imageOption);
 rootCommand.AddOption(nameOption);
 
-rootCommand.SetHandler(
-    (FileInfo binaryData, FileInfo peImage, string name) => 
-        {
-            using ResourceUpdater updater = new(peImage);
-            updater.AddBinaryResource(name, File.ReadAllBytes(binaryData.FullName));
-        },
+rootCommand.SetHandler((FileInfo binaryData, FileInfo peImage, string name) =>
+    {
+        using ResourceUpdater updater = new(peImage);
+        updater.AddBinaryResource(name, File.ReadAllBytes(binaryData.FullName));
+    },
     binOption,
     imageOption,
     nameOption);
 
     binOption,
     imageOption,
     nameOption);
 
-return rootCommand.Invoke(args);
\ No newline at end of file
+return rootCommand.Invoke(args);
index f0b6f71..67132fd 100644 (file)
@@ -2,8 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 
 using System.CommandLine;
 // The .NET Foundation licenses this file to you under the MIT license.
 
 using System.CommandLine;
-using System.CommandLine.Invocation;
-using System.CommandLine.Parsing;
 using System.IO;
 
 namespace R2RDump
 using System.IO;
 
 namespace R2RDump
@@ -117,7 +115,7 @@ namespace R2RDump
             AddOption(SignatureBinary);
             AddOption(InlineSignatureBinary);
 
             AddOption(SignatureBinary);
             AddOption(InlineSignatureBinary);
 
-            this.SetHandler<InvocationContext>((InvocationContext context) =>
+            this.SetHandler(context =>
                 context.ExitCode = new R2RDump(new DumpOptions(this, context.ParseResult)).Run());
         }
     }
                 context.ExitCode = new R2RDump(new DumpOptions(this, context.ParseResult)).Run());
         }
     }
index 03deeda..397fdd5 100644 (file)
@@ -5,8 +5,6 @@ using System;
 using System.Collections.Generic;
 using System.Collections.Immutable;
 using System.CommandLine;
 using System.Collections.Generic;
 using System.Collections.Immutable;
 using System.CommandLine;
-using System.CommandLine.Builder;
-using System.CommandLine.Invocation;
 using System.CommandLine.Parsing;
 using System.IO;
 using System.Linq;
 using System.CommandLine.Parsing;
 using System.IO;
 using System.Linq;
index 79865a1..7bba417 100644 (file)
@@ -3,8 +3,6 @@
 
 using System;
 using System.CommandLine;
 
 using System;
 using System.CommandLine;
-using System.CommandLine.Builder;
-using System.CommandLine.Invocation;
 using System.CommandLine.Parsing;
 using System.IO;
 
 using System.CommandLine.Parsing;
 using System.IO;
 
@@ -19,7 +17,7 @@ namespace R2RTest
                 command.AddOption(option);
             foreach (var option in options)
                 command.AddOption(option);
                 command.AddOption(option);
             foreach (var option in options)
                 command.AddOption(option);
-            command.SetHandler<InvocationContext>((InvocationContext context) =>
+            command.SetHandler(context =>
                 context.ExitCode = action(new BuildOptions(this, context.ParseResult)));
             AddCommand(command);
         }
                 context.ExitCode = action(new BuildOptions(this, context.ParseResult)));
             AddCommand(command);
         }