Skip to content

Commit 4491904

Browse files
arunchndrdibarbetJoeRobichleslierichardson95mavasani
authored
Snap main for C# prerelease 07/17 (#5927)
* Increase release CI timeout * Add CI for release branch * Add eslint and fix warnings * Implement report issue command for prerelease extension * Update O# Roslyn and prepare for release * Switch to non-deprecated action for asset upload * Upload all VSIX in one step * Update .github/workflows/release-ci.yml Co-authored-by: Joey Robichaud <[email protected]> * Update release-ci.yml * review feedback * use vscode-uri * Add write permissions to job * Fix options schema * Explicitly throw if runtimeId is missing * Use real looking runtimeId in fake * Use issue reporter command * Add server path as an option to allow Razor to re-use the runtime resolver * Fix brace * More lint * Update README.md to notify user about .NET Runtime Tool * Enable full solution background analysis - Adds 2 new background analysis scope options: one for compiler diagnostics and one for analyzer diagnostics - Both the options allow the same set of values as in VS: Open documents, Entire solution, Current document and None (disabled). Currently, `Current document` option is not yet supported in LSP as we do not have a way to know which is the current active document in LSP server. - Builds on top of dotnet/roslyn#68799 - Needs couple more Roslyn side changes as a follow-up: dotnet/roslyn#68797 and dotnet/roslyn#68798 * Remove the un-supported `Current Document` option * File renames * Remove TSLint and configure eslint * Enable remaining rules from tslint and remove * Run prettier automatic fixer * address a couple remaining eslint errors * Remove incorrectly cased folders * Remove duplicate license header * Fix options schema after package.json changes * Fix chai test assertion library usages * Avoid using 'solution crawler' terminology in the VSCode option name * Address feedback and fix test * Revert unintentional changes from merge * Some more reverts * Address feedback and also fix linting issues * Revert "Merged PR 475885: Add support for F5 for csproj and sln" (#5875) This reverts commit 173be18. * Update README.md to make runtime extension note numbered * Bump Razor to 7.0.0-preview.23328.2 * Allow updatePackageDependencies to work with Razor (well, with prerelease packages) * Add task for updating Razor deps * Move to newer version of Roslyn LSP server * Remove unsupported feature * Update regexes * small edits to readme * deleted extra space in readme * Try a less recent Razor version * Update roslyn * Remove pwa- prefix from BlazorDebug (#5908) This PR removes pwa- from msedge and chrome as this was an older debug type that is now depricated. See microsoft/vscode-js-debug#1305 * Add determineBrowserType to CSharpExtensionExports (#5911) This PR exports the BlazorDebugConfigurationProvider.determineBrowserType method that it could be used in vscode-dotnettools to help determine the browser the user wants to use. * Bump semver from 5.6.0 to 5.7.2 Bumps [semver](https://github.com/npm/node-semver) from 5.6.0 to 5.7.2. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md) - [Commits](npm/node-semver@v5.6.0...v5.7.2) --- updated-dependencies: - dependency-name: semver dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Update debugger packages to 2.0.2 (#5914) Co-authored-by: Isadora Rodopoulos <[email protected]> * Fix static variables used in determineBrowserType (#5919) This PR fixes the 'this' to be 'BlazorDebugConfigurationProvider' for the new static variables from #5911 * Add call to setupTelemetryEnvironmentAsync (#5922) * Add call to setupTelemetryEnvironmentAsync * Make optional * Update Roslyn server (#5925) * Update Roslyn server * Update package.json --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: David Barbet <[email protected]> Co-authored-by: David Barbet <[email protected]> Co-authored-by: Joey Robichaud <[email protected]> Co-authored-by: Joey Robichaud <[email protected]> Co-authored-by: leslierichardson95 <[email protected]> Co-authored-by: Manish Vasani <[email protected]> Co-authored-by: Andrew Wang <[email protected]> Co-authored-by: David Wengier <[email protected]> Co-authored-by: Andrew Hall (METAL) <[email protected]> Co-authored-by: Mika Dumont <[email protected]> Co-authored-by: Mika Dumont <[email protected]> Co-authored-by: David Wengier <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Isadora <[email protected]> Co-authored-by: Isadora Rodopoulos <[email protected]>
1 parent 55ec0fb commit 4491904

File tree

7 files changed

+65
-39
lines changed

7 files changed

+65
-39
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
}
3737
},
3838
"defaults": {
39-
"roslyn": "4.8.0-1.23357.10",
39+
"roslyn": "4.8.0-1.23367.7",
4040
"omniSharp": "1.39.7",
4141
"razor": "7.0.0-preview.23301.2"
4242
},
@@ -85,7 +85,7 @@
8585
"ps-list": "7.2.0",
8686
"request-light": "0.4.0",
8787
"rxjs": "6.6.7",
88-
"semver": "5.6.0",
88+
"semver": "5.7.2",
8989
"stream": "0.0.2",
9090
"strip-bom": "5.0.0",
9191
"strip-bom-buf": "2.0.0",
@@ -433,7 +433,7 @@
433433
{
434434
"id": "Debugger",
435435
"description": ".NET Core Debugger (Windows / x64)",
436-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-1/coreclr-debug-win7-x64.zip",
436+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-2/coreclr-debug-win7-x64.zip",
437437
"installPath": ".debugger/x86_64",
438438
"platforms": [
439439
"win32"
@@ -443,12 +443,12 @@
443443
"arm64"
444444
],
445445
"installTestPath": "./.debugger/x86_64/vsdbg-ui.exe",
446-
"integrity": "F8EE956167EE6BCDB39EDB9E377F5C5EB06A50C56F85C9F77F7E8CEFAC2FA6E5"
446+
"integrity": "5DB21D3C7C34E8E4A7029AF48FF9A20E6FBECB689626D559C0FA3C8C92CABAC1"
447447
},
448448
{
449449
"id": "Debugger",
450450
"description": ".NET Core Debugger (Windows / ARM64)",
451-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-1/coreclr-debug-win10-arm64.zip",
451+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-2/coreclr-debug-win10-arm64.zip",
452452
"installPath": ".debugger/arm64",
453453
"platforms": [
454454
"win32"
@@ -457,12 +457,12 @@
457457
"arm64"
458458
],
459459
"installTestPath": "./.debugger/arm64/vsdbg-ui.exe",
460-
"integrity": "053CD0366ACD224C7232E983FF3DB0E162C02148D0EDED60E247C1D50D8C2BC8"
460+
"integrity": "A3CFF7D47EF5EEDE664E3011EC3B66221E0F7C24CE11D882EAA03B797B014605"
461461
},
462462
{
463463
"id": "Debugger",
464464
"description": ".NET Core Debugger (macOS / x64)",
465-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-1/coreclr-debug-osx-x64.zip",
465+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-2/coreclr-debug-osx-x64.zip",
466466
"installPath": ".debugger/x86_64",
467467
"platforms": [
468468
"darwin"
@@ -476,12 +476,12 @@
476476
"./vsdbg"
477477
],
478478
"installTestPath": "./.debugger/x86_64/vsdbg-ui",
479-
"integrity": "31FD387AE90A558057F7BF7A2D0E93C1080B0A11D170F5FB7D75928A98B49617"
479+
"integrity": "EC2FFB22EC3449F9318CF38049AB394B0E759F8431AB93992A18EF8FF1601D0D"
480480
},
481481
{
482482
"id": "Debugger",
483483
"description": ".NET Core Debugger (macOS / arm64)",
484-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-1/coreclr-debug-osx-arm64.zip",
484+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-2/coreclr-debug-osx-arm64.zip",
485485
"installPath": ".debugger/arm64",
486486
"platforms": [
487487
"darwin"
@@ -494,12 +494,12 @@
494494
"./vsdbg"
495495
],
496496
"installTestPath": "./.debugger/arm64/vsdbg-ui",
497-
"integrity": "85D18DA22979AA5A1DB0B71C3C104F1E3DB1A67E8D69F3AF634543667853CB74"
497+
"integrity": "2EB2AE4DDED16D725B5CF2536885E7D7E923CB42E8FB41AA166F78461B7E8AAE"
498498
},
499499
{
500500
"id": "Debugger",
501501
"description": ".NET Core Debugger (linux / ARM)",
502-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-1/coreclr-debug-linux-arm.zip",
502+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-2/coreclr-debug-linux-arm.zip",
503503
"installPath": ".debugger",
504504
"platforms": [
505505
"linux"
@@ -512,12 +512,12 @@
512512
"./vsdbg"
513513
],
514514
"installTestPath": "./.debugger/vsdbg-ui",
515-
"integrity": "1678AD79ABCEB767FCC9CD5B9CEA82A0A25EC7CC49E91CE45275D2556B3AB410"
515+
"integrity": "9EDC86E00498E06EB82BC7C9B586F7213B22A9A4AE30C3F5A52D773CE7E8FDDA"
516516
},
517517
{
518518
"id": "Debugger",
519519
"description": ".NET Core Debugger (linux / ARM64)",
520-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-1/coreclr-debug-linux-arm64.zip",
520+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-2/coreclr-debug-linux-arm64.zip",
521521
"installPath": ".debugger",
522522
"platforms": [
523523
"linux"
@@ -530,12 +530,12 @@
530530
"./vsdbg"
531531
],
532532
"installTestPath": "./.debugger/vsdbg-ui",
533-
"integrity": "2685C26EEBC577985A843F97FD1EE8BC284C58F47B41D2AA2672860D059EDA5A"
533+
"integrity": "F62995DA4AEDCE091AA1AE119BB948F6898EDAFA2EA9F99C9F1B0DD747E8B0C3"
534534
},
535535
{
536536
"id": "Debugger",
537537
"description": ".NET Core Debugger (linux musl / x64)",
538-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-1/coreclr-debug-linux-musl-x64.zip",
538+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-2/coreclr-debug-linux-musl-x64.zip",
539539
"installPath": ".debugger",
540540
"platforms": [
541541
"linux-musl"
@@ -548,12 +548,12 @@
548548
"./vsdbg"
549549
],
550550
"installTestPath": "./.debugger/vsdbg-ui",
551-
"integrity": "F11261E1ADEFEB31BDFCD677E510597C94CBCD45A76139DF37AA24D3B4221D1D"
551+
"integrity": "FD711DC673870AF23B33C6C1AB933F5B7A9D943E1D58B6082B051172352141EE"
552552
},
553553
{
554554
"id": "Debugger",
555555
"description": ".NET Core Debugger (linux musl / ARM64)",
556-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-1/coreclr-debug-linux-musl-arm64.zip",
556+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-2/coreclr-debug-linux-musl-arm64.zip",
557557
"installPath": ".debugger",
558558
"platforms": [
559559
"linux-musl"
@@ -566,12 +566,12 @@
566566
"./vsdbg"
567567
],
568568
"installTestPath": "./.debugger/vsdbg-ui",
569-
"integrity": "25BB43CF3989A239288F6988A35C7EB96C9EC9729ECD886B0D630FB9D42CFAAF"
569+
"integrity": "DA5A39BA645BF15374AE1BD87ADA5532C79578BC82451A99E2D67D5CD65008EE"
570570
},
571571
{
572572
"id": "Debugger",
573573
"description": ".NET Core Debugger (linux / x64)",
574-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-1/coreclr-debug-linux-x64.zip",
574+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-0-2/coreclr-debug-linux-x64.zip",
575575
"installPath": ".debugger",
576576
"platforms": [
577577
"linux"
@@ -584,7 +584,7 @@
584584
"./vsdbg"
585585
],
586586
"installTestPath": "./.debugger/vsdbg-ui",
587-
"integrity": "26233E972BDDC41D22456DE1639E0B7028902D28CA83926A83432FFE8C6E654C"
587+
"integrity": "CBFBDFF84D6EFECAA4096980DF37BAE3AFA09DAEDA000AB2212F588F28A89B47"
588588
},
589589
{
590590
"id": "Razor",

src/csharpDevKitExports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ export interface CSharpDevKitExports {
1313
components: Readonly<{ [key: string]: string }>;
1414
hasServerProcessLoaded: () => boolean;
1515
serverProcessLoaded: vscode.Event<void>;
16-
writeCommonPropsAsync: (context: vscode.ExtensionContext) => Promise<string | undefined>;
16+
setupTelemetryEnvironmentAsync: (env: NodeJS.ProcessEnv) => Promise<string | undefined>;
1717
}

src/csharpExtensionExports.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ export interface CSharpExtensionExports {
2020
initializationFinished: () => Promise<void>;
2121
logDirectory: string;
2222
profferBrokeredServices: (container: GlobalBrokeredServiceContainer) => void;
23+
determineBrowserType: () => Promise<string | undefined>;
2324
}

src/lsptoolshost/roslynLanguageServer.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ export class RoslynLanguageServer {
409409

410410
const csharpDevkitArgs = await this.getCSharpDevkitExportArgs(csharpDevkitExtension, options);
411411
args = args.concat(csharpDevkitArgs);
412+
413+
await this.setupDevKitEnvironment(env, csharpDevkitExtension);
412414
} else {
413415
// C# Dev Kit is not installed - continue C#-only activation.
414416
_channel.appendLine('Activating C# standalone...');
@@ -528,6 +530,21 @@ export class RoslynLanguageServer {
528530
return csharpIntelliCodeArgs;
529531
}
530532

533+
private async setupDevKitEnvironment(
534+
env: NodeJS.ProcessEnv,
535+
csharpDevkitExtension: vscode.Extension<CSharpDevKitExports>
536+
): Promise<void> {
537+
const exports: CSharpDevKitExports = await csharpDevkitExtension.activate();
538+
539+
// setupTelemetryEnvironmentAsync was a later addition to devkit (not in preview 1)
540+
// so it may not exist in whatever version of devkit the user has installed
541+
if (!exports.setupTelemetryEnvironmentAsync) {
542+
return;
543+
}
544+
545+
await exports.setupTelemetryEnvironmentAsync(env);
546+
}
547+
531548
private getLanguageServicesDevKitComponentPath(csharpDevKitExports: CSharpDevKitExports): string {
532549
return path.join(
533550
csharpDevKitExports.components['@microsoft/visualstudio-languageservices-devkit'],

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import Descriptors from './lsptoolshost/services/descriptors';
5151
import { GlobalBrokeredServiceContainer } from '@microsoft/servicehub-framework';
5252
import { CSharpExtensionExports, OmnisharpExtensionExports } from './csharpExtensionExports';
5353
import { csharpDevkitExtensionId, getCSharpDevKit } from './utils/getCSharpDevKit';
54+
import { BlazorDebugConfigurationProvider } from './razor/src/blazorDebug/blazorDebugConfigurationProvider';
5455

5556
export async function activate(
5657
context: vscode.ExtensionContext
@@ -288,6 +289,7 @@ export async function activate(
288289
},
289290
profferBrokeredServices: (container) => profferBrokeredServices(context, container),
290291
logDirectory: context.logUri.fsPath,
292+
determineBrowserType: BlazorDebugConfigurationProvider.determineBrowserType,
291293
};
292294
} else {
293295
return {

src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import showInformationMessage from '../../../shared/observers/utils/showInformat
1515
import showErrorMessage from '../../../observers/utils/showErrorMessage';
1616

1717
export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurationProvider {
18-
private readonly autoDetectUserNotice = `Run and Debug: auto-detection found {0} for a launch browser`;
19-
private readonly edgeBrowserType = 'pwa-msedge';
20-
private readonly chromeBrowserType = 'pwa-chrome';
18+
private static readonly autoDetectUserNotice: string = `Run and Debug: auto-detection found {0} for a launch browser`;
19+
private static readonly edgeBrowserType: string = 'msedge';
20+
private static readonly chromeBrowserType: string = 'chrome';
2121

2222
constructor(private readonly logger: RazorLogger, private readonly vscodeType: typeof vscode) {}
2323

@@ -125,10 +125,10 @@ export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurati
125125
const configBrowser = configuration.browser;
126126
const browserType =
127127
configBrowser === 'edge'
128-
? this.edgeBrowserType
128+
? BlazorDebugConfigurationProvider.edgeBrowserType
129129
: configBrowser === 'chrome'
130-
? this.chromeBrowserType
131-
: await this.determineBrowserType();
130+
? BlazorDebugConfigurationProvider.chromeBrowserType
131+
: await BlazorDebugConfigurationProvider.determineBrowserType();
132132
if (!browserType) {
133133
return;
134134
}
@@ -172,21 +172,27 @@ export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurati
172172
}
173173
}
174174

175-
private async determineBrowserType() {
175+
public static async determineBrowserType(): Promise<string | undefined> {
176176
// There was no browser specified by the user, so we will do some auto-detection to find a browser,
177177
// favoring chrome if multiple valid options are installed.
178178
const chromeBrowserFinder = new ChromeBrowserFinder(process.env, promises, null);
179179
const chromeInstallations = await chromeBrowserFinder.findAll();
180180
if (chromeInstallations.length > 0) {
181-
showInformationMessage(vscode, this.autoDetectUserNotice.replace('{0}', `'Chrome'`));
182-
return this.chromeBrowserType;
181+
showInformationMessage(
182+
vscode,
183+
BlazorDebugConfigurationProvider.autoDetectUserNotice.replace('{0}', `'Chrome'`)
184+
);
185+
return BlazorDebugConfigurationProvider.chromeBrowserType;
183186
}
184187

185188
const edgeBrowserFinder = new EdgeBrowserFinder(process.env, promises, null);
186189
const edgeInstallations = await edgeBrowserFinder.findAll();
187190
if (edgeInstallations.length > 0) {
188-
showInformationMessage(vscode, this.autoDetectUserNotice.replace('{0}', `'Edge'`));
189-
return this.edgeBrowserType;
191+
showInformationMessage(
192+
vscode,
193+
BlazorDebugConfigurationProvider.autoDetectUserNotice.replace('{0}', `'Edge'`)
194+
);
195+
return BlazorDebugConfigurationProvider.edgeBrowserType;
190196
}
191197

192198
showErrorMessage(vscode, 'Run and Debug: A valid browser is not installed');

0 commit comments

Comments
 (0)