Skip to content

Commit 14e0038

Browse files
authored
Revert "Update to the latest dotnet/command-line-api version (#94746)" (#94878)
This reverts commit fe3abf5.
1 parent 867b3e5 commit 14e0038

File tree

12 files changed

+26
-21
lines changed

12 files changed

+26
-21
lines changed

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@
8080
<Uri>https://github.com/dotnet/llvm-project</Uri>
8181
<Sha>4db411bed3b4f48dfb4ed59629a0dc1d23e724e6</Sha>
8282
</Dependency>
83-
<Dependency Name="System.CommandLine" Version="2.0.0-beta4.23407.1">
83+
<Dependency Name="System.CommandLine" Version="2.0.0-beta4.23307.1">
8484
<Uri>https://github.com/dotnet/command-line-api</Uri>
85-
<Sha>a045dd54a4c44723c215d992288160eb1401bb7f</Sha>
85+
<Sha>02fe27cd6a9b001c8feb7938e6ef4b3799745759</Sha>
8686
</Dependency>
87-
<Dependency Name="Microsoft.SourceBuild.Intermediate.command-line-api" Version="0.1.440701">
87+
<Dependency Name="Microsoft.SourceBuild.Intermediate.command-line-api" Version="0.1.430701">
8888
<Uri>https://github.com/dotnet/command-line-api</Uri>
89-
<Sha>a045dd54a4c44723c215d992288160eb1401bb7f</Sha>
89+
<Sha>02fe27cd6a9b001c8feb7938e6ef4b3799745759b</Sha>
9090
<SourceBuild RepoName="command-line-api" ManagedOnly="true" />
9191
</Dependency>
9292
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.4-alpha.23509.2">

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
<optimizationPGOCoreCLRVersion>1.0.0-prerelease.23559.3</optimizationPGOCoreCLRVersion>
162162
<!-- Not auto-updated. -->
163163
<MicrosoftDiaSymReaderNativeVersion>16.11.29-beta1.23404.4</MicrosoftDiaSymReaderNativeVersion>
164-
<SystemCommandLineVersion>2.0.0-beta4.23407.1</SystemCommandLineVersion>
164+
<SystemCommandLineVersion>2.0.0-beta4.23307.1</SystemCommandLineVersion>
165165
<TraceEventVersion>3.0.3</TraceEventVersion>
166166
<NETStandardLibraryRefVersion>2.1.0</NETStandardLibraryRefVersion>
167167
<NetStandardLibraryVersion>2.0.3</NetStandardLibraryVersion>

src/coreclr/tools/Common/CommandLineHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public static CliRootCommand UseVersion(this CliRootCommand command)
127127
return command;
128128
}
129129

130-
public static CliRootCommand UseExtendedHelp(this CliRootCommand command, Func<HelpContext, IEnumerable<Func<HelpContext, bool>>> customizer)
130+
public static CliRootCommand UseExtendedHelp(this CliRootCommand command, Func<HelpContext, IEnumerable<Action<HelpContext>>> customizer)
131131
{
132132
foreach (CliOption option in command.Options)
133133
{

src/coreclr/tools/ILVerify/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,8 @@ public PEReader Resolve(string simpleName)
481481
private static int Main(string[] args) =>
482482
new CliConfiguration(new ILVerifyRootCommand().UseVersion())
483483
{
484-
ResponseFileTokenReplacer = Helpers.TryReadResponseFile
484+
ResponseFileTokenReplacer = Helpers.TryReadResponseFile,
485+
EnableParseErrorReporting = true
485486
}.Invoke(args);
486487
}
487488
}

src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ public ILCompilerRootCommand(string[] args) : base(".NET Native IL Compiler")
298298
});
299299
}
300300

301-
public static IEnumerable<Func<HelpContext, bool>> GetExtendedHelp(HelpContext _)
301+
public static IEnumerable<Action<HelpContext>> GetExtendedHelp(HelpContext _)
302302
{
303-
foreach (Func<HelpContext, bool> sectionDelegate in HelpBuilder.Default.GetLayout())
303+
foreach (Action<HelpContext> sectionDelegate in HelpBuilder.Default.GetLayout())
304304
yield return sectionDelegate;
305305

306306
yield return _ =>
@@ -354,7 +354,6 @@ public static IEnumerable<Func<HelpContext, bool>> GetExtendedHelp(HelpContext _
354354
Console.WriteLine();
355355
Console.WriteLine("The following CPU names are predefined groups of instruction sets and can be used in --instruction-set too:");
356356
Console.WriteLine(string.Join(", ", Internal.JitInterface.InstructionSetFlags.AllCpuNames));
357-
return true;
358357
};
359358
}
360359

