Gracefully fail when resolving unsupported symbolkeys in VB#53915
Gracefully fail when resolving unsupported symbolkeys in VB#53915CyrusNajmabadi merged 1 commit intodotnet:mainfrom
Conversation
| return default; | ||
| } | ||
|
|
||
| if (reader.Compilation.Language == LanguageNames.VisualBasic) |
There was a problem hiding this comment.
Didn't we have methods on syntax facts or somewhere that encodes this without hardcoding the language names directly?
There was a problem hiding this comment.
We do not. And this is not in an api that has any ability to interrogate that sort of thing. Effectively, we've shaped the api such that we're producing a string, and we 'resolve' that string againt a compilation and nothing else. We'd need to update the api to take a dependency on more ocmplex types (like HostServices) in order to utilize something like ISyntaxFacts which would be a large chagne i simply do not want to take.
Right now SymbolKey is only defined for C#/VB anyways (As are compilations) so this is both an effective and cheap way to deal with this to get the same result as any more complex option that we might want to take.
No description provided.