Support view components in Go To Def#12222
Conversation
There was a problem hiding this comment.
I deliberately decided not to serialize and deserialize that metadata, because it's only used by this feature which only works in cohosting. If anyone disagrees with that, please let me know. If the future is cohosting then I believe that all goes away anyway.
I disagree completely with this notion. This assumption will almost certainly result in significant bugs if the plan to include serialized tag helpers in the .NET SDK is ever realized. The current serialization work done around tag helpers is intended to support that effort later, and deliberately leaving holes in serialization now will result in a lot of headaches later.
That is definitely something I had not considered/forgotten about. I was thinking of that as an optimization around serializing the same things on every project load, to communicate back to the Razor server. If that is still on the cards, then it definitely breaks my assumption. |
|
Added the serialization. I'm doing a test insertion out of curiosity, but now that cohosting is on by default there aren't many tests that will be affected :) Val build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2795340 |
Fixes #12215
Got nerd sniped since this should have been fixed by my previous PR, but it wasn't. Turns out the Razor compiler is weird, so I added some more metadata to un-weird it. I deliberately decided not to serialize and deserialize that metadata, because it's only used by this feature which only works in cohosting. If anyone disagrees with that, please let me know. If the future is cohosting then I believe that all goes away anyway.