Skip to content

Commit e6f66d9

Browse files
[main] Source code updates from dotnet/roslyn (#10726)
[main] Source code updates from dotnet/roslyn
1 parent 7cc16ae commit e6f66d9

54 files changed

Lines changed: 1827 additions & 352 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/roslyn/dotnet-tools.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"rollForward": false
1010
},
1111
"microsoft.dotnet.helix.jobmonitor": {
12-
"version": "11.0.0-beta.26528.6",
12+
"version": "11.0.0-beta.26553.7",
1313
"commands": [
1414
"dotnet-helix-job-monitor"
1515
]

‎src/roslyn/eng/Version.Details.props‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ This file should be imported by eng/Versions.props
66
<Project>
77
<PropertyGroup>
88
<!-- dotnet-arcade dependencies -->
9-
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.26528.6</MicrosoftDotNetArcadeSdkPackageVersion>
10-
<MicrosoftDotNetHelixJobMonitorPackageVersion>11.0.0-beta.26528.6</MicrosoftDotNetHelixJobMonitorPackageVersion>
11-
<MicrosoftDotNetHelixSdkPackageVersion>11.0.0-beta.26528.6</MicrosoftDotNetHelixSdkPackageVersion>
12-
<MicrosoftDotNetXliffTasksPackageVersion>11.0.0-beta.26528.6</MicrosoftDotNetXliffTasksPackageVersion>
9+
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.26553.7</MicrosoftDotNetArcadeSdkPackageVersion>
10+
<MicrosoftDotNetHelixJobMonitorPackageVersion>11.0.0-beta.26553.7</MicrosoftDotNetHelixJobMonitorPackageVersion>
11+
<MicrosoftDotNetHelixSdkPackageVersion>11.0.0-beta.26553.7</MicrosoftDotNetHelixSdkPackageVersion>
12+
<MicrosoftDotNetXliffTasksPackageVersion>11.0.0-beta.26553.7</MicrosoftDotNetXliffTasksPackageVersion>
1313
<!-- dotnet-dotnet dependencies -->
1414
<MicrosoftBclAsyncInterfacesPackageVersion>10.0.10</MicrosoftBclAsyncInterfacesPackageVersion>
1515
<MicrosoftExtensionsConfigurationPackageVersion>10.0.10</MicrosoftExtensionsConfigurationPackageVersion>

‎src/roslyn/eng/Version.Details.xml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@
137137
</Dependency>
138138
</ProductDependencies>
139139
<ToolsetDependencies>
140-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26528.6">
140+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26553.7">
141141
<Uri>https://github.com/dotnet/arcade</Uri>
142-
<Sha>d7737fa028e509dc2baafddf2607bab06bb9621f</Sha>
142+
<Sha>42933ea2511f3d11b247c28fa08ad8c6c7749c4a</Sha>
143143
</Dependency>
144-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="11.0.0-beta.26528.6">
144+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="11.0.0-beta.26553.7">
145145
<Uri>https://github.com/dotnet/arcade</Uri>
146-
<Sha>d7737fa028e509dc2baafddf2607bab06bb9621f</Sha>
146+
<Sha>42933ea2511f3d11b247c28fa08ad8c6c7749c4a</Sha>
147147
</Dependency>
148148
<Dependency Name="Microsoft.DiaSymReader" Version="2.2.10">
149149
<Uri>https://github.com/dotnet/symreader</Uri>
@@ -153,9 +153,9 @@
153153
<Uri>https://github.com/dotnet/roslyn</Uri>
154154
<Sha>f5ceb9666d6870bd4d9a0ffcd6788eb34d57b8db</Sha>
155155
</Dependency>
156-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="11.0.0-beta.26528.6">
156+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="11.0.0-beta.26553.7">
157157
<Uri>https://github.com/dotnet/arcade</Uri>
158-
<Sha>d7737fa028e509dc2baafddf2607bab06bb9621f</Sha>
158+
<Sha>42933ea2511f3d11b247c28fa08ad8c6c7749c4a</Sha>
159159
</Dependency>
160160
<!-- Entries below are necessary for source-build. This allows the packages to be retrieved from previously-source-built
161161
artifacts and flow in as dependencies of the packages produced by roslyn. -->
@@ -175,9 +175,9 @@
175175
<Uri>https://github.com/dotnet/roslyn</Uri>
176176
<Sha>f5ceb9666d6870bd4d9a0ffcd6788eb34d57b8db</Sha>
177177
</Dependency>
178-
<Dependency Name="Microsoft.DotNet.Helix.JobMonitor" Version="11.0.0-beta.26528.6">
178+
<Dependency Name="Microsoft.DotNet.Helix.JobMonitor" Version="11.0.0-beta.26553.7">
179179
<Uri>https://github.com/dotnet/arcade</Uri>
180-
<Sha>d7737fa028e509dc2baafddf2607bab06bb9621f</Sha>
180+
<Sha>42933ea2511f3d11b247c28fa08ad8c6c7749c4a</Sha>
181181
</Dependency>
182182
</ToolsetDependencies>
183183
</Dependencies>

‎src/roslyn/eng/common/core-templates/job/publish-build-assets.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ jobs:
187187
PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
188188
is1ESPipeline: ${{ parameters.is1ESPipeline }}
189189

190-
# Darc is targeting 8.0, so make sure it's installed
190+
# Darc is targeting 10.0, so make sure it's installed
191191
- task: UseDotNet@2
192192
inputs:
193-
version: 8.0.x
193+
version: 10.0.x
194194

195195
- task: AzureCLI@2
196196
displayName: Publish Using Darc

‎src/roslyn/eng/common/core-templates/post-build/post-build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ stages:
301301

302302
- task: UseDotNet@2
303303
inputs:
304-
version: 8.0.x
304+
version: 10.0.x
305305

306306
- task: AzureCLI@2
307307
displayName: Publish Using Darc

‎src/roslyn/global.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
}
1919
},
2020
"msbuild-sdks": {
21-
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26528.6",
22-
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26528.6",
21+
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26553.7",
22+
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26553.7",
2323
"Microsoft.Build.Traversal": "3.4.0",
2424
"Microsoft.Build.NoTargets": "3.7.0"
2525
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System.Collections.Concurrent;
6+
using Microsoft.CodeAnalysis.LanguageServer.HostWorkspace;
7+
using Xunit.Abstractions;
8+
9+
namespace Microsoft.CodeAnalysis.LanguageServer.UnitTests;
10+
11+
public sealed class LanguageServerProjectSystemTests(ITestOutputHelper testOutputHelper) : AbstractLanguageServerHostTests(testOutputHelper)
12+
{
13+
[Fact]
14+
public async Task OpenProjectsDoesNotLoadOrLogSharedProject()
15+
{
16+
await using var server = await CreateLanguageServerAsync(serverConfiguration: ServerConfigurationWithoutDevKit);
17+
var logMessages = new ConcurrentQueue<string>();
18+
server.LogMessageReceived += logMessage => logMessages.Enqueue(logMessage.Message);
19+
var projectPath = TempRoot.CreateDirectory().CreateFile("Unsupported.shproj").Path;
20+
21+
await server.OpenProjectsAsync([projectPath], CancellationToken.None);
22+
23+
var projectSystem = server.GetRequiredLspService<LanguageServerProjectSystem>();
24+
Assert.Empty(await projectSystem.GetTestAccessor().GetLoadedProjectPathsAsync());
25+
Assert.Empty(server.GetRequiredLspService<LanguageServerWorkspaceFactory>().HostWorkspace.CurrentSolution.Projects);
26+
Assert.DoesNotContain(logMessages, message => IsUnsupportedProjectLog(message, projectPath));
27+
}
28+
29+
[Fact]
30+
public async Task OpenProjectsLogsUnsupportedProject()
31+
{
32+
await using var server = await CreateLanguageServerAsync(serverConfiguration: ServerConfigurationWithoutDevKit);
33+
var logMessages = new ConcurrentQueue<string>();
34+
server.LogMessageReceived += logMessage => logMessages.Enqueue(logMessage.Message);
35+
var projectPath = TempRoot.CreateDirectory().CreateFile("Unsupported.unsupportedproj").Path;
36+
37+
await server.OpenProjectsAsync([projectPath], CancellationToken.None);
38+
39+
var projectSystem = server.GetRequiredLspService<LanguageServerProjectSystem>();
40+
Assert.Empty(await projectSystem.GetTestAccessor().GetLoadedProjectPathsAsync());
41+
Assert.Empty(server.GetRequiredLspService<LanguageServerWorkspaceFactory>().HostWorkspace.CurrentSolution.Projects);
42+
Assert.Contains(logMessages, message => IsUnsupportedProjectLog(message, projectPath));
43+
}
44+
45+
private static bool IsUnsupportedProjectLog(string message, string projectPath)
46+
=> message.Contains($"Not loading project '{projectPath}' because its language is not supported.", StringComparison.Ordinal);
47+
}

‎src/roslyn/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/FileBasedPrograms/FileBasedProgramsProjectSystem.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public async ValueTask CloseDocumentAsync(DocumentUri uri)
337337
{
338338
// This might happen due to a race involving changes to option values.
339339
// Just don't proceed with the reload and assume the option change handler will unload this project if needed.
340-
_logger.LogWarning("A document classified as {documentKind} should not be design-time built.", documentKind);
340+
_logger.LogWarning("Not loading '{documentPath}': a document classified as {documentKind} should not be design-time built.", documentPath, documentKind);
341341
return null;
342342
}
343343

0 commit comments

Comments
 (0)