Skip to content

Commit

Permalink
roslyn-ls: 4.13.0-3.24577.4 -> 4.13.0-3.25051.1
Browse files Browse the repository at this point in the history
Added a git-patch to drop net6.0 dependency, which is now EOL.
See #372476 (comment)
  • Loading branch information
konradmalik committed Jan 12, 2025
1 parent 0581f46 commit c560586
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 48 deletions.
78 changes: 36 additions & 42 deletions pkgs/by-name/ro/roslyn-ls/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions pkgs/by-name/ro/roslyn-ls/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ let
(combinePackages [
sdk_9_0
sdk_8_0
# NOTE: we should be able to remove net6.0 after upstream removes from here:
# https://github.com/dotnet/roslyn/blob/6cc106c0eaa9b0ae070dba3138a23aeab9b50c13/eng/targets/TargetFrameworks.props#L20
sdk_6_0
])
packages
targetPackages
Expand All @@ -35,24 +32,28 @@ in
buildDotnetModule rec {
inherit pname dotnet-sdk dotnet-runtime;

vsVersion = "2.59.14";
vsVersion = "2.61.27";
src = fetchFromGitHub {
owner = "dotnet";
repo = "roslyn";
rev = "VSCode-CSharp-${vsVersion}";
hash = "sha256-tzBIqXBtPGupBBvHTFO93w6f5qCgllWY420xtjf9o3g=";
hash = "sha256-mqlCfgymhH/pR/GW3qZd0rmLdNezgVGZS6Q6zaNor8E=";
};

# versioned independently from vscode-csharp
# "roslyn" in here:
# https://github.com/dotnet/vscode-csharp/blob/main/package.json
version = "4.13.0-3.24577.4";
version = "4.13.0-3.25051.1";
projectFile = "src/LanguageServer/${project}/${project}.csproj";
useDotnetFromEnv = true;
nugetDeps = ./deps.json;

nativeBuildInputs = [ jq ];

# until upstream updates net6.0 here:
# https://github.com/dotnet/roslyn/blob/6cc106c0eaa9b0ae070dba3138a23aeab9b50c13/eng/targets/TargetFrameworks.props#L20
patches = [ ./sdk_8_0.patch ];

postPatch = ''
# Upstream uses rollForward = latestPatch, which pins to an *exact* .NET SDK version.
jq '.sdk.rollForward = "latestMinor"' < global.json > global.json.tmp
Expand Down
51 changes: 51 additions & 0 deletions pkgs/by-name/ro/roslyn-ls/sdk_8_0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
diff --git a/eng/targets/TargetFrameworks.props b/eng/targets/TargetFrameworks.props
index 58f90114f4d..8eb23c25067 100644
--- a/eng/targets/TargetFrameworks.props
+++ b/eng/targets/TargetFrameworks.props
@@ -17,7 +17,7 @@
<NetVS>net8.0</NetVS>
<NetVSCode>net8.0</NetVSCode>
<NetVSShared>net8.0</NetVSShared>
- <NetRoslynBuildHostNetCoreVersion>net6.0</NetRoslynBuildHostNetCoreVersion>
+ <NetRoslynBuildHostNetCoreVersion>net8.0</NetRoslynBuildHostNetCoreVersion>
<NetRoslynNext>net9.0</NetRoslynNext>
</PropertyGroup>

diff --git a/src/Workspaces/Core/MSBuild.BuildHost/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.csproj b/src/Workspaces/Core/MSBuild.BuildHost/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.csproj
index 8101f56b8be..2f58a6a910e 100644
--- a/src/Workspaces/Core/MSBuild.BuildHost/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.csproj
+++ b/src/Workspaces/Core/MSBuild.BuildHost/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.csproj
@@ -23,10 +23,16 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<!--
- We specifically reference Microsoft.Build 17.3.4, since it's the oldest version still compatible $(NetRoslynBuildHostNetCoreVersion).
+ We specifically reference Microsoft.Build 17.11.9, since it's the oldest version still compatible $(NetRoslynBuildHostNetCoreVersion).
The version targeted is only used for build time, since we use MSBuildLocator to discover the proper version at runtime.
-->
- <_MsbuildVersion>17.3.4</_MsbuildVersion>
+ <_MsbuildVersion>17.11.9</_MsbuildVersion>
+ </PropertyGroup>
+ <PropertyGroup>
+ <_MsbuildFramework>$(TargetFramework)</_MsbuildFramework>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
+ <_MsbuildFramework>net6.0</_MsbuildFramework>
</PropertyGroup>
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
<PackageReference Include="Microsoft.Build" VersionOverride="$(_MsbuildVersion)" ExcludeAssets="Runtime" PrivateAssets="All" />
@@ -36,10 +42,10 @@
</ItemGroup>
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
<!-- Reference MSBuild directly to avoid redistributing its package closure and including the dependencies in deps.json file. -->
- <PackageDownloadAndReference Include="Microsoft.Build" Version="$(_MsbuildVersion)" Folder="ref/$(TargetFramework)" />
- <PackageDownloadAndReference Include="Microsoft.Build.Framework" Version="$(_MsbuildVersion)" Folder="ref/$(TargetFramework)" />
- <PackageDownloadAndReference Include="Microsoft.Build.Tasks.Core" Version="$(_MsbuildVersion)" Folder="ref/$(TargetFramework)" />
- <PackageDownloadAndReference Include="Microsoft.Build.Utilities.Core" Version="$(_MsbuildVersion)" Folder="ref/$(TargetFramework)" />
+ <PackageDownloadAndReference Include="Microsoft.Build" Version="$(_MsbuildVersion)" Folder="ref/$(_MsbuildFramework)" />
+ <PackageDownloadAndReference Include="Microsoft.Build.Framework" Version="$(_MsbuildVersion)" Folder="ref/$(_MsbuildFramework)" />
+ <PackageDownloadAndReference Include="Microsoft.Build.Tasks.Core" Version="$(_MsbuildVersion)" Folder="ref/$(_MsbuildFramework)" />
+ <PackageDownloadAndReference Include="Microsoft.Build.Utilities.Core" Version="$(_MsbuildVersion)" Folder="ref/$(_MsbuildFramework)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Locator" PrivateAssets="All" />

0 comments on commit c560586

Please sign in to comment.