Unverified Commit a8e896a9 authored by David McFarland's avatar David McFarland Committed by GitHub
Browse files

Merge pull request #318497 from konradmalik/roslyn-ls

roslyn-ls: 4.10.0-2.24124.2 -> 4.12.0-1.24359.11
parents fb89aa57 e597d01d
Loading
Loading
Loading
Loading
+245 −210

File changed.

Preview size limit exceeded, changes collapsed.

+10 −8
Original line number Diff line number Diff line
{ lib, fetchFromGitHub, buildDotnetModule, dotnetCorePackages, stdenvNoCC, testers, roslyn-ls, jq }:
let
  pname = "roslyn-ls";
  # see https://github.com/dotnet/roslyn/blob/main/eng/targets/TargetFrameworks.props
  dotnet-sdk = with dotnetCorePackages; combinePackages [ sdk_6_0 sdk_7_0 sdk_8_0 ];
  dotnet-sdk = dotnetCorePackages.sdk_9_0;
  # need sdk on runtime as well
  dotnet-runtime = dotnetCorePackages.sdk_8_0;
  dotnet-runtime = dotnet-sdk;

  project = "Microsoft.CodeAnalysis.LanguageServer";
in
buildDotnetModule rec {
  inherit pname dotnet-sdk dotnet-runtime;

  vsVersion = "2.22.2";
  vsVersion = "2.39.29";
  src = fetchFromGitHub {
    owner = "dotnet";
    repo = "roslyn";
    rev = "VSCode-CSharp-${vsVersion}";
    hash = "sha256-j7PXgYjISlPBbhUEEIxkDlOx7TMYPHtC3KH2DViWxJ8=";
    hash = "sha256-E0gha6jZnXyRVH5XUuXxa7H9+2lfD9XTlQcNSiQycHA=";
  };

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

@@ -36,13 +35,16 @@ buildDotnetModule rec {

    substituteInPlace $projectFile \
      --replace-fail \
        '>win-x64;win-x86;win-arm64;linux-x64;linux-arm64;linux-musl-x64;linux-musl-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>' \
        '>win-x64;win-arm64;linux-x64;linux-arm64;linux-musl-x64;linux-musl-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>' \
        '>linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>'
  '';

  dotnetFlags = [
    # this removes the Microsoft.WindowsDesktop.App.Ref dependency
    "-p:EnableWindowsTargeting=false"
    # 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"
  ];

  # two problems solved here: