Skip to content

Conversation

rchiodo
Copy link
Contributor

@rchiodo rchiodo commented Sep 26, 2025

This PR adds another request handler for TSP = "typeServer/getSnapshot". The snapshot request is how the client side of a TSP connection indicates which 'state of the world' it's currently querying about. The server side keeps a 'snapshot' to indicate when the state of the world has changed.

Internally I used the 'epoch' and the 'RecheckFinished' event to indicate what the snapshot is and when it's changed.

@meta-cla meta-cla bot added the cla signed label Sep 26, 2025
@connernilsen connernilsen added codenav User Bugs reported by external users that should be prioritised language-server Issues specific to our IDE integration rather than type checking and removed needs-triage labels Sep 30, 2025
@connernilsen
Copy link
Contributor

Hey @rchiodo, thanks for doing this. Kyle's out until Friday, and I don't know as much of what's going on, so I'm going to assign to Kyle for now and let him review when he's back. Let me know if there's anything else you need in the meantime :)

@connernilsen connernilsen requested a review from kinto0 September 30, 2025 20:26
@rchiodo
Copy link
Contributor Author

rchiodo commented Sep 30, 2025

Hey @rchiodo, thanks for doing this. Kyle's out until Friday, and I don't know as much of what's going on, so I'm going to assign to Kyle for now and let him review when he's back. Let me know if there's anything else you need in the meantime :)

Thanks for letting me know :). No rush but I was worried Meta was no longer interested in TSP.

Copy link
Contributor

@kinto0 kinto0 left a comment

Choose a reason for hiding this comment

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

looks great, nice thought on the RecheckFinished event. just a few suggestions, mostly to do with the test

/// Get access to the state for creating transactions
fn state(&self) -> &Arc<State>;

/// Get access to the recheck queue for async task processing
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed this to process so that async events are processed in the tsp server (sometimes RecheckEvent is async). Seemed like DidChangeWatchedFiles notification causes an async event.

@rchiodo rchiodo requested a review from kinto0 October 2, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed codenav language-server Issues specific to our IDE integration rather than type checking User Bugs reported by external users that should be prioritised
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants