Skip to content

Commit e5e6fc2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into dev/dibarbet/action_inc_version
2 parents 0986ee1 + 12c2fc9 commit e5e6fc2

15 files changed

+125
-69
lines changed

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@
420420
{
421421
"id": "Debugger",
422422
"description": ".NET Core Debugger (Windows / x64)",
423-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-34-1/coreclr-debug-win7-x64.zip",
423+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-39-0/coreclr-debug-win7-x64.zip",
424424
"installPath": ".debugger/x86_64",
425425
"platforms": [
426426
"win32"
@@ -430,12 +430,12 @@
430430
"arm64"
431431
],
432432
"installTestPath": "./.debugger/x86_64/vsdbg-ui.exe",
433-
"integrity": "51E1D32D7A2FA219FB1D0DA1653499A37FAB146C5DB8FAE1152EA1D9439CB44F"
433+
"integrity": "2E1B070445463960CF431E520CC2F8C17606A0ADC8FC0AD980F8C228FDE4C20F"
434434
},
435435
{
436436
"id": "Debugger",
437437
"description": ".NET Core Debugger (Windows / ARM64)",
438-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-34-1/coreclr-debug-win10-arm64.zip",
438+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-39-0/coreclr-debug-win10-arm64.zip",
439439
"installPath": ".debugger/arm64",
440440
"platforms": [
441441
"win32"
@@ -444,12 +444,12 @@
444444
"arm64"
445445
],
446446
"installTestPath": "./.debugger/arm64/vsdbg-ui.exe",
447-
"integrity": "9255B1E7F54D0BF6A425B3EB24285F344C454D389EDDCDA3A152E5AB68C75DDC"
447+
"integrity": "813140680EDCDF32280314A6C69A3AB3699016FF2ABC977905E7E8EC51665317"
448448
},
449449
{
450450
"id": "Debugger",
451451
"description": ".NET Core Debugger (macOS / x64)",
452-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-34-1/coreclr-debug-osx-x64.zip",
452+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-39-0/coreclr-debug-osx-x64.zip",
453453
"installPath": ".debugger/x86_64",
454454
"platforms": [
455455
"darwin"
@@ -463,12 +463,12 @@
463463
"./vsdbg"
464464
],
465465
"installTestPath": "./.debugger/x86_64/vsdbg-ui",
466-
"integrity": "A34F01035D135B48016211C93D0834C2569923EBCCA1A63F86081DA3EFEEB66C"
466+
"integrity": "2A05B2FADA307DA2E3E1A11BE3765CB1D4FDE1966B36C573C8B3A35D2AC3705A"
467467
},
468468
{
469469
"id": "Debugger",
470470
"description": ".NET Core Debugger (macOS / arm64)",
471-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-34-1/coreclr-debug-osx-arm64.zip",
471+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-39-0/coreclr-debug-osx-arm64.zip",
472472
"installPath": ".debugger/arm64",
473473
"platforms": [
474474
"darwin"
@@ -481,12 +481,12 @@
481481
"./vsdbg"
482482
],
483483
"installTestPath": "./.debugger/arm64/vsdbg-ui",
484-
"integrity": "977F1E49FC561E3CB9C6B5305B48E5597BBE91C4A0FD0DE49DB73107555D966E"
484+
"integrity": "696E8087F419FFF82159F0959909A627FAA12AFA5D7FBD620482E74CD475172B"
485485
},
486486
{
487487
"id": "Debugger",
488488
"description": ".NET Core Debugger (linux / ARM)",
489-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-34-1/coreclr-debug-linux-arm.zip",
489+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-39-0/coreclr-debug-linux-arm.zip",
490490
"installPath": ".debugger",
491491
"platforms": [
492492
"linux"
@@ -499,12 +499,12 @@
499499
"./vsdbg"
500500
],
501501
"installTestPath": "./.debugger/vsdbg-ui",
502-
"integrity": "975F5D034E36F0AC5E22F5B3B536C7F1FF1D2E0B7C2F94A50121845470302A73"
502+
"integrity": "9B3009AC00E221DD0480340983522E944E4F61E1DBA6AC2D1E35F629EA436D8B"
503503
},
504504
{
505505
"id": "Debugger",
506506
"description": ".NET Core Debugger (linux / ARM64)",
507-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-34-1/coreclr-debug-linux-arm64.zip",
507+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-39-0/coreclr-debug-linux-arm64.zip",
508508
"installPath": ".debugger",
509509
"platforms": [
510510
"linux"
@@ -517,12 +517,12 @@
517517
"./vsdbg"
518518
],
519519
"installTestPath": "./.debugger/vsdbg-ui",
520-
"integrity": "A9D9DC69815DB4CDDA97BA9B1F5C186F7ECFDAF85F9A32C249B4B4DA2E0A69F6"
520+
"integrity": "76257B3F4F2DFFD2DC7CFCB4A230C973191BEAE8BC16E347444D19451107BFAE"
521521
},
522522
{
523523
"id": "Debugger",
524524
"description": ".NET Core Debugger (linux musl / x64)",
525-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-34-1/coreclr-debug-linux-musl-x64.zip",
525+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-39-0/coreclr-debug-linux-musl-x64.zip",
526526
"installPath": ".debugger",
527527
"platforms": [
528528
"linux-musl"
@@ -535,12 +535,12 @@
535535
"./vsdbg"
536536
],
537537
"installTestPath": "./.debugger/vsdbg-ui",
538-
"integrity": "A7FB2C2F8B325C7DE533483CFC87C056D80C20E2FDE4313AC39DA683A31ACADD"
538+
"integrity": "C518061780B9286C5128CD3DA556214EDD6076324869A5459A998FBED032351F"
539539
},
540540
{
541541
"id": "Debugger",
542542
"description": ".NET Core Debugger (linux musl / ARM64)",
543-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-34-1/coreclr-debug-linux-musl-arm64.zip",
543+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-39-0/coreclr-debug-linux-musl-arm64.zip",
544544
"installPath": ".debugger",
545545
"platforms": [
546546
"linux-musl"
@@ -553,12 +553,12 @@
553553
"./vsdbg"
554554
],
555555
"installTestPath": "./.debugger/vsdbg-ui",
556-
"integrity": "DE7A55DD7A060333E0A5FB45C91DF8C1CFCCA35080B24327938DDD5DC6DE45D7"
556+
"integrity": "805D76CCA280E165C5CE02EAD14241A94CC3E1D7E5EBB658FBE82E730EB5F1C3"
557557
},
558558
{
559559
"id": "Debugger",
560560
"description": ".NET Core Debugger (linux / x64)",
561-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-34-1/coreclr-debug-linux-x64.zip",
561+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-39-0/coreclr-debug-linux-x64.zip",
562562
"installPath": ".debugger",
563563
"platforms": [
564564
"linux"
@@ -571,7 +571,7 @@
571571
"./vsdbg"
572572
],
573573
"installTestPath": "./.debugger/vsdbg-ui",
574-
"integrity": "EB7CABB79A99FFBA926DE436D862253B10AFA8EC9D5706FE18D0C2671E564117"
574+
"integrity": "598B632A366CCECE147553C4A0E9A7F9B26B63B61AE33F2CA4950E6BFAF97F34"
575575
},
576576
{
577577
"id": "RazorOmnisharp",
@@ -5570,4 +5570,4 @@
55705570
}
55715571
]
55725572
}
5573-
}
5573+
}

src/razor/src/document/razorDocumentSynchronizer.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ export class RazorDocumentSynchronizer {
123123

124124
const documentKey = getUriPath(context.projectedDocument.uri);
125125
const synchronizations = this.synchronizations[documentKey];
126-
clearTimeout(context.timeoutId);
127126

128127
if (synchronizations.length === 1) {
129128
delete this.synchronizations[documentKey];
@@ -170,9 +169,8 @@ export class RazorDocumentSynchronizer {
170169
}
171170
},
172171
dispose: () => {
173-
while (rejectionsForCancel.length > 0) {
174-
rejectionsForCancel.pop();
175-
}
172+
rejectionsForCancel.length = 0;
173+
clearTimeout(context.timeoutId);
176174
},
177175
projectedDocumentSynchronized,
178176
onProjectedDocumentSynchronized,

test/integrationTests/buildDiagnostics.integration.test.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,28 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as vscode from 'vscode';
7-
import { describe, test, expect, beforeAll, afterAll } from '@jest/globals';
7+
import { describe, test, expect, beforeAll, afterAll, beforeEach, afterEach } from '@jest/globals';
88
import testAssetWorkspace from './testAssets/testAssetWorkspace';
99
import { AnalysisSetting, BuildDiagnosticsService } from '../../src/lsptoolshost/buildDiagnosticsService';
1010
import * as integrationHelpers from './integrationHelpers';
1111
import path = require('path');
12-
describe(`Build and live diagnostics dedupe ${testAssetWorkspace.description}`, function () {
13-
beforeAll(async function () {
14-
await integrationHelpers.openFileInWorkspaceAsync(path.join('src', 'app', 'inlayHints.cs'));
12+
describe(`Build and live diagnostics dedupe ${testAssetWorkspace.description}`, () => {
13+
beforeAll(async () => {
1514
await integrationHelpers.activateCSharpExtension();
1615
});
1716

17+
beforeEach(async () => {
18+
await integrationHelpers.openFileInWorkspaceAsync(path.join('src', 'app', 'inlayHints.cs'));
19+
});
20+
1821
afterAll(async () => {
1922
await testAssetWorkspace.cleanupWorkspace();
2023
});
2124

25+
afterEach(async () => {
26+
await integrationHelpers.closeAllEditorsAsync();
27+
});
28+
2229
test('OpenFiles diagnostics', async () => {
2330
await setBackgroundAnalysisSetting(
2431
/*analyzer*/ AnalysisSetting.OpenFiles,

test/integrationTests/codelens.integration.test.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66
import * as lsp from 'vscode-languageserver-protocol';
77
import * as vscode from 'vscode';
88
import * as path from 'path';
9-
import { describe, beforeAll, beforeEach, afterAll, test, expect } from '@jest/globals';
9+
import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals';
1010
import testAssetWorkspace from './testAssets/testAssetWorkspace';
11-
import { activateCSharpExtension, getCodeLensesAsync, openFileInWorkspaceAsync } from './integrationHelpers';
11+
import {
12+
activateCSharpExtension,
13+
closeAllEditorsAsync,
14+
getCodeLensesAsync,
15+
openFileInWorkspaceAsync,
16+
} from './integrationHelpers';
1217

13-
describe(`[${testAssetWorkspace.description}] Test CodeLens`, function () {
14-
beforeAll(async function () {
18+
describe(`[${testAssetWorkspace.description}] Test CodeLens`, () => {
19+
beforeAll(async () => {
1520
await activateCSharpExtension();
1621
});
1722

18-
beforeEach(async function () {
23+
beforeEach(async () => {
1924
const fileName = path.join('src', 'app', 'reference.cs');
2025
await openFileInWorkspaceAsync(fileName);
2126
});
@@ -24,6 +29,10 @@ describe(`[${testAssetWorkspace.description}] Test CodeLens`, function () {
2429
await testAssetWorkspace.cleanupWorkspace();
2530
});
2631

32+
afterEach(async () => {
33+
await closeAllEditorsAsync();
34+
});
35+
2736
test('CodeLens references are displayed', async () => {
2837
const codeLenses = await getCodeLensesAsync();
2938
expect(codeLenses).toHaveLength(4);

test/integrationTests/commandEnablement.integration.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ import { activateCSharpExtension } from './integrationHelpers';
99
import testAssetWorkspace from './testAssets/testAssetWorkspace';
1010
import { CommonCommands, OmniSharpCommands, RoslynCommands } from './expectedCommands';
1111

12-
describe(`Command Enablement: ${testAssetWorkspace.description}`, function () {
13-
beforeAll(async function () {
12+
describe(`Command Enablement: ${testAssetWorkspace.description}`, () => {
13+
beforeAll(async () => {
1414
await activateCSharpExtension();
1515
});
1616

1717
afterAll(async () => {
1818
await testAssetWorkspace.cleanupWorkspace();
1919
});
2020

21-
test('Roslyn commands are available', async function () {
21+
test('Roslyn commands are available', async () => {
2222
const commands = await vscode.commands.getCommands(true);
2323

2424
// Ensure the standalone Roslyn commands are available.

test/integrationTests/completion.integration.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55

66
import * as vscode from 'vscode';
77
import * as path from 'path';
8-
import { describe, beforeAll, beforeEach, afterAll, test, expect } from '@jest/globals';
8+
import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals';
99
import testAssetWorkspace from './testAssets/testAssetWorkspace';
10-
import { activateCSharpExtension, openFileInWorkspaceAsync } from './integrationHelpers';
10+
import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers';
1111

12-
describe(`[${testAssetWorkspace.description}] Test Completion`, function () {
13-
beforeAll(async function () {
12+
describe(`[${testAssetWorkspace.description}] Test Completion`, () => {
13+
beforeAll(async () => {
1414
await activateCSharpExtension();
1515
});
1616

17-
beforeEach(async function () {
17+
beforeEach(async () => {
1818
const fileName = path.join('src', 'app', 'completion.cs');
1919
await openFileInWorkspaceAsync(fileName);
2020
});
@@ -23,6 +23,10 @@ describe(`[${testAssetWorkspace.description}] Test Completion`, function () {
2323
await testAssetWorkspace.cleanupWorkspace();
2424
});
2525

26+
afterEach(async () => {
27+
await closeAllEditorsAsync();
28+
});
29+
2630
test('Returns completion items', async () => {
2731
const completionList = await getCompletionsAsync(new vscode.Position(8, 12), undefined, 10);
2832
expect(completionList.items.length).toBeGreaterThan(0);

test/integrationTests/documentDiagnostics.integration.test.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as vscode from 'vscode';
7-
import { describe, test, beforeAll, afterAll, expect } from '@jest/globals';
7+
import { describe, test, beforeAll, afterAll, expect, beforeEach, afterEach } from '@jest/globals';
88
import testAssetWorkspace from './testAssets/testAssetWorkspace';
99
import { AnalysisSetting } from '../../src/lsptoolshost/buildDiagnosticsService';
1010
import * as integrationHelpers from './integrationHelpers';
1111
import path = require('path');
1212
import { getCode, setBackgroundAnalysisScopes, waitForExpectedDiagnostics } from './diagnosticsHelpers';
13-
describe(`[${testAssetWorkspace.description}] Test diagnostics`, function () {
14-
beforeAll(async function () {
13+
14+
describe(`[${testAssetWorkspace.description}] Test diagnostics`, () => {
15+
beforeAll(async () => {
1516
await integrationHelpers.activateCSharpExtension();
1617
});
1718

@@ -21,10 +22,14 @@ describe(`[${testAssetWorkspace.description}] Test diagnostics`, function () {
2122

2223
describe('Open document diagnostics', () => {
2324
let file: vscode.Uri;
24-
beforeAll(async () => {
25+
beforeEach(async () => {
2526
file = await integrationHelpers.openFileInWorkspaceAsync(path.join('src', 'app', 'diagnostics.cs'));
2627
});
2728

29+
afterEach(async () => {
30+
await integrationHelpers.closeAllEditorsAsync();
31+
});
32+
2833
test('Compiler and analyzer diagnostics reported for open file when set to OpenFiles', async () => {
2934
await setBackgroundAnalysisScopes({
3035
compiler: AnalysisSetting.OpenFiles,

test/integrationTests/documentSymbolProvider.integration.test.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { expect, test, beforeAll, afterAll, describe } from '@jest/globals';
6+
import { expect, test, beforeAll, afterAll, describe, afterEach, beforeEach } from '@jest/globals';
77
import * as vscode from 'vscode';
88
import * as path from 'path';
99
import testAssetWorkspace from './testAssets/testAssetWorkspace';
10-
import { activateCSharpExtension, openFileInWorkspaceAsync } from './integrationHelpers';
10+
import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers';
1111

12-
describe(`DocumentSymbolProvider: ${testAssetWorkspace.description}`, function () {
12+
describe(`DocumentSymbolProvider: ${testAssetWorkspace.description}`, () => {
1313
let fileUri: vscode.Uri;
1414

15-
beforeAll(async function () {
15+
beforeAll(async () => {
1616
await activateCSharpExtension();
17+
});
18+
19+
beforeEach(async () => {
1720
const relativePath = path.join('src', 'app', 'documentSymbols.cs');
1821
fileUri = await openFileInWorkspaceAsync(relativePath);
1922
});
@@ -22,7 +25,11 @@ describe(`DocumentSymbolProvider: ${testAssetWorkspace.description}`, function (
2225
await testAssetWorkspace.cleanupWorkspace();
2326
});
2427

25-
test('Returns all elements', async function () {
28+
afterEach(async () => {
29+
await closeAllEditorsAsync();
30+
});
31+
32+
test('Returns all elements', async () => {
2633
const symbols = await GetDocumentSymbols(fileUri);
2734

2835
expect(symbols).toHaveLength(5);

test/integrationTests/gotoDefinition.integration.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,26 @@
66
import * as vscode from 'vscode';
77
import * as path from 'path';
88
import testAssetWorkspace from './testAssets/testAssetWorkspace';
9-
import { activateCSharpExtension, openFileInWorkspaceAsync } from './integrationHelpers';
10-
import { describe, beforeAll, beforeEach, afterAll, test, expect } from '@jest/globals';
9+
import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers';
10+
import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals';
1111

12-
describe(`[${testAssetWorkspace.description}] Test Go To Definition`, function () {
13-
beforeAll(async function () {
12+
describe(`[${testAssetWorkspace.description}] Test Go To Definition`, () => {
13+
beforeAll(async () => {
1414
await activateCSharpExtension();
1515
});
1616

17-
beforeEach(async function () {
17+
beforeEach(async () => {
1818
await openFileInWorkspaceAsync(path.join('src', 'app', 'definition.cs'));
1919
});
2020

2121
afterAll(async () => {
2222
await testAssetWorkspace.cleanupWorkspace();
2323
});
2424

25+
afterEach(async () => {
26+
await closeAllEditorsAsync();
27+
});
28+
2529
test('Navigates to definition in same file', async () => {
2630
const requestPosition = new vscode.Position(10, 31);
2731
const definitionList = <vscode.Location[]>(

0 commit comments

Comments
 (0)