-
Notifications
You must be signed in to change notification settings - Fork 209
Use a workspace to port map instead of single value file #3502
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
Use a workspace to port map instead of single value file #3502
Conversation
How to use the Graphite Merge QueueAdd the label graphite-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of writing to tmp folders, does it make sense to write it to each workspace's .ruby-lsp
folder instead?
Co-authored-by: Alex Rocha <[email protected]>
34b7772
to
dddd045
Compare
All workspaces under the current VS Code instance report to the same port, so it made more sense to me to not tie it to any specific workspace. Otherwise, we'd need to write the port file to all workspaces even if you're not using the test explorer there. |
Motivation
There's currently a bug that if you open a second VS Code window, it will override our port file with a new value, disconnecting the first window from being able to report test statuses.
We can solve this problem by using a JSON file instead of a single value file and then writing to it a map of
workspaceFilePath => port
.That way, the only time there's a disconnect is if you open the same exact workspace in two different editor windows, which I believe is fine. Trying to use
vscode.env.sessionId
would be difficult because the LSP reporter instance doesn't have a way to know what session owns the execution - especially when running manually through the terminal.Implementation
Started writing a map of
workspaceFilePath => port
and, in the reporter side, started reading it. We kept the reading of the old file just to avoid breaking changes while this rolls out.