Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cache calculated file state in LSP #4897

Merged
merged 4 commits into from
Feb 7, 2025

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Feb 5, 2025

Add caching of parsed documents, and testing of the textDocument handlers. This is based on #4896, which splits out some of the boilerplate to calls.

Note, this caches the entire parse state because we'll want to try to emit diagnostics when we see the update, without waiting. It may be helpful to do that asynchronously, but we don't want to wait for another call (such as documentSymbol). Really, we'll probably want to also add check for diagnostics, at least.

@github-actions github-actions bot requested a review from geoffromer February 5, 2025 18:58
@jonmeow jonmeow changed the title Implement caching of calculated file state Implement caching of calculated file state in LSP Feb 6, 2025
@jonmeow jonmeow changed the title Implement caching of calculated file state in LSP Cache calculated file state in LSP Feb 6, 2025
@zygoloid zygoloid added this pull request to the merge queue Feb 7, 2025
Merged via the queue into carbon-language:trunk with commit 9e466b9 Feb 7, 2025
8 checks passed
@jonmeow jonmeow deleted the lsp-caching branch February 7, 2025 15:48
github-merge-queue bot pushed a commit that referenced this pull request Feb 8, 2025
<img width="536" alt="Screenshot 2025-02-06 at 3 02 18 PM"
src="https://github.com/user-attachments/assets/27b7673d-f8d4-4f9f-9e5d-20c3a88b8c78"
/>

Requires the caching work in #4897
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants