-
Notifications
You must be signed in to change notification settings - Fork 196
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
Possible verbatim string literal regression #10568
Comments
This will be solved by the lexer changes.
Not really. Interpolated strings of any kind have never been actually supported by the razor parser. I agree that they should be, and the lexer changes will actually support them, but any amount of interpolated strings working has simply been a happy accident, not intentional implementation. |
Oh, I almost forgot to mention: a workaround is just switching from |
See: dotnet/razor#10568 for breaking Razor change
I also noticed this bug, but only after updating my VS Version to 17.11.2 (current latest), seemed to work before in 17.10.* |
Accident or not, it was still a behavior relied by applications. This impacts existing applications in the wild as it blocks their migration path to newer .NET versions and might cause unnoticed regressions of varying severity especially when apps use runtime compilation. The workaround isn't obvious either. Solely updating to a newer .NET version ideally should never break a running app. But, in case it does, the breaking changes should also be documented clearly. Was this breaking change known when this patch was approved? What's the course of action to reduce the impact? "We do not break the userspace" --Linus Torvalds. |
This particular flavor of the change was not not known, but we did know the change would cause breaks in general.
As mentioned earlier, switch |
I have found another piece of code that stopped compiling after the 17.11.2 VS update. Maybe this is also be connected to the change in parsing razor code? Documented here https://developercommunity.visualstudio.com/t/Regression-in-VS-17112-in-Razor-parser/10741925 |
Repro code in any
.razor
file:This is legal code as far as I know and used to work without errors or warnings. However in Version 17.11.0 Preview 2.0 this shows an error:
On my machine this appears in the VS Error UI but does not occur during command-line compilation (probably a slightly older SDK).
The text was updated successfully, but these errors were encountered: