diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 165985edb0f8..ceb8e477e11f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,47 +97,47 @@ 387f04cb6675c984036a64c9bb768ac6f00e06f9 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 - + https://github.com/dotnet/roslyn - 6908aead3a8b313798c381d5e435e9e6068301a7 + 001d331188b5dfa9e69b56387a8a3527e69c8a58 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index d7c63ad22e68..7d98c62cb6bb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -217,15 +217,15 @@ - 4.14.0-1.25070.2 - 4.14.0-1.25070.2 - 4.14.0-1.25070.2 - 4.14.0-1.25070.2 - 4.14.0-1.25070.2 - 4.14.0-1.25070.2 - 4.14.0-1.25070.2 - 4.14.0-1.25070.2 - 4.14.0-1.25070.2 + 4.14.0-2.25103.1 + 4.14.0-2.25103.1 + 4.14.0-2.25103.1 + 4.14.0-2.25103.1 + 4.14.0-2.25103.1 + 4.14.0-2.25103.1 + 4.14.0-2.25103.1 + 4.14.0-2.25103.1 + 4.14.0-2.25103.1 diff --git a/src/SourceBuild/patches/roslyn/0001-Revert-remove-the-Cli-prefix-to-adjust-to-most-recen.patch b/src/SourceBuild/patches/roslyn/0001-Revert-remove-the-Cli-prefix-to-adjust-to-most-recen.patch new file mode 100644 index 000000000000..4007454c75d3 --- /dev/null +++ b/src/SourceBuild/patches/roslyn/0001-Revert-remove-the-Cli-prefix-to-adjust-to-most-recen.patch @@ -0,0 +1,288 @@ +From 323a6c652e6a2736d6e12aa222e159c9679ce41e Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Tue, 4 Feb 2025 09:59:55 +0100 +Subject: [PATCH] Revert "remove the Cli prefix to adjust to most recent + System.CommandLine breaking changes" + +This reverts https://github.com/dotnet/roslyn/pull/76948 +which shouldn't be part of Preview 1. + +--- + eng/Version.Details.xml | 8 ++--- + eng/Versions.props | 2 +- + src/Features/Lsif/Generator/Program.cs | 16 ++++----- + .../Program.cs | 33 ++++++++++--------- + src/Tools/BuildValidator/Program.cs | 18 +++++----- + src/Workspaces/MSBuild/BuildHost/Program.cs | 10 +++--- + 6 files changed, 44 insertions(+), 43 deletions(-) + +diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml +index 740a4b801c3..7d5a6a32012 100644 +--- a/eng/Version.Details.xml ++++ b/eng/Version.Details.xml +@@ -13,14 +13,14 @@ + 3f926184cacc477e3ddccd1eb4f3ebcb9a2b81a5 + + +- ++ + https://github.com/dotnet/command-line-api +- 060374e56c1b2e741b6525ca8417006efb54fbd7 ++ feb61c7f328a2401d74f4317b39d02126cfdfe24 + + +- ++ + https://github.com/dotnet/command-line-api +- 060374e56c1b2e741b6525ca8417006efb54fbd7 ++ feb61c7f328a2401d74f4317b39d02126cfdfe24 + + + +diff --git a/eng/Versions.props b/eng/Versions.props +index 43f29daca07..08c62a289f6 100644 +--- a/eng/Versions.props ++++ b/eng/Versions.props +@@ -46,7 +46,7 @@ + Versions managed by Arcade (see Versions.Details.xml) + --> + +- 2.0.0-beta4.25072.1 ++ 2.0.0-beta4.24528.1 + 8.0.0 + 8.0.0 + 8.0.0 +diff --git a/src/Features/Lsif/Generator/Program.cs b/src/Features/Lsif/Generator/Program.cs +index f3ee22fb79c..940a0c69698 100644 +--- a/src/Features/Lsif/Generator/Program.cs ++++ b/src/Features/Lsif/Generator/Program.cs +@@ -26,17 +26,17 @@ internal static class Program + { + public static Task Main(string[] args) + { +- var solution = new Option("--solution") { Description = "input solution file" }.AcceptExistingOnly(); +- var project = new Option("--project") { Description = "input project file" }.AcceptExistingOnly(); +- var compilerInvocation = new Option("--compiler-invocation") { Description = "path to a .json file that contains the information for a csc/vbc invocation" }.AcceptExistingOnly(); +- var binLog = new Option("--binlog") { Description = "path to a MSBuild binlog that csc/vbc invocations will be extracted from" }.AcceptExistingOnly(); +- var output = new Option("--output") { Description = "file to write the LSIF output to, instead of the console", DefaultValueFactory = _ => null }; ++ var solution = new CliOption("--solution") { Description = "input solution file" }.AcceptExistingOnly(); ++ var project = new CliOption("--project") { Description = "input project file" }.AcceptExistingOnly(); ++ var compilerInvocation = new CliOption("--compiler-invocation") { Description = "path to a .json file that contains the information for a csc/vbc invocation" }.AcceptExistingOnly(); ++ var binLog = new CliOption("--binlog") { Description = "path to a MSBuild binlog that csc/vbc invocations will be extracted from" }.AcceptExistingOnly(); ++ var output = new CliOption("--output") { Description = "file to write the LSIF output to, instead of the console", DefaultValueFactory = _ => null }; + output.AcceptLegalFilePathsOnly(); +- var outputFormat = new Option("--output-format") { Description = "format of LSIF output", DefaultValueFactory = _ => LsifFormat.Line }; +- var log = new Option("--log") { Description = "file to write a log to", DefaultValueFactory = _ => null }; ++ var outputFormat = new CliOption("--output-format") { Description = "format of LSIF output", DefaultValueFactory = _ => LsifFormat.Line }; ++ var log = new CliOption("--log") { Description = "file to write a log to", DefaultValueFactory = _ => null }; + log.AcceptLegalFilePathsOnly(); + +- var generateCommand = new RootCommand("generates an LSIF file") ++ var generateCommand = new CliRootCommand("generates an LSIF file") + { + solution, + project, +diff --git a/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Program.cs b/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Program.cs +index f5602d249fb..5c80f55e9dd 100644 +--- a/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Program.cs ++++ b/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Program.cs +@@ -17,6 +17,7 @@ + using Microsoft.CodeAnalysis.LanguageServer.Logging; + using Microsoft.CodeAnalysis.LanguageServer.Services; + using Microsoft.CodeAnalysis.LanguageServer.StarredSuggestions; ++using Microsoft.CodeAnalysis.Options; + using Microsoft.Extensions.Logging; + using Microsoft.Extensions.Logging.Console; + using Roslyn.Utilities; +@@ -102,7 +103,7 @@ static async Task RunAsync(ServerConfiguration serverConfiguration, Cancellation + + // LSP server doesn't have the pieces yet to support 'balanced' mode for source-generators. Hardcode us to + // 'automatic' for now. +- var globalOptionService = exportProvider.GetExportedValue(); ++ var globalOptionService = exportProvider.GetExportedValue(); + globalOptionService.SetGlobalOption(WorkspaceConfigurationOptionsStorage.SourceGeneratorExecution, SourceGeneratorExecutionPreference.Automatic); + + // The log file directory passed to us by VSCode might not exist yet, though its parent directory is guaranteed to exist. +@@ -180,79 +181,79 @@ static async Task RunAsync(ServerConfiguration serverConfiguration, Cancellation + } + } + +-static RootCommand CreateCommandLineParser() ++static CliRootCommand CreateCommandLineParser() + { +- var debugOption = new Option("--debug") ++ var debugOption = new CliOption("--debug") + { + Description = "Flag indicating if the debugger should be launched on startup.", + Required = false, + DefaultValueFactory = _ => false, + }; +- var brokeredServicePipeNameOption = new Option("--brokeredServicePipeName") ++ var brokeredServicePipeNameOption = new CliOption("--brokeredServicePipeName") + { + Description = "The name of the pipe used to connect to a remote process (if one exists).", + Required = false, + }; + +- var logLevelOption = new Option("--logLevel") ++ var logLevelOption = new CliOption("--logLevel") + { + Description = "The minimum log verbosity.", + Required = true, + }; +- var starredCompletionsPathOption = new Option("--starredCompletionComponentPath") ++ var starredCompletionsPathOption = new CliOption("--starredCompletionComponentPath") + { + Description = "The location of the starred completion component (if one exists).", + Required = false, + }; + +- var telemetryLevelOption = new Option("--telemetryLevel") ++ var telemetryLevelOption = new CliOption("--telemetryLevel") + { + Description = "Telemetry level, Defaults to 'off'. Example values: 'all', 'crash', 'error', or 'off'.", + Required = false, + }; +- var extensionLogDirectoryOption = new Option("--extensionLogDirectory") ++ var extensionLogDirectoryOption = new CliOption("--extensionLogDirectory") + { + Description = "The directory where we should write log files to", + Required = true, + }; + +- var sessionIdOption = new Option("--sessionId") ++ var sessionIdOption = new CliOption("--sessionId") + { + Description = "Session Id to use for telemetry", + Required = false + }; + +- var extensionAssemblyPathsOption = new Option("--extension") ++ var extensionAssemblyPathsOption = new CliOption("--extension") + { + Description = "Full paths of extension assemblies to load (optional).", + Required = false + }; + +- var devKitDependencyPathOption = new Option("--devKitDependencyPath") ++ var devKitDependencyPathOption = new CliOption("--devKitDependencyPath") + { + Description = "Full path to the Roslyn dependency used with DevKit (optional).", + Required = false + }; + +- var razorSourceGeneratorOption = new Option("--razorSourceGenerator") ++ var razorSourceGeneratorOption = new CliOption("--razorSourceGenerator") + { + Description = "Full path to the Razor source generator (optional).", + Required = false + }; + +- var razorDesignTimePathOption = new Option("--razorDesignTimePath") ++ var razorDesignTimePathOption = new CliOption("--razorDesignTimePath") + { + Description = "Full path to the Razor design time target path (optional).", + Required = false + }; + +- var serverPipeNameOption = new Option("--pipe") ++ var serverPipeNameOption = new CliOption("--pipe") + { + Description = "The name of the pipe the server will connect to.", + Required = false + }; + +- var useStdIoOption = new Option("--stdio") ++ var useStdIoOption = new CliOption("--stdio") + { + Description = "Use stdio for communication with the client.", + Required = false, +@@ -260,7 +261,7 @@ static RootCommand CreateCommandLineParser() + + }; + +- var rootCommand = new RootCommand() ++ var rootCommand = new CliRootCommand() + { + debugOption, + brokeredServicePipeNameOption, +diff --git a/src/Tools/BuildValidator/Program.cs b/src/Tools/BuildValidator/Program.cs +index 3a3c437a1ae..7f19bb81882 100644 +--- a/src/Tools/BuildValidator/Program.cs ++++ b/src/Tools/BuildValidator/Program.cs +@@ -31,45 +31,45 @@ static int Main(string[] args) + { + System.Diagnostics.Trace.Listeners.Clear(); + +- var assembliesPath = new Option("--assembliesPath") ++ var assembliesPath = new CliOption("--assembliesPath") + { + Description = BuildValidatorResources.Path_to_assemblies_to_rebuild_can_be_specified_one_or_more_times, + Required = true, + Arity = ArgumentArity.OneOrMore, + }; +- var exclude = new Option("--exclude") ++ var exclude = new CliOption("--exclude") + { + Description = BuildValidatorResources.Assemblies_to_be_excluded_substring_match, + Arity = ArgumentArity.ZeroOrMore, + }; +- var source = new Option("--sourcePath") ++ var source = new CliOption("--sourcePath") + { + Description = BuildValidatorResources.Path_to_sources_to_use_in_rebuild, + Required = true, + }; +- var referencesPath = new Option("--referencesPath") ++ var referencesPath = new CliOption("--referencesPath") + { + Description = BuildValidatorResources.Path_to_referenced_assemblies_can_be_specified_zero_or_more_times, + Arity = ArgumentArity.ZeroOrMore, + }; +- var verbose = new Option("--verbose") ++ var verbose = new CliOption("--verbose") + { + Description = BuildValidatorResources.Output_verbose_log_information + }; +- var quiet = new Option("--quiet") ++ var quiet = new CliOption("--quiet") + { + Description = BuildValidatorResources.Do_not_output_log_information_to_console + }; +- var debug = new Option("--debug") ++ var debug = new CliOption("--debug") + { + Description = BuildValidatorResources.Output_debug_info_when_rebuild_is_not_equal_to_the_original + }; +- var debugPath = new Option("--debugPath") ++ var debugPath = new CliOption("--debugPath") + { + Description = BuildValidatorResources.Path_to_output_debug_info + }; + +- var rootCommand = new RootCommand ++ var rootCommand = new CliRootCommand + { + assembliesPath, + exclude, +diff --git a/src/Workspaces/MSBuild/BuildHost/Program.cs b/src/Workspaces/MSBuild/BuildHost/Program.cs +index b3a286b6741..48605a39274 100644 +--- a/src/Workspaces/MSBuild/BuildHost/Program.cs ++++ b/src/Workspaces/MSBuild/BuildHost/Program.cs +@@ -16,11 +16,11 @@ internal static class Program + { + internal static async Task Main(string[] args) + { +- var pipeOption = new Option("--pipe") { Required = true }; +- var propertyOption = new Option("--property") { Arity = ArgumentArity.ZeroOrMore }; +- var binaryLogOption = new Option("--binlog") { Required = false }; +- var localeOption = new Option("--locale") { Required = true }; +- var command = new RootCommand { pipeOption, binaryLogOption, propertyOption, localeOption }; ++ var pipeOption = new CliOption("--pipe") { Required = true }; ++ var propertyOption = new CliOption("--property") { Arity = ArgumentArity.ZeroOrMore }; ++ var binaryLogOption = new CliOption("--binlog") { Required = false }; ++ var localeOption = new CliOption("--locale") { Required = true }; ++ var command = new CliRootCommand { pipeOption, binaryLogOption, propertyOption, localeOption }; + var parsedArguments = command.Parse(args); + var pipeName = parsedArguments.GetValue(pipeOption)!; + var properties = parsedArguments.GetValue(propertyOption)!; diff --git a/src/SourceBuild/patches/roslyn/0001-Use-BaseOS-instead-of-TargetRid-when-its-available.patch b/src/SourceBuild/patches/roslyn/0001-Use-BaseOS-instead-of-TargetRid-when-its-available.patch deleted file mode 100644 index cf2d19f1ce75..000000000000 --- a/src/SourceBuild/patches/roslyn/0001-Use-BaseOS-instead-of-TargetRid-when-its-available.patch +++ /dev/null @@ -1,34 +0,0 @@ -From fe7b6d17a00a69b6bb8cb25d640af56f74a60032 Mon Sep 17 00:00:00 2001 -From: Jeremy Koritzinsky -Date: Tue, 21 Jan 2025 11:31:58 -0800 -Subject: [PATCH] Use BaseOS instead of TargetRid when its available. - -In Source Build, BaseOS is the portable runtime identifier for TargetRid. - -Backport: https://github.com/dotnet/roslyn/pull/76838 - ---- - .../Microsoft.CodeAnalysis.LanguageServer.csproj | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj b/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj -index 9b556fcdb8f..a76305b4a29 100644 ---- a/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj -+++ b/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj -@@ -45,12 +45,13 @@ - $(ArtifactsDir)/LanguageServer/$(Configuration)/$(TargetFramework)/neutral - - -- - $(TargetRid) -- win-x64;win-arm64;linux-x64;linux-arm64;linux-musl-x64;linux-musl-arm64;osx-x64;osx-arm64 -+ $(BaseOS) -+ win-x64;win-arm64;linux-x64;linux-arm64;linux-musl-x64;linux-musl-arm64;osx-x64;osx-arm64 - - true -