-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 test to make sure option names won't change #69319
Conversation
@@ -26,7 +26,6 @@ internal partial class DidChangeConfigurationNotificationHandler | |||
ImplementTypeOptionsStorage.PropertyGenerationBehavior, | |||
// Completion | |||
CompletionOptionsStorage.ShowNameSuggestions, | |||
CompletionOptionsStorage.ShowItemsFromUnimportedNamespaces, |
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.
This is a duplicate (See line 31)
// These options are persist in the LSP client. Please make sure also modify the LSP client code if these strings are changed. | ||
var expectedNames = new[] | ||
{ | ||
"symbol_search.dotnet_search_reference_assemblies", |
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.
Should we have this sorted and use one of our sort-ignoring Assert functions?
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 it's possible
"implement_type.dotnet_insertion_behavior", | ||
"implement_type.dotnet_property_generation_behavior", | ||
"completion.dotnet_show_name_completion_suggestions", | ||
"completion.dotnet_provide_regex_completions", |
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.
Shouldn't this be something like dotnet.completion.provideRegexCompletions? Or am I misunderstanding what this test is trying to do?
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.
So the test here is just to make sure the option name + option group doesn't get changed. (because these strings would be used in the client, if it only gets changed in server client-side storage would be broken)
For completion.dotnet_provide_regex_completions
is created from option group
+ .
+ option name
.
Client would parse the string, and reorder it to dotnet.completion.provideRegexCompletions
Once an option is added to the LSP server, its name and options group should not be modified.
I talked to @333fred during lunchtime and he said it doesn't meet the public API bar so these don't need to go via the API review.
Add a test to guard this