Closed TanayParikh closed 2 years ago
This doesn't give any error in VSCode, but it does give the source generator error:
/Users/tanay/dev/NoteTakingSample2/Microsoft.NET.Sdk.Razor.SourceGenerators/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Pages_Card_razor.g.cs(250,136): error CS0200: Property or indexer 'Card.SomethingWithoutASetter' cannot be assigned to -- it is read only [/Users/tanay/dev/NoteTakingSample2/NoteTakingSample2.csproj]
Is this a known issue @NTaylorMullen or should I create a separate issue for the missing VSCode diagnostic?
Not a known issue that I know of at least. Sounds like SourceGenerator errors aren't being propagated to the IDE in VSCode? Probably an omnisharp-roslyn thing if I had to guess
That's a regular compiler error, no? Does it appear when you do dotnet build
?
Not a known issue that I know of at least. Sounds like SourceGenerator errors aren't being propagated to the IDE in VSCode? Probably an omnisharp-roslyn thing if I had to guess
Error shows up in the error pane (under generated C# file), which explains why the squiggle isn't there for the .razor file. Do we need to remap?
@chsienki this looks like a source generator caching bug. We were able to workaround this by configuring the disable-generator-cache
feature. @TanayParikh was using an RTM labeled installer / SDK, so it's possible that the versions there might by out-of-date.
Do you happen to know if there was any recent changes made here that might have regressed this?
FYI @jaredpar since @chsienki is OOF
We were able to workaround this by configuring the disable-generator-cache feature. @TanayParikh was using an RTM labeled installer / SDK, so it's possible that the versions there might by out-of-date.
This definitively means you're using a pre-RC1 version of the compiler. As a part of fixing the caching bug we ripped that option out of the compiler entirely. It was flipped into an opt-in option. Hence if that is fixing the behavior then you're using a compiler that does not have the fix.
Closing as this is now fixed plus it's (was) a compiler issue
https://user-images.githubusercontent.com/14852843/134277357-c850c2ab-e02f-41f9-8eaa-d7926c670b96.mov
Repro:
Start with:
This doesn't give any error in VSCode, but it does give the source generator error:
However, even after removing the offending
<input>
tag entirely the source generator error persists (perhaps it should've been marked as a rude edit?). Must exitdotnet watch
and restart to resume functionality.