Skip to content

Commit e185471

Browse files
authored
Bump Razor and Roslyn and tweak Razor feature flags (#7927)
2 parents 9212eeb + 1429685 commit e185471

File tree

6 files changed

+34
-20
lines changed

6 files changed

+34
-20
lines changed

CHANGELOG.md

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

66
# 2.63.x
7+
* Update Roslyn to 4.14.0-1.25065.8 (PR: [#7927](https://github.com/dotnet/vscode-csharp/pull/7927))
8+
* Remove explicit recursion in the json detection analyzer (#76764) (PR: [#76764](https://github.com/dotnet/roslyn/pull/76764))
9+
* Consider silly cyclic assignment in scoped variance (#76261) (PR: [#76261](https://github.com/dotnet/roslyn/pull/76261))
10+
* Fix ordering of 'params' vs 'scoped' in metadata as source (#76745) (PR: [#76745](https://github.com/dotnet/roslyn/pull/76745))
11+
* Change partial keyword recommender to better handle partial member syntax (#76744) (PR: [#76744](https://github.com/dotnet/roslyn/pull/76744))
12+
* Ensure unconverted elements are converted when on LHS (#76675) (PR: [#76675](https://github.com/dotnet/roslyn/pull/76675))
13+
* Proffer CssVisualDiagnosticsService brokered service from C# DevKit to C# Extension (#76737) (PR: [#76737](https://github.com/dotnet/roslyn/pull/76737))
14+
* Disable extract class/interface to a new file when unsupported by the workspace. (#76717) (PR: [#76717](https://github.com/dotnet/roslyn/pull/76717))
15+
* Fix issue parsing regex category (#76735) (PR: [#76735](https://github.com/dotnet/roslyn/pull/76735))
16+
* Properly simplify pattern when converting to pattern matching (#76734) (PR: [#76734](https://github.com/dotnet/roslyn/pull/76734))
17+
* Do not lift type parameters in extract method declared within the selected region (#76724) (PR: [#76724](https://github.com/dotnet/roslyn/pull/76724))
18+
* Always use .OriginalDefinition uniformly in the unread-members analyzer (#76698) (PR: [#76698](https://github.com/dotnet/roslyn/pull/76698))
19+
* Adding checks for mutable structs. (#76711) (PR: [#76711](https://github.com/dotnet/roslyn/pull/76711))
20+
* Stash and restore original culture in CultureNormalizer (#76713) (PR: [#76713](https://github.com/dotnet/roslyn/pull/76713))
21+
* Add option for choosing stdio as the LSP communication channel (#76437) (PR: [#76437](https://github.com/dotnet/roslyn/pull/76437))
22+
* Update Razor to 9.0.0-preview.25064.4 (PR: [#7927](https://github.com/dotnet/vscode-csharp/pull/7927))
23+
* Wire up the UseRoslynTokenizer feature properly (#11386) (PR: [#11386](https://github.com/dotnet/razor/pull/11386))
24+
* New Razor document formatting engine (#11364) (PR: [#11364](https://github.com/dotnet/razor/pull/11364))
25+
* Fix a couple of exceptions encountered when formatting documents with preprocessor directives (#11373) (PR: [#11373](https://github.com/dotnet/razor/pull/11373))
26+
* Allow RazorProjectEngine.Process to be cancelled (#11334) (PR: [#11334](https://github.com/dotnet/razor/pull/11334))
27+
* Further refactoring of Razor tooling project system (#11320) (PR: [#11320](https://github.com/dotnet/razor/pull/11320))
728

829
# 2.62.x
930
* Update Roslyn to 4.14.0-1.25060.2 (PR: [#7916](https://github.com/dotnet/vscode-csharp/pull/7916))

package.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
}
3838
},
3939
"defaults": {
40-
"roslyn": "4.14.0-1.25060.2",
40+
"roslyn": "4.14.0-1.25065.8",
4141
"omniSharp": "1.39.12",
42-
"razor": "9.0.0-preview.25052.3",
42+
"razor": "9.0.0-preview.25064.4",
4343
"razorOmnisharp": "7.0.0-preview.23363.1",
4444
"xamlTools": "17.13.35709.178"
4545
},
@@ -1513,17 +1513,15 @@
15131513
"description": "%configuration.razor.languageServer.forceRuntimeCodeGeneration%",
15141514
"order": 90
15151515
},
1516-
"razor.languageServer.useRoslynTokenizer": {
1517-
"type": "boolean",
1518-
"scope": "machine-overridable",
1519-
"default": false,
1520-
"markdownDescription": "%configuration.razor.languageServer.useRoslynTokenizer%",
1521-
"order": 90
1522-
},
15231516
"razor.languageServer.suppressLspErrorToasts": {
15241517
"type": "boolean",
15251518
"default": true,
15261519
"description": "%configuration.razor.languageServer.suppressLspErrorToasts%"
1520+
},
1521+
"razor.languageServer.useNewFormattingEngine": {
1522+
"type": "boolean",
1523+
"default": true,
1524+
"description": "%configuration.razor.languageServer.useNewFormattingEngine%"
15271525
}
15281526
}
15291527
},

package.nls.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,8 @@
128128
"configuration.razor.languageServer.debug": "Specifies whether to wait for debug attach when launching the language server.",
129129
"configuration.razor.server.trace": "Specifies the logging level to use for the Razor server.",
130130
"configuration.razor.languageServer.forceRuntimeCodeGeneration": "(EXPERIMENTAL) Enable combined design time/runtime code generation for Razor files",
131-
"configuration.razor.languageServer.useRoslynTokenizer": {
132-
"message": "(EXPERIMENTAL) Use the C# tokenizer for Razor files in the IDE. Enables some new C# features, like interpolated and raw strings, in Razor files opened in Visual Studio Code. This matches using `<features>use-roslyn-tokenizer</feature>` in a `.csproj` file for command line builds, and may result in inconsistencies if this option and your project files do not match.",
133-
"comment": [
134-
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
135-
]
136-
},
137131
"configuration.razor.languageServer.suppressLspErrorToasts": "Suppresses error toasts from showing up if the server encounters a recoverable error.",
132+
"configuration.razor.languageServer.useNewFormattingEngine": "Use the new Razor formatting engine.",
138133
"debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Launch Executable file (Console)",
139134
"debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Launch Executable file (Web)",
140135
"debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: Attach to a .NET process",

src/razor/src/razorLanguageServerClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ export class RazorLanguageServerClient implements vscode.Disposable {
267267
args.push('true');
268268
}
269269

270-
if (options.useRoslynTokenizer) {
271-
args.push('--UseRoslynTokenizer');
270+
if (options.useNewFormattingEngine) {
271+
args.push('--UseNewFormattingEngine');
272272
args.push('true');
273273
}
274274

src/razor/src/razorLanguageServerOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ export interface RazorLanguageServerOptions {
1111
debug?: boolean;
1212
usingOmniSharp: boolean;
1313
forceRuntimeCodeGeneration: boolean;
14-
useRoslynTokenizer: boolean;
1514
suppressErrorToasts: boolean;
15+
useNewFormattingEngine: boolean;
1616
}

src/razor/src/razorLanguageServerOptionsResolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ export function resolveRazorLanguageServerOptions(
3535
forceRuntimeCodeGeneration = hotReload;
3636
}
3737

38-
const useRoslynTokenizer = serverConfig.get<boolean>('useRoslynTokenizer');
3938
const suppressErrorToasts = serverConfig.get<boolean>('suppressLspErrorToasts');
39+
const useNewFormattingEngine = serverConfig.get<boolean>('useNewFormattingEngine');
4040

4141
return {
4242
serverPath: languageServerExecutablePath,
4343
debug: debugLanguageServer,
4444
outputChannel: logger.outputChannel,
4545
usingOmniSharp,
4646
forceRuntimeCodeGeneration,
47-
useRoslynTokenizer,
4847
suppressErrorToasts,
48+
useNewFormattingEngine,
4949
} as RazorLanguageServerOptions;
5050
}
5151

0 commit comments

Comments
 (0)