-
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
Add feature flag to turn on the new Roslyn tokenizer #11185
Conversation
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/ProjectState.cs
Show resolved
Hide resolved
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/LanguageServerFeatureOptions.cs
Show resolved
Hide resolved
@@ -60,6 +62,7 @@ public ConfigurableLanguageServerFeatureOptions(string[] args) | |||
TryProcessBoolOption(nameof(UseRazorCohostServer), ref _useRazorCohostServer, option, args, i); | |||
TryProcessBoolOption(nameof(DisableRazorLanguageServer), ref _disableRazorLanguageServer, option, args, i); | |||
TryProcessBoolOption(nameof(ForceRuntimeCodeGeneration), ref _forceRuntimeCodeGeneration, option, args, i); | |||
TryProcessBoolOption(nameof(UseRoslynTokenizer), ref _useRoslynTokenizer, option, args, i); |
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.
What happens if the options result in UseRoslynTokenizer && !ForceRuntimeCodeGeneration
being true? Is that a configuration that we support?
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.
I wasn't aware of any relationship between the two features?
It would definitely be possibly to hit though, as both of those flags are controlled by VS Code user settings.
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.
I thought that we tried to simplify the overall scenarios a bit by saying that users could only use the new tokenizer if FUSE was enabled. This is more a simplification for the entire product experience vs. say just the compiler.
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.
News to me, but makes sense. I guess we need @333fred to confirm, and I'll make the appropriate updates to the logic in the IDE. Or is it automatically handled by the compiler?
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.
I thought that we tried to simplify the overall scenarios a bit by saying that users could only use the new tokenizer if FUSE was enabled.
Sorry, that's news to me too. I don't remember us saying that.
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.
Yeah, the two features should be unrelated, and you can have one on without the other.
This makes the feature work in VS and VS Code (with corresponding VS Code change to pass the right flag, coming once this is merged)
VS Code PR: dotnet/vscode-csharp#7748
/cc @danroth27, @leslierichardson95, @333fred, @chsienki and anyone else who wants, for wording:
VS Code:
https://github.com/dotnet/vscode-csharp/pull/7748/files#diff-9b29d8b47a74097a04da353b72a8632d485d658282457b97b4caf26575a42dd0R131
VS:
https://github.com/dotnet/razor/pull/11185/files#diff-18b9b146f4d27a6a5b6248ece31b30570d84c2a409b25bf5b660de86e608fa4cR80