Tags: dotnet/razor
Tags
Clean up RewrittenSyntaxTree naming and null handling in DefaultTagHe… …lperResolutionPhase (#13003) * Clean up RewrittenSyntaxTree naming and null handling in resolution phase - Remove syntax tree access from DefaultTagHelperResolutionPhase.ExecuteCore; use codeDocument.ParserOptions directly instead of syntaxTree?.Options - Fix null handling: parserOptions was potentially null when no syntax tree was present; codeDocument.ParserOptions is always non-null - Remove unused ParserOptions field from ResolutionContext struct - Add clarifying comment explaining why options are read from the document * Rename GetPreTagHelperSyntaxTree→GetSyntaxTree and GetSyntaxTree→GetTagHelperRewrittenSyntaxTree - Rename RazorCodeDocument fields and all related methods: - _preTagHelperSyntaxTree → _syntaxTree (canonical, pre-rewrite tree) - _syntaxTree → _tagHelperRewrittenSyntaxTree (rewritten tree) - Update all phase code: - DefaultRazorParsingPhase: WithSyntaxTree → WithTagHelperRewrittenSyntaxTree - DefaultRazorSyntaxTreePhase: same rename - DefaultRazorTagHelperContextDiscoveryPhase: update fallback + early return - DefaultRazorIntermediateNodeLoweringPhase: remove fallback (uses GetSyntaxTree()) - DefaultRazorTagHelperRewritePhase: TryGetSyntaxTree + WithTagHelperRewrittenSyntaxTree - SourceGeneratorProjectEngine: WithSyntaxTree(GetRequiredTagHelperRewrittenSyntaxTree()) - Update all workspaces production code to GetTagHelperRewrittenSyntaxTree - Update all test files to use correct methods * Fix tests to use GetSyntaxTree()/WithSyntaxTree() and eliminate fallback in discovery phase - DefaultRazorParsingPhase: sets _syntaxTree (canonical) directly, not _tagHelperRewrittenSyntaxTree - DefaultRazorSyntaxTreePhase: reads/writes _syntaxTree (canonical) - DefaultRazorTagHelperContextDiscoveryPhase: reads _syntaxTree directly (no fallback needed since parsing always sets it); also removes redundant WithSyntaxTree(syntaxTree) write and simplifies early return - SourceGeneratorProjectEngine: remove redundant WithSyntaxTree() pre-discovery call (parsing now sets it) - NamespaceComputer: TryGetTagHelperRewrittenSyntaxTree → TryGetSyntaxTree - Compiler-layer tests: all non-rewrite tests switch to GetSyntaxTree()/WithSyntaxTree() - Execute_CombinesErrorsOnRewritingErrors: keeps GetTagHelperRewrittenSyntaxTree() (tests rewrite output) - IntegrationTestBase/RazorBaselineIntegrationTestBase: use GetTagHelperRewrittenSyntaxTree() ?? GetRequiredSyntaxTree() fallback for AssertSourceMappingsMatchBaseline/AssertLinePragmas - RazorCodeDocumentExtensionsTest: WithSyntaxTree (matches NamespaceComputer using TryGetSyntaxTree)
Localized file check-in by OneLocBuild Task: Build definition ID 262:… … Build ID 2943270 (#13009)
Localized file check-in by OneLocBuild Task: Build definition ID 262:… … Build ID 2943270 (#13009)
Remove the UseCache property and old benchmark (#12962) I _SWEAR_ I pushed a commit that did this before I merged my other PR, but either GitHub was having issues, or I was in a fugue state
Remove the UseCache property and old benchmark (#12962) I _SWEAR_ I pushed a commit that did this before I merged my other PR, but either GitHub was having issues, or I was in a fugue state
Remove the old language server (#12871) Fixes #12491 There is still a few things we can clean up after this, but this makes the Find All Refs results make a lot more sense. I suspect commit-at-a-time makes the most sense for this one, but who knows whether GitHub will do a good job of showing diffs. Val build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2919555&view=results Test insertion: https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/715049
Remove LegacyEditor projects (#12869) Step 1 of many. Test insertion is green(ish): https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/714698
Remove LegacyEditor projects (#12869) Step 1 of many. Test insertion is green(ish): https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/714698
PreviousNext