Skip to content

Fix for missing default settings at startup. - #8172

Merged
Bill Schnurr (bschnurr) merged 4 commits into
microsoft:mainfrom
bschnurr:fix-tasklist
Aug 14, 2025
Merged

Fix for missing default settings at startup.#8172
Bill Schnurr (bschnurr) merged 4 commits into
microsoft:mainfrom
bschnurr:fix-tasklist

Conversation

@bschnurr

@bschnurr Bill Schnurr (bschnurr) commented Feb 14, 2025

Copy link
Copy Markdown
Member

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
Bill Schnurr (bschnurr) requested a review from a team as a code owner February 14, 2025 21:25
if (context == null) {
return null;
// use first clientcontext as default
context = _clientContexts.First();

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@sonarqubecloud

Copy link
Copy Markdown

@bschnurr

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@sonarqubecloud

Copy link
Copy Markdown

@bschnurr

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@bschnurr

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
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.
@bschnurr

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@bschnurr
Bill Schnurr (bschnurr) merged commit 6e44e4e into microsoft:main Aug 14, 2025
6 checks passed
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.

4 participants