src/coreclr/tools/aot/ILCompiler/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,8 @@ private static int Main(string[] args) =>
738738
.UseVersion()
739739
.UseExtendedHelp(ILCompilerRootCommand.GetExtendedHelp))
740740
{
741-
ResponseFileTokenReplacer = Helpers.TryReadResponseFile
741+
ResponseFileTokenReplacer = Helpers.TryReadResponseFile,
742+
EnableParseErrorReporting = true
742743
}.Invoke(args);
743744
}
744745
}

src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ public Crossgen2RootCommand(string[] args) : base(SR.Crossgen2BannerText)
282282
});
283283
}
284284

285-
public static IEnumerable<Func<HelpContext, bool>> GetExtendedHelp(HelpContext _)
285+
public static IEnumerable<Action<HelpContext>> GetExtendedHelp(HelpContext _)
286286
{
287-
foreach (Func<HelpContext, bool> sectionDelegate in HelpBuilder.Default.GetLayout())
287+
foreach (Action<HelpContext> sectionDelegate in HelpBuilder.Default.GetLayout())
288288
yield return sectionDelegate;
289289

290290
yield return _ =>
@@ -343,7 +343,6 @@ public static IEnumerable<Func<HelpContext, bool>> GetExtendedHelp(HelpContext _
343343
Console.WriteLine();
344344
Console.WriteLine(SR.CpuFamilies);
345345
Console.WriteLine(string.Join(", ", Internal.JitInterface.InstructionSetFlags.AllCpuNames));
346-
return true;
347346
};
348347
}
349348

src/coreclr/tools/aot/crossgen2/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,8 @@ private static int Main(string[] args) =>
915915
.UseVersion()
916916
.UseExtendedHelp(Crossgen2RootCommand.GetExtendedHelp))
917917
{
918-
ResponseFileTokenReplacer = Helpers.TryReadResponseFile
918+
ResponseFileTokenReplacer = Helpers.TryReadResponseFile,
919+
EnableParseErrorReporting = true
919920
}.Invoke(args);
920921
}
921922
}

src/coreclr/tools/dotnet-pgo/PgoRootCommand.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ int ExecuteWithContext(ParseResult result, bool setVerbosity)
260260
}
261261
}
262262

263-
public static IEnumerable<Func<HelpContext, bool>> GetExtendedHelp(HelpContext context)
263+
public static IEnumerable<Action<HelpContext>> GetExtendedHelp(HelpContext context)
264264
{
265-
foreach (Func<HelpContext, bool> sectionDelegate in HelpBuilder.Default.GetLayout())
265+
foreach (Action<HelpContext> sectionDelegate in HelpBuilder.Default.GetLayout())
266266
yield return sectionDelegate;
267267

268268
if (context.Command.Name == "create-mibc" || context.Command.Name == "create-jittrace")
@@ -280,7 +280,6 @@ public static IEnumerable<Func<HelpContext, bool>> GetExtendedHelp(HelpContext c
280280
""perfview collect -LogFile:logOfCollection.txt -DataFile:jittrace.etl -Zip:false -merge:false -providers:Microsoft-Windows-DotNETRuntime:0x1E000080018:4""
281281
- Capture Jit and R2R events via perfview of all processes running using ETW tracing
282282
");
283-
return true;
284283
};
285284
}
286285
}

src/coreclr/tools/dotnet-pgo/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ private static int Main(string[] args) =>
165165
.UseVersion()
166166
.UseExtendedHelp(PgoRootCommand.GetExtendedHelp))
167167
{
168-
ResponseFileTokenReplacer = Helpers.TryReadResponseFile
168+
ResponseFileTokenReplacer = Helpers.TryReadResponseFile,
169+
EnableParseErrorReporting = true
169170
}.Invoke(args);
170171

171172
public static void PrintWarning(string warning)

src/coreclr/tools/r2rdump/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ public int Run()
500500
public static int Main(string[] args) =>
501501
new CliConfiguration(new R2RDumpRootCommand().UseVersion())
502502
{
503-
ResponseFileTokenReplacer = Helpers.TryReadResponseFile
503+
ResponseFileTokenReplacer = Helpers.TryReadResponseFile,
504+
EnableParseErrorReporting = true
504505
}.Invoke(args);
505506
}
506507
}

src/coreclr/tools/r2rtest/CommandLineOptions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ void CreateCommand(string name, string description, CliOption[] options, Func<Bu
299299
new CliOption<DirectoryInfo>("--asp-net-path", "-asp") { Description = "Path to SERP's ASP.NET Core folder" }.AcceptExistingOnly();
300300

301301
private static int Main(string[] args) =>
302-
new CliConfiguration(new R2RTestRootCommand().UseVersion()).Invoke(args);
302+
new CliConfiguration(new R2RTestRootCommand().UseVersion())
303+
{
304+
EnableParseErrorReporting = true
305+
}.Invoke(args);
303306
}
304307

305308
public partial class BuildOptions

0 commit comments

Comments
 (0)