Skip to content

Commit

Permalink
Merge pull request #7191 from dibarbet/update_roslyn
Browse files Browse the repository at this point in the history
Update Roslyn version and changelog
  • Loading branch information
dibarbet authored Jun 5, 2024
2 parents 7f2808b + 1df0613 commit e80689f
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 41 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)

# Latest
* Update Roslyn to 4.11.0-3.24304.4 (PR: [#7191](https://github.com/dotnet/vscode-csharp/pull/7191))
* Fix build host when only the .net 6 SDK is installed (PR: [#73818](https://github.com/dotnet/roslyn/pull/73818))
* Bump Razor to 9.0.0-preview.24281.3 (PR: [#73817](https://github.com/dotnet/roslyn/pull/73817))
* Fix null reference exception during shutdown (PR: [#73790](https://github.com/dotnet/roslyn/pull/73790))
* Fix race causing workspace diagnostics to be stale (PR: [#73653](https://github.com/dotnet/roslyn/pull/73653))
* Reduce upfront assembly loads in language server (PR: [#73566](https://github.com/dotnet/roslyn/pull/73566))
* Update Debugger.Contracts to 17.11.0-beta.24274.2 (PR: [#73748](https://github.com/dotnet/roslyn/pull/73748))
* Fix signature help in nested method calls (PR: [#73606](https://github.com/dotnet/roslyn/pull/73606))
* Ignore drive casing when comparing paths for .editorconfig on windows platforms (PR: [#73380](https://github.com/dotnet/roslyn/pull/73380))
* Remove dependency on all Roslyn assemblies from build host (PR: [#73497](https://github.com/dotnet/roslyn/pull/73497))
* Various performance improvements and allocation reductions
* Improve AddImport conflict detection performance (PR: [#73780](https://github.com/dotnet/roslyn/pull/73780))
* Modify (Large/Source)Text.ParseLineStart to specify an initial capacity for line count (PR: [#73701](https://github.com/dotnet/roslyn/pull/73701))
* Reduce exceptions in work queue (PR: [#73766](https://github.com/dotnet/roslyn/pull/73766))
* Run providers in parallel when determining if we should show the lightbulb icon (PR: [#73758](https://github.com/dotnet/roslyn/pull/73758))
* Change the DocumentationCommentId to use a PooledStringBuilder (PR: [#73737](https://github.com/dotnet/roslyn/pull/73737))
* Avoid unnecessary array+linq allocs in common case (PR: [#73727](https://github.com/dotnet/roslyn/pull/73727))
* Improve performance in async / await keyword highlighting (PR: [#73721](https://github.com/dotnet/roslyn/pull/73721))
* Avoid unnecessary tree walk when hitting non-relevant directives (PR: [#73720](https://github.com/dotnet/roslyn/pull/73720))
* Utilize ImmutableCollectionsMarshal to get ROS for XxHash128.Hash call (PR: [#73692](https://github.com/dotnet/roslyn/pull/73692))
* Use IAsyncEnumerable for Find References (PR: [#73613](https://github.com/dotnet/roslyn/pull/73613))
* Compute classifications for FAR results in parallel (PR: [#73599](https://github.com/dotnet/roslyn/pull/73599))
* Switch to a List as the backing store for the FAR window from an ImmutableList (PR: [#73589](https://github.com/dotnet/roslyn/pull/73589))
* Switch FAR data from an immutable dictionary to an immutable array (PR: [#73587](https://github.com/dotnet/roslyn/pull/73587))
* More classification perf fixes. (PR: [#73535](https://github.com/dotnet/roslyn/pull/73535))
* Avoid unnecessary allocations while finding token matches in a file (PR: [#73547](https://github.com/dotnet/roslyn/pull/73547))
* Lower the amount of time FAR spends in classification by 4% (PR: [#73533](https://github.com/dotnet/roslyn/pull/73533))

# 2.33.13
* Update xamlTools to 17.11.34931.156 (PR: [#7195](https://github.com/dotnet/vscode-csharp/pull/7195))
* Support XAML Hot Reload on iOS physical devices
* Encrypt Hot Reload connection
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}
},
"defaults": {
"roslyn": "4.11.0-2.24267.3",
"roslyn": "4.11.0-3.24304.4",
"omniSharp": "1.39.11",
"razor": "7.0.0-preview.24266.1",
"razorOmnisharp": "7.0.0-preview.23363.1",
Expand Down
66 changes: 38 additions & 28 deletions test/integrationTests/documentDiagnostics.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,34 @@ describe(`[${testAssetWorkspace.description}] Test diagnostics`, function () {
});

await waitForExpectedFileDiagnostics((diagnostics) => {
expect(diagnostics).toHaveLength(4);
expect(diagnostics).toHaveLength(5);

expect(getCode(diagnostics[0])).toBe('IDE0005');
expect(diagnostics[0].message).toBe('Using directive is unnecessary.');
expect(diagnostics[0].range).toEqual(new vscode.Range(0, 0, 0, 16));
expect(diagnostics[0].severity).toBe(vscode.DiagnosticSeverity.Hint);

expect(getCode(diagnostics[1])).toBe('CA1822');
expect(diagnostics[1].message).toBe(
"Member 'FooBarBar' does not access instance data and can be marked as static"
);
expect(diagnostics[1].range).toEqual(new vscode.Range(6, 20, 6, 29));
expect(getCode(diagnostics[1])).toBe('IDE0130');
expect(diagnostics[1].message).toBe('Namespace "Foo" does not match folder structure, expected "app"');
expect(diagnostics[1].range).toEqual(new vscode.Range(2, 10, 2, 13));
expect(diagnostics[1].severity).toBe(vscode.DiagnosticSeverity.Hint);

expect(getCode(diagnostics[2])).toBe('CS0219');
expect(diagnostics[2].message).toBe("The variable 'notUsed' is assigned but its value is never used");
expect(diagnostics[2].range).toEqual(new vscode.Range(8, 16, 8, 23));
expect(diagnostics[2].severity).toBe(vscode.DiagnosticSeverity.Warning);
expect(getCode(diagnostics[2])).toBe('CA1822');
expect(diagnostics[2].message).toBe(
"Member 'FooBarBar' does not access instance data and can be marked as static"
);
expect(diagnostics[2].range).toEqual(new vscode.Range(6, 20, 6, 29));
expect(diagnostics[2].severity).toBe(vscode.DiagnosticSeverity.Hint);

expect(getCode(diagnostics[3])).toBe('IDE0059');
expect(diagnostics[3].message).toBe("Unnecessary assignment of a value to 'notUsed'");
expect(getCode(diagnostics[3])).toBe('CS0219');
expect(diagnostics[3].message).toBe("The variable 'notUsed' is assigned but its value is never used");
expect(diagnostics[3].range).toEqual(new vscode.Range(8, 16, 8, 23));
expect(diagnostics[3].severity).toBe(vscode.DiagnosticSeverity.Hint);
expect(diagnostics[3].severity).toBe(vscode.DiagnosticSeverity.Warning);

expect(getCode(diagnostics[4])).toBe('IDE0059');
expect(diagnostics[4].message).toBe("Unnecessary assignment of a value to 'notUsed'");
expect(diagnostics[4].range).toEqual(new vscode.Range(8, 16, 8, 23));
expect(diagnostics[4].severity).toBe(vscode.DiagnosticSeverity.Hint);
}, file);
});

Expand All @@ -65,12 +70,12 @@ describe(`[${testAssetWorkspace.description}] Test diagnostics`, function () {
});

await waitForExpectedFileDiagnostics((diagnostics) => {
expect(diagnostics).toHaveLength(4);
expect(diagnostics).toHaveLength(5);

expect(getCode(diagnostics[2])).toBe('CS0219');
expect(diagnostics[2].message).toBe("The variable 'notUsed' is assigned but its value is never used");
expect(diagnostics[2].range).toEqual(new vscode.Range(8, 16, 8, 23));
expect(diagnostics[2].severity).toBe(vscode.DiagnosticSeverity.Warning);
expect(getCode(diagnostics[3])).toBe('CS0219');
expect(diagnostics[3].message).toBe("The variable 'notUsed' is assigned but its value is never used");
expect(diagnostics[3].range).toEqual(new vscode.Range(8, 16, 8, 23));
expect(diagnostics[3].severity).toBe(vscode.DiagnosticSeverity.Warning);
}, file);
});

Expand All @@ -83,7 +88,7 @@ describe(`[${testAssetWorkspace.description}] Test diagnostics`, function () {
await integrationHelpers.restartLanguageServer();

await waitForExpectedFileDiagnostics((diagnostics) => {
expect(diagnostics).toHaveLength(3);
expect(diagnostics).toHaveLength(4);

expect(diagnostics.some((d) => getCode(d).startsWith('CS'))).toBe(false);
}, file);
Expand All @@ -96,24 +101,29 @@ describe(`[${testAssetWorkspace.description}] Test diagnostics`, function () {
});

await waitForExpectedFileDiagnostics((diagnostics) => {
expect(diagnostics).toHaveLength(4);
expect(diagnostics).toHaveLength(5);

expect(getCode(diagnostics[0])).toBe('IDE0005');
expect(diagnostics[0].message).toBe('Using directive is unnecessary.');
expect(diagnostics[0].range).toEqual(new vscode.Range(0, 0, 0, 16));
expect(diagnostics[0].severity).toBe(vscode.DiagnosticSeverity.Hint);

expect(getCode(diagnostics[1])).toBe('CA1822');
expect(diagnostics[1].message).toBe(
expect(getCode(diagnostics[1])).toBe('IDE0130');
expect(diagnostics[1].message).toBe('Namespace "Foo" does not match folder structure, expected "app"');
expect(diagnostics[1].range).toEqual(new vscode.Range(2, 10, 2, 13));
expect(diagnostics[1].severity).toBe(vscode.DiagnosticSeverity.Hint);

expect(getCode(diagnostics[2])).toBe('CA1822');
expect(diagnostics[2].message).toBe(
"Member 'FooBarBar' does not access instance data and can be marked as static"
);
expect(diagnostics[1].range).toEqual(new vscode.Range(6, 20, 6, 29));
expect(diagnostics[1].severity).toBe(vscode.DiagnosticSeverity.Hint);
expect(diagnostics[2].range).toEqual(new vscode.Range(6, 20, 6, 29));
expect(diagnostics[2].severity).toBe(vscode.DiagnosticSeverity.Hint);

expect(getCode(diagnostics[3])).toBe('IDE0059');
expect(diagnostics[3].message).toBe("Unnecessary assignment of a value to 'notUsed'");
expect(diagnostics[3].range).toEqual(new vscode.Range(8, 16, 8, 23));
expect(diagnostics[3].severity).toBe(vscode.DiagnosticSeverity.Hint);
expect(getCode(diagnostics[4])).toBe('IDE0059');
expect(diagnostics[4].message).toBe("Unnecessary assignment of a value to 'notUsed'");
expect(diagnostics[4].range).toEqual(new vscode.Range(8, 16, 8, 23));
expect(diagnostics[4].severity).toBe(vscode.DiagnosticSeverity.Hint);
}, file);
});

Expand Down
24 changes: 12 additions & 12 deletions test/integrationTests/workspaceDiagnostics.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@ describe(`[${testAssetWorkspace.description}] Test diagnostics`, function () {
.filter(([uri, _]) => uri.fsPath.endsWith('completion.cs'))
.flatMap(([_, diagnostics]) => diagnostics);

expect(diagnosticsInDiagnosticsCs).toHaveLength(4);
expect(diagnosticsInCompletionCs).toHaveLength(4);
expect(diagnosticsInDiagnosticsCs).toHaveLength(5);
expect(diagnosticsInCompletionCs).toHaveLength(5);

// Compiler diagnostic in diagnostics.cs
expect(getCode(diagnosticsInDiagnosticsCs[2])).toBe('CS0219');
expect(diagnosticsInDiagnosticsCs[2].message).toBe(
expect(getCode(diagnosticsInDiagnosticsCs[3])).toBe('CS0219');
expect(diagnosticsInDiagnosticsCs[3].message).toBe(
"The variable 'notUsed' is assigned but its value is never used"
);
expect(diagnosticsInDiagnosticsCs[2].range).toEqual(new vscode.Range(8, 16, 8, 23));
expect(diagnosticsInDiagnosticsCs[2].severity).toBe(vscode.DiagnosticSeverity.Warning);
expect(diagnosticsInDiagnosticsCs[3].range).toEqual(new vscode.Range(8, 16, 8, 23));
expect(diagnosticsInDiagnosticsCs[3].severity).toBe(vscode.DiagnosticSeverity.Warning);

// Analyzer diagnostic in diagnostics.cs
expect(getCode(diagnosticsInDiagnosticsCs[1])).toBe('CA1822');
expect(diagnosticsInDiagnosticsCs[1].message).toBe(
expect(getCode(diagnosticsInDiagnosticsCs[2])).toBe('CA1822');
expect(diagnosticsInDiagnosticsCs[2].message).toBe(
"Member 'FooBarBar' does not access instance data and can be marked as static"
);
expect(diagnosticsInDiagnosticsCs[1].range).toEqual(new vscode.Range(6, 20, 6, 29));
expect(diagnosticsInDiagnosticsCs[1].severity).toBe(vscode.DiagnosticSeverity.Hint);
expect(diagnosticsInDiagnosticsCs[2].range).toEqual(new vscode.Range(6, 20, 6, 29));
expect(diagnosticsInDiagnosticsCs[2].severity).toBe(vscode.DiagnosticSeverity.Hint);

// Analyzer diagnostic in completion.cs
expect(getCode(diagnosticsInCompletionCs[0])).toBe('IDE0005');
Expand All @@ -75,7 +75,7 @@ describe(`[${testAssetWorkspace.description}] Test diagnostics`, function () {
.filter(([uri, _]) => uri.fsPath.endsWith('diagnostics.cs'))
.flatMap(([_, diagnostics]) => diagnostics);

expect(diagnosticsInDiagnosticsCs).toHaveLength(3);
expect(diagnosticsInDiagnosticsCs).toHaveLength(4);
expect(diagnosticsInDiagnosticsCs.some((d) => getCode(d).startsWith('CS'))).toBe(false);
});
});
Expand All @@ -93,7 +93,7 @@ describe(`[${testAssetWorkspace.description}] Test diagnostics`, function () {
.filter(([uri, _]) => uri.fsPath.endsWith('diagnostics.cs'))
.flatMap(([_, diagnostics]) => diagnostics);

expect(diagnosticsInDiagnosticsCs).toHaveLength(3);
expect(diagnosticsInDiagnosticsCs).toHaveLength(4);
expect(diagnosticsInDiagnosticsCs.some((d) => getCode(d).startsWith('CS'))).toBe(false);
});
});
Expand Down

0 comments on commit e80689f

Please sign in to comment.