Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aprocter
Copy link
Contributor

@aprocter aprocter commented Mar 29, 2022

(stacked PR, on top of #5545)

This adds a mechanism to share the indexed files between LSPTypechecker and LSPStaleTypechecker, so that we can get hover responses on files other than the one(s) included in the edit that triggered the slow path.

The synchronization here is a bit wonky, but I think it's probably the best we can do for the moment without a pretty significant refactor. I think that refactor would probably look something like: LSPIndexedFileStore is created outside of either LSPTypechecker or LSPStaleTypechecker, and passed to those classes by reference; and LSPIndexedFileStore provides an accessor for a mutex, with suitable annotations on its methods.

Motivation

We want stale-state queries to work on files that weren't part of the edit that triggered the slow path.

Test plan

See included automated tests.

@aprocter aprocter requested a review from a team as a code owner March 29, 2022 17:17
@aprocter aprocter requested review from froydnj and removed request for a team March 29, 2022 17:17
@aprocter aprocter force-pushed the aprocter/implement-stale-typechecker branch from a338c90 to d8aa8f7 Compare March 30, 2022 18:49
@aprocter aprocter force-pushed the aprocter/maybe-better-locking branch from 0a5918b to d4a4564 Compare March 30, 2022 19:12
@aprocter aprocter force-pushed the aprocter/implement-stale-typechecker branch from 1fee8c8 to 15fd3ff Compare April 1, 2022 00:32
@aprocter aprocter force-pushed the aprocter/maybe-better-locking branch 2 times, most recently from 3a250d8 to 524c000 Compare April 1, 2022 01:29
@aprocter aprocter force-pushed the aprocter/implement-stale-typechecker branch from af3f14a to 2d90865 Compare April 1, 2022 16:52
@aprocter aprocter force-pushed the aprocter/maybe-better-locking branch from 524c000 to 3464d0e Compare April 1, 2022 16:55
@aprocter aprocter changed the base branch from aprocter/implement-stale-typechecker to aprocter/stale-state-lsp-test-runner April 1, 2022 16:56
@aprocter aprocter force-pushed the aprocter/stale-state-lsp-test-runner branch from 944b58a to 321a7d4 Compare April 1, 2022 19:08
Base automatically changed from aprocter/stale-state-lsp-test-runner to master April 1, 2022 19:28
@aprocter aprocter force-pushed the aprocter/maybe-better-locking branch from 3464d0e to 1f0c2ff Compare April 1, 2022 19:30
@jez
Copy link
Collaborator

jez commented Nov 5, 2022

Closing as we have decided against pursing the stale typechecker approach.

@jez jez closed this Nov 5, 2022
@jez jez deleted the aprocter/maybe-better-locking branch November 5, 2022 01:43
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.

3 participants