-
Notifications
You must be signed in to change notification settings - Fork 673
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
Fix for missing default settings at startup. #8172
base: main
Are you sure you want to change the base?
Conversation
context = _clientContexts.Find(c => c.RootPath == null); | ||
if (context == null) { | ||
return null; | ||
// use first clientcontext as default | ||
context = _clientContexts.First(); |
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.
Is there a FirstOrNull thing? I wasn't sure if this would throw if there's no items in the list.
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.
Oh it's called 'FirstOrDefault'. Maybe you should use 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.
i check count at the top of the function. but ya. that would be safer
guard against no context elements on shutdown. A context is created for the project or for each workspace or for each repl.
5eefffc
to
adb386e
Compare
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
guard against no context elements on shutdown. A context is created for the project or for each workspace or for each repl.
We need to send tasklist info when sending default settings with "workspace/didChangeConfiguration".
alternatively we could pass in the uri into GetSettings() when "TriggerWorkspaceUpdateConfig" is called.
Fix for #8121