Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet: august 2024 upgrades #335969

Merged
merged 5 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 29 additions & 45 deletions pkgs/by-name/ro/roslyn-ls/deps.nix

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkgs/by-name/ro/roslyn-ls/package.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ lib, fetchFromGitHub, buildDotnetModule, dotnetCorePackages, stdenvNoCC, testers, roslyn-ls, jq }:
let
pname = "roslyn-ls";
dotnet-sdk = dotnetCorePackages.sdk_9_0;
dotnet-sdk = with dotnetCorePackages; combinePackages [ sdk_6_0 sdk_7_0 sdk_8_0 sdk_9_0 ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps this is my lack of understanding, but why do we add those other SDKs back here?
In the last PR for this package I've removed them which did not change deps.nix at all.
Also there is #326335 which requires to stop using sdk_7_0.

Copy link
Contributor Author

@corngood corngood Aug 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roslyn-ls uses the runtime packages from dotnet 6, 7, 8, and 9. Including 7 here removes the dependency on its packages. Unfortunately 6 and 8 are still present using older versions (6.0.32 and 8.0.7).

I think this is because sdk 9 preview 7 has hardcoded references to 6.0.32, 7.0.20, and 8.0.7, but I haven't had a chance to go digging for that yet.

I'm not sure what the best solution to this is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be an option:

diff --git a/pkgs/by-name/ro/roslyn-ls/package.nix b/pkgs/by-name/ro/roslyn-ls/package.nix
index 3207eea29d09..5f5096f28f4d 100644
--- a/pkgs/by-name/ro/roslyn-ls/package.nix
+++ b/pkgs/by-name/ro/roslyn-ls/package.nix
@@ -1,9 +1,9 @@
 { lib, fetchFromGitHub, buildDotnetModule, dotnetCorePackages, stdenvNoCC, testers, roslyn-ls, jq }:
 let
   pname = "roslyn-ls";
-  dotnet-sdk = with dotnetCorePackages; combinePackages [ sdk_6_0 sdk_7_0 sdk_8_0 sdk_9_0 ];
+  dotnet-sdk = dotnetCorePackages.sdk_9_0;
   # need sdk on runtime as well
-  dotnet-runtime = dotnetCorePackages.sdk_9_0;
+  dotnet-runtime = dotnet-sdk;
 
   project = "Microsoft.CodeAnalysis.LanguageServer";
 in
@@ -45,6 +45,14 @@ buildDotnetModule rec {
     # see this comment: https://github.com/NixOS/nixpkgs/pull/318497#issuecomment-2256096471
     # we can remove below line after https://github.com/dotnet/roslyn/issues/73439 is fixed
     "-p:UsingToolMicrosoftNetCompilers=false"
+    # force everything to net9.0
+    "-p:NetRoslyn=net9.0"
+    "-p:NetRoslynSourceBuild=net9.0"
+    "-p:NetRoslynAll=net9.0"
+    "-p:NetRoslynBuildHostNetCoreVersion=net9.0"
+    "-p:NetRoslynNext=net9.0"
+    "-p:NetVSCode=net9.0"
+    "-p:NetVSShared=net9.0"
   ];
 
   # two problems solved here:

@konradmalik what would you think of that? it allows all the reference dependencies to be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is to look into forcing KnownAppHost to use the versions we actually have in nixpkgs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with that if it works. Do you want to include it here, or should I create a PR? could try KnownAppHost there as well.

Copy link
Contributor

@konradmalik konradmalik Aug 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also just leave it as @Smaug123 suggested. Not sure what it means for the deprecated dotnet 7 though.

Also an idea - we could try setting props such that this branch will be used
which, if I understand correctly, will force using only NetCurrent and NetPrevious which is set to net9.0 in arcade and net8.0 respectively.

All that being said - maybe I should do it in a separate PR aimed just at roslyn-ls.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also an idea - we could try setting props such that this branch will be used

I did try this, but DotNetBuildFromSource seems to cause other problems. I think it might be meant for building as part of the VMR?

I think I'll leave it as is for now. If we ever improve KnownAppHost in the build infrastructure, the dependencies will be reduced on the next fetch-deps, but only if we used the combined sdks.

# need sdk on runtime as well
dotnet-runtime = dotnet-sdk;
dotnet-runtime = dotnetCorePackages.sdk_9_0;

project = "Microsoft.CodeAnalysis.LanguageServer";
in
Expand Down
16 changes: 8 additions & 8 deletions pkgs/development/compilers/dotnet/8/deps.nix

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

6 changes: 3 additions & 3 deletions pkgs/development/compilers/dotnet/8/release-info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"tarballHash": "sha256-wZC9fua07CZoHOTTYRjy509sroJWYEu7byS21Co99Xw=",
"artifactsUrl": "https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.8.0.106-servicing.24278.1.centos.9-x64.tar.gz",
"artifactsHash": "sha256-PL7Kk9M3VI36KeAT+lSBW+kSHSBJd4rfC5fEpCVFR0w="
"tarballHash": "sha256-/LB6wcJyN25e8+wuBBmnBhdafkczl0LoUX0R/NlUdEU=",
"artifactsUrl": "https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.8.0.107-servicing.24317.1.centos.9-x64.tar.gz",
"artifactsHash": "sha256-eduApTyIPz8aVvMCHckVLEJ69/fDLWNtw7EpRq36Qfo="
}
12 changes: 6 additions & 6 deletions pkgs/development/compilers/dotnet/8/release.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"release": "8.0.7",
"release": "8.0.8",
"channel": "8.0",
"tag": "v8.0.7",
"sdkVersion": "8.0.107",
"runtimeVersion": "8.0.7",
"aspNetCoreVersion": "8.0.7",
"tag": "v8.0.8",
"sdkVersion": "8.0.108",
"runtimeVersion": "8.0.8",
"aspNetCoreVersion": "8.0.8",
"sourceRepository": "https://github.com/dotnet/dotnet",
"sourceVersion": "8be139ddde52d33e24c7d82f813248ff9fc54b97"
"sourceVersion": "e78e8a64f20e61e1fea4f24afca66ad1dc56285f"
}
20 changes: 12 additions & 8 deletions pkgs/development/compilers/dotnet/9/deps.nix

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

6 changes: 3 additions & 3 deletions pkgs/development/compilers/dotnet/9/release-info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"tarballHash": "sha256-9MfRifCL91p9TWgIL5qlKxcn2Hgq4gY7cleQyRvx+Vw=",
"artifactsUrl": "https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.9.0.100-preview.6.24312.1.centos.9-x64.tar.gz",
"artifactsHash": "sha256-I0vw3uDV7xze3p/JutImAvoHw3pH74p+xahCdnEWTWM="
"tarballHash": "sha256-DOBRHD6WnvLoCCm9PwtWqfL5CHR8xK3bU3zHsgmuDAM=",
"artifactsUrl": "https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.9.0.100-preview.7.24380.1.centos.9-x64.tar.gz",
"artifactsHash": "sha256-G1gMBCUMO3BiluShVu4sjLc6nLE9V/taXwIIlSOqhJc="
}
12 changes: 6 additions & 6 deletions pkgs/development/compilers/dotnet/9/release.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"release": "9.0.0-preview.6",
"release": "9.0.0-preview.7",
"channel": "9.0",
"tag": "v9.0.0-preview.6.24327.7",
"sdkVersion": "9.0.100-preview.6.24328.1",
"runtimeVersion": "9.0.0-preview.6.24327.7",
"aspNetCoreVersion": "9.0.0-preview.6.24328.4",
"tag": "v9.0.0-preview.7.24405.7",
"sdkVersion": "9.0.100-preview.7.24407.1",
"runtimeVersion": "9.0.0-preview.7.24405.7",
"aspNetCoreVersion": "9.0.0-preview.7.24406.2",
"sourceRepository": "https://github.com/dotnet/dotnet",
"sourceVersion": "df2bf85c5dd6f3b834db7ee91d53c5d0b9469ca6"
"sourceVersion": "aecea31eada5f5506de2112d72b3bd238a5317b4"
}
1 change: 1 addition & 0 deletions pkgs/development/compilers/dotnet/dotnet-sdk-setup-hook.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# shellcheck shell=bash disable=SC2154
export MSBUILDALWAYSOVERWRITEREADONLYFILES=1
export MSBUILDTERMINALLOGGER=false

declare -Ag _nugetInputs

Expand Down
Loading