8000 Update LSP state diagrams by elliottt · Pull Request #8844 · sorbet/sorbet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update LSP state diagrams #8844

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

Merged
merged 3 commits into from
May 7, 2025
Merged

Update LSP state diagrams #8844

merged 3 commits into from
May 7, 2025

Conversation

elliottt
Copy link
Collaborator
@elliottt elliottt commented May 7, 2025

Update the LSP docs to reflect the recent changes that add reindexing to the slow path.

Motivation

Keeping the internal docs up to date.

Test plan

Doc only change.

@elliottt elliottt marked this pull request as ready for review May 7, 2025 21:28
@elliottt elliottt requested a review from a team as a code owner May 7, 2025 21:28
@elliottt elliottt requested review from jez and removed request for a team May 7, 2025 21:28
@@ -80,7 +84,7 @@ sequenceDiagram
Note right of LSPIndexer: Copy GlobalState for<br/>the slow path
LSPLoop --) LSPTypechecker: SorbetWorkspaceEditTask::runSpecial
LSPTypechecker ->> LSPTypechecker: LSPTypechecker::runSlowPath
Note right of LSPTypechecker: Save old GlobalState<br/>and run the pipeline
Note right of LSPTypechecker: pipeline::copyForSlowPath<br/>and run the pipeline
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have one note "pipeline::copyForSlowPath" and another node "Copy GlobalState for the slow path"

not sure whether that's intentional (fine if it is) but if they're actually using the same logic and we wanted to make that clear in the note, now would be a time to do that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, the Copy GlobalState... one is no longer relevant.

can be sent back to the indexer thread. This copy is made early on, as the
indexer thread will never run passes that depend on the symbol tables being
populated, and thus it would be a waste of memory to copy the `GlobalState` at
the end of the whole pipeline.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice big red diff here 🎉

@elliottt elliottt enabled auto-merge (squash) May 7, 2025 22:53
@elliottt elliottt merged commit e5af42b into master May 7, 2025
14 checks passed
@elliottt elliottt deleted the trevor/update-lsp-docs branch May 7, 2025 23:03
7091
@elliottt elliottt mentioned this pull request May 17, 2025
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.

2 participants
0