-
Notifications
You must be signed in to change notification settings - Fork 229
Correctly stitch @ characters to following identifiers when rewriting tag helpers
#10331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| #line (26,25)-(26,26) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" | ||
| @ | ||
|
|
||
| #line default | ||
| #line hidden | ||
| #nullable disable | ||
| #nullable restore | ||
| #line (26,26)-(26,49) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" | ||
| DateTimeOffset.Now.Year |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we had been validating C# diagnostics, this would have been caught before FUSE was merged. More priority to #10247.
…ng tag helpers Because of how we were rewriting tag helper attribute values, we didn't output a single, unified token when moving an implicit C# transition back to standard C#. This meant that, when we emit `#line` directives, we considered the `@` and the identifier that followed it to be separate tokens; when we added more precise info for FUSE, this then meant that they were emitted on separate lines during runtime codegen and everything fell apart. To fix this, we now unify those implicit transition tokens, rather than trying to keep them as separate tokens. Fixes #10186, for real this time.
69ae12c to
6517c6d
Compare
|
@dotnet/razor-compiler for reviews please |
DustinCampbell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
|
@dotnet/razor-compiler for a second review |
* upstream/main: (374 commits) Don't use CancellationTokenSource for disposal Support Linked Editing Ranges in Cohosting. (#10349) Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2445915 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2445915 Update 17.11 config after VS snap Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240502.1 Add test Don't think we need this any more Remove Base64 helpers now that they aren't used Whitespace is not significant, but it is important Add ProjectKey APIs for representing unknown projects Fix up serialization tests RazorProjectInfo.SerializationFilePath -> ProjectKey Clean up places were an invalid ProjectKey is used Move ProjectKey to MS.ANC.Razor.ProjectEngineHost Remove ProjectKey static construction methods Protect against exceptions when deleting files Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2443298 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2443298 Correctly stitch `@` characters to following identifiers when rewriting tag helpers (#10331) ...
…ng tag helpers (dotnet#10331) Because of how we were rewriting tag helper attribute values, we didn't output a single, unified token when moving an implicit C# transition back to standard C#. This meant that, when we emit `#line` directives, we considered the `@` and the identifier that followed it to be separate tokens; when we added more precise info for FUSE, this then meant that they were emitted on separate lines during runtime codegen and everything fell apart. To fix this, we now unify those implicit transition tokens, rather than trying to keep them as separate tokens. Fixes dotnet#10186, for real this time. (cherry picked from commit 26ce354)
* Correctly stitch `@` characters to following identifiers when rewriting tag helpers (#10331) Because of how we were rewriting tag helper attribute values, we didn't output a single, unified token when moving an implicit C# transition back to standard C#. This meant that, when we emit `#line` directives, we considered the `@` and the identifier that followed it to be separate tokens; when we added more precise info for FUSE, this then meant that they were emitted on separate lines during runtime codegen and everything fell apart. To fix this, we now unify those implicit transition tokens, rather than trying to keep them as separate tokens. Fixes #10186, for real this time. (cherry picked from commit 26ce354) * Update baseline for 17.10 code.
Because of how we were rewriting tag helper attribute values, we didn't output a single, unified token when moving an implicit C# transition back to standard C#. This meant that, when we emit
#linedirectives, we considered the@and the identifier that followed it to be separate tokens; when we added more precise info for FUSE, this then meant that they were emitted on separate lines during runtime codegen and everything fell apart. To fix this, we now unify those implicit transition tokens, rather than trying to keep them as separate tokens. Fixes #10186, for real this time.