Skip to content

Commit e1729a6

Browse files
authored
update roslyn patch againnnn
1 parent 74a830d commit e1729a6

File tree

2 files changed

+63
-30
lines changed

2 files changed

+63
-30
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
From c8355ffa159872e061789a62e02768c8f52e7c53 Mon Sep 17 00:00:00 2001
2+
From: Viktor Hofer <viktor.hofer@microsoft.com>
3+
Date: Wed, 18 Dec 2024 14:38:02 +0100
4+
Subject: [PATCH] FIx build errors with newer toolset and dependencies
5+
6+
Fixes the following two errors:
7+
- src/Features/Core/Portable/ExternalAccess/Watch/Api/WatchHotReloadService.cs(217,13): error CS1503: Argument 4: cannot convert from 'System.Collections.Immutable.ImmutableHashSet<Microsoft.CodeAnalysis.Project>' to 'System.Collections.Generic.IReadOnlySet<Microsoft.CodeAnalysis.Project>' [src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj::TargetFramework=net9.0]
8+
- src/roslyn/src/Features/Core/Portable/ExternalAccess/Watch/Api/WatchHotReloadService.cs(218,13): error CS1503: Argument 5: cannot convert from 'System.Collections.Immutable.ImmutableHashSet<Microsoft.CodeAnalysis.Project>' to 'System.Collections.Generic.IReadOnlySet<Microsoft.CodeAnalysis.Project>' [src/roslyn/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj::TargetFramework=net9.0]
9+
10+
The underlying SDK being used is "10.0.100-alpha.1.24555.54"
11+
12+
Backport: https://github.com/dotnet/roslyn/pull/76486
13+
14+
---
15+
src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj | 4 ++--
16+
.../Core/Portable/Microsoft.CodeAnalysis.Features.csproj | 2 +-
17+
.../Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj | 4 ++--
18+
3 files changed, 5 insertions(+), 5 deletions(-)
19+
20+
diff --git a/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj b/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj
21+
index 94c47e9a01e..e946b3ad490 100644
22+
--- a/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj
23+
+++ b/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj
24+
@@ -31,9 +31,9 @@
25+
will import everything but content files from Microsoft.CodeAnalysis.Analyzers, specifically, analyzers.
26+
-->
27+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Condition="'$(DotNetBuildSourceOnly)' != 'true'" PrivateAssets="ContentFiles" />
28+
- <PackageReference Include="System.Collections.Immutable" />
29+
+ <PackageReference Include="System.Collections.Immutable" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
30+
<PackageReference Include="System.Memory" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
31+
- <PackageReference Include="System.Reflection.Metadata" />
32+
+ <PackageReference Include="System.Reflection.Metadata" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
33+
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
34+
<PackageReference Include="System.Threading.Tasks.Extensions" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
35+
<PackageReference Include="System.Text.Encoding.CodePages" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
36+
diff --git a/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj b/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj
37+
index c3729dd7244..48a5d9c53a7 100644
38+
--- a/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj
39+
+++ b/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj
40+
@@ -139,7 +139,7 @@
41+
<PackageReference Include="Microsoft.CodeAnalysis.AnalyzerUtilities" />
42+
<PackageReference Include="Microsoft.CodeAnalysis.Elfie" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
43+
<PackageReference Include="Microsoft.DiaSymReader" />
44+
- <PackageReference Include="System.Text.Json" />
45+
+ <PackageReference Include="System.Text.Json" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
46+
<PackageReference Include="System.Threading.Tasks.Extensions" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
47+
</ItemGroup>
48+
<Import Project="..\..\..\Analyzers\Core\Analyzers\Analyzers.projitems" Label="Shared" />
49+
diff --git a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
50+
index 7ddf1ce681c..877356417e5 100644
51+
--- a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
52+
+++ b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
53+
@@ -29,8 +29,8 @@
54+
since it's now automatic, and Source Build will ensure we get a proper one automatically if we do nothing; if we reference the older version
55+
then source build may only give us a reference assembly would fail if we then try to actually run that output. -->
56+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
57+
- <PackageReference Include="System.IO.Pipelines" />
58+
- <PackageReference Include="System.Threading.Channels" />
59+
+ <PackageReference Include="System.IO.Pipelines" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
60+
+ <PackageReference Include="System.Threading.Channels" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
61+
</ItemGroup>
62+
<ItemGroup Label="Linked Files">
63+
<Compile Remove="Storage\SQLite\**\*.cs" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />

src/SourceBuild/patches/roslyn/0001-fix-compiler-errors-downgraded-sci.patch

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)