Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bschnurr
Copy link
Member

@bschnurr bschnurr commented Feb 14, 2025

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

@bschnurr bschnurr requested a review from a team as a code owner February 14, 2025 21:25
context = _clientContexts.Find(c => c.RootPath == null);
if (context == null) {
return null;
// use first clientcontext as default
context = _clientContexts.First();
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Member Author

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

debonte
debonte previously approved these changes Feb 14, 2025
rchiodo
rchiodo previously approved these changes Feb 14, 2025
guard against no context elements on shutdown.  A context is created for the project or for each workspace or for each repl.
@bschnurr
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bschnurr bschnurr dismissed stale reviews from rchiodo and debonte via adb386e March 31, 2025 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants