Skip to content

Commit 67a6533

Browse files
authored
Merge branch 'main' into dev/jorobich/support-project-context
2 parents 4476c3c + 5fbf272 commit 67a6533

File tree

5 files changed

+57
-12
lines changed

5 files changed

+57
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
55

66
# 2.92.x
7+
* Bump Razor to 10.0.0-preview.25464.2 (PR: [#8628](https://github.com/dotnet/vscode-csharp/pull/8628))
8+
* Improve go to definition for mvc tag helpers (PR: [#12216](https://github.com/dotnet/razor/pull/12216))
9+
* Filter CSS024 when caused by C# code in an attribute (PR: [#12209](https://github.com/dotnet/razor/pull/12209))
10+
* Provide more specific information in cohosting failures (PR: [#12193](https://github.com/dotnet/razor/pull/12193))
11+
* Fix renaming file (PR: [#12196](https://github.com/dotnet/razor/pull/12196))
712

813
# 2.91.x
914
* Bump Roslyn to 5.0.0-2.25458.10 (PR: [#8588](https://github.com/dotnet/vscode-csharp/pull/8588))
@@ -17,12 +22,10 @@
1722
* Allow Razor to get task list items for a document (PR: [#80102](https://github.com/dotnet/roslyn/pull/80102))
1823
* Update debugger packages, move to PortableInterop IMetadataImport (PR: [#80063](https://github.com/dotnet/roslyn/pull/80063))
1924
* Fix issue reporting diagnostic in additional file when diagnostic produced by a source generator (PR: [#80071](https://github.com/dotnet/roslyn/pull/80071))
20-
* Always run the razor generator even in balanced mode (PR: [#79510](https://github.com/dotnet/roslyn/pull/79510))
2125
* Bump Razor to 10.0.0-preview.25454.5 (PR: [#8590](https://github.com/dotnet/vscode-csharp/pull/8590))
2226
* Fix extra character insertion during attribute completion in VS Code (PR: [#12177](https://github.com/dotnet/razor/pull/12177))
2327
* Remove UseNewRazorFormattingEngine feature flag (PR: [#12160](https://github.com/dotnet/razor/pull/12160))
2428
* Allow for weird Uris as file paths (PR: [#12155](https://github.com/dotnet/razor/pull/12155))
25-
* Remove the feature flag for precise semantic tokens (PR: [#12149](https://github.com/dotnet/razor/pull/12149))
2629
* Do not create a proxy agent if proxy url is empty string. (PR: [#8580](https://github.com/dotnet/vscode-csharp/pull/8580))
2730
* Use aka.ms link for ARM32 Linux help page (PR: [#8574](https://github.com/dotnet/vscode-csharp/pull/8574))
2831
* Update Debugger to 2.90.0 (PR: [#8572](https://github.com/dotnet/vscode-csharp/pull/8572))

azure-pipelines.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,33 @@ pr:
1515
- prerelease
1616
- main
1717
paths:
18+
# Exclude paths and files which do not cause functional changes to the C# extension and do not impact CI.
1819
exclude:
19-
- '*.md'
20-
- 'version.json'
20+
# Changes to these configuration files are not functional changes.
21+
- .azuredevops/*
22+
- .config/*
23+
- .devcontainer/*
2124
- .github/*
25+
- .vscode/*
26+
# The following pipelines are not run for PRs and changes should be validated by a separate run of the pipeline.
27+
- azure-pipelines/dotnet-vscode-csharp-insertion.yml
28+
- azure-pipelines/loc.yml
2229
- azure-pipelines/release.yml
23-
- CHANGELOG.
30+
- azure-pipelines/profiling.yml
31+
- azure-pipelines/publish-roslyn-copilot.yml
32+
# Changes to documentation are not functional changes.
33+
- docs/*
34+
- images/*
35+
- RuntimeLicenses/*
36+
# Changes to language bundles are not functional changes. We still run CI when `l10n/bundle.l10n.json` itself is changed.
2437
- 'l10n/bundle.l10n.*.json'
38+
# Changes to the color themes are not functional changes.
39+
- themes/*
40+
# Changes to documentation are not functional changes.
41+
- '**.md'
42+
- CODEOWNERS
43+
# Changes to the vesion is not a functional change. The extension version is updated by the branch-snap GH action.
44+
- 'version.json'
2545

2646
# Run a scheduled build every night on main to run tests against insiders VSCode.
2747
# The variable testVSCodeVersion is set to insiders based on the build reason.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"defaults": {
4343
"roslyn": "5.0.0-2.25458.10",
4444
"omniSharp": "1.39.14",
45-
"razor": "10.0.0-preview.25454.5",
45+
"razor": "10.0.0-preview.25464.2",
4646
"razorOmnisharp": "7.0.0-preview.23363.1",
4747
"xamlTools": "17.14.36106.43"
4848
},

src/lsptoolshost/razor/htmlDocumentManager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { HtmlDocumentContentProvider } from './htmlDocumentContentProvider';
1212
import { HtmlDocument } from './htmlDocument';
1313
import { RoslynLanguageServer } from '../server/roslynLanguageServer';
1414
import { RequestType, TextDocumentIdentifier } from 'vscode-languageserver-protocol';
15+
import { UriConverter } from '../utils/uriConverter';
1516

1617
export class HtmlDocumentManager {
1718
private readonly htmlDocuments: { [hostDocumentPath: string]: HtmlDocument } = {};
@@ -51,7 +52,7 @@ export class HtmlDocumentManager {
5152
// so making it a request means the logs end up in the right place.
5253
await this.roslynLanguageServer.sendRequest(
5354
this.razorDocumentClosedRequest,
54-
TextDocumentIdentifier.create(getUriPath(document.uri)),
55+
TextDocumentIdentifier.create(UriConverter.serialize(document.uri)),
5556
new vscode.CancellationTokenSource().token
5657
);
5758
}

test/vscodeLauncher.ts

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,38 @@ export async function prepareVSCodeAndExecuteTests(
6969

7070
async function installExtensions(extensionIds: string[], vscodeCli: string, vscodeArgs: string[]): Promise<void> {
7171
for (const extensionId of extensionIds) {
72-
vscodeArgs.push('--install-extension', extensionId);
72+
// Workaround for https://github.com/microsoft/vscode/issues/256031 to retry installing the extension with a delay.
73+
let installError: any | undefined = undefined;
74+
let installSucceeded = false;
75+
for (let attempts = 0; attempts < 5; attempts++) {
76+
try {
77+
await installExtension(extensionId, vscodeCli, vscodeArgs);
78+
installSucceeded = true;
79+
break;
80+
} catch (error) {
81+
console.warn(`Failed to install extension ${extensionId}; retrying: ${error}`);
82+
installError = error;
83+
await new Promise((resolve) => setTimeout(resolve, 2000));
84+
}
85+
}
86+
87+
if (!installSucceeded) {
88+
throw installError;
89+
}
7390
}
7491

92+
console.log();
93+
}
94+
95+
async function installExtension(extensionId: string, vscodeCli: string, vscodeArgs: string[]): Promise<void> {
96+
const argsWithExtension = [...vscodeArgs, '--install-extension', extensionId];
97+
7598
// Since we're using shell execute, spaces in the CLI path will get interpeted as args
7699
// Therefore we wrap the CLI path in quotes as on MacOS the path can contain spaces.
77100
const cliWrapped = `"${vscodeCli}"`;
78-
console.log(`${cliWrapped} ${vscodeArgs}`);
101+
console.log(`${cliWrapped} ${argsWithExtension}`);
79102

80-
const result = cp.spawnSync(cliWrapped, vscodeArgs, {
103+
const result = cp.spawnSync(cliWrapped, argsWithExtension, {
81104
encoding: 'utf-8',
82105
stdio: 'inherit',
83106
// Workaround as described in https://github.com/nodejs/node/issues/52554
@@ -86,8 +109,6 @@ async function installExtensions(extensionIds: string[], vscodeCli: string, vsco
86109
if (result.error || result.status !== 0) {
87110
throw new Error(`Failed to install extensions: ${JSON.stringify(result)}`);
88111
}
89-
90-
console.log();
91112
}
92113

93114
function getSln(workspacePath: string): string | undefined {

0 commit comments

Comments
 (0)