Update Github CI to run new extension tests (#4954) - #4954
Open
connernilsen wants to merge 2 commits into
Open
connernilsen wants to merge 2 commits into
connernilsen wants to merge 2 commits into
Conversation
Contributor
|
@connernilsen has exported this pull request. If you are a Meta employee, you can view the originating Diff in D120397203. |
kinto0
requested changes
Sep 16, 2026
kinto0
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Summary: The extension now picks its Pyrefly binary at runtime and restarts the language server when that choice changes. Neither had a test, and review found real bugs in both: a failed restart left the launch specification pointing at the binary that had just failed, so no later change was ever seen as a change. Two suites cover it. `resolveExecutable` drives the selection table through real settings, with stubs only for the output channel and the interpreter lookup, so the fallback reasons that end up in the output channel are asserted directly. `language server recovery` drives a real `LanguageClient` at a binary that cannot start, and checks that the specification is put back and a server is still running afterwards — the second half matters because a client whose start failed cannot be restarted, only replaced, so a running server is the only proof the replacement path works. Both need a real extension host rather than mocks, because the behaviour they depend on belongs to `vscode-languageclient`. Mocking it would assert our assumptions about it instead. `activate` therefore returns a small hook so tests drive restarts directly rather than racing the configuration listener. Running them per pull request is close to free: `pyrefly.yml` already builds a release binary, so the new step copies it into `lsp/bin` and runs the suite on one platform. Until now nothing about the extension ran before merge — not even type checking. Differential Revision: D119697409
Summary: I want to make sure extension tests run when the extension changes. This adds two changes: 1. makes `test_extension` run whenever someone edits anything under `lsp/` 2. adds a few quick tests to `pyrefly.yml`, which runs on each PR Differential Revision: D120397203
connernilsen
force-pushed
the
export-D120397203
branch
from
September 16, 2026 20:47
5fc66d1 to
89aa792
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
I want to make sure extension tests run when the extension changes. This adds two changes:
test_extensionrun whenever someone edits anything underlsp/pyrefly.yml, which runs on each PRDifferential Revision: D120397203