Skip to content

Hold LSP requests until the initial workspace/configuration response - #4353

Open
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-4332
Open

Hold LSP requests until the initial workspace/configuration response#4353
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-4332

Conversation

@jorenham

Copy link
Copy Markdown
Collaborator

Summary

Requests received while awaiting_initial_workspace_config is set are now held and re-enqueued once the response lands. Checking that flag in make_handle_if_enabled instead, as the issue suggests, would return empty responses during startup for everyone, not just those who disabled language services. Releasing is keyed on the request method rather than on a successful parse, so a client that fails the configuration request stops us waiting too.

The middleware no longer waits for the Python extension. It uses a new non-blocking getInterpreterPathIfResolved, and activate re-pulls the configuration once the interpreter resolves, since onDidChangeInterpreter only fires on a later change.

Fixes #4332

Test Plan

Regression tests added, for both a successful and a failed configuration response.

@jorenham jorenham added the language-server Issues specific to our IDE integration rather than type checking label Jul 29, 2026
@meta-cla meta-cla Bot added the cla signed label Jul 29, 2026
@meta-codesync

meta-codesync Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D114050960. (Because this pull request was imported automatically, there will not be any future comments.)

@codspeed-hq

codspeed-hq Bot commented Jul 29, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 16 untouched benchmarks
⏩ 7 skipped benchmarks1


Comparing jorenham:gh-4332 (7809d89) with main (dd4d9f3)

Open in CodSpeed

Footnotes

  1. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@jorenham

This comment was marked as outdated.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed language-server Issues specific to our IDE integration rather than type checking quansight size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

disableLanguageServices is ignored until the initial workspace/configuration response arrives

3 participants