Skip to content
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

Exclude exited sessions when detecting active console session #2554

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

jmcphers
Copy link
Collaborator

Intent

Addresses #2553.

This is a regression from the multi-session work; the problem is that in some cases, the R language pack can try to send commands to a previous console session instead of the current one.

Approach

The fix is to ignore exited console sessions when attempting to figure out which one we should talk to when sending commands such as Format Document.

I've also added some defensiveness around multiple console sessions; if this ever happens, we warn and return whichever is newest.

QA Notes

Test via notes in #2553.

@jmcphers jmcphers requested a review from jennybc March 28, 2024 00:28
Copy link
Member

@jennybc jennybc left a comment

Choose a reason for hiding this comment

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

LGTM and works for me 👍

extensions/positron-r/src/session-manager.ts Outdated Show resolved Hide resolved
Co-authored-by: Jennifer (Jenny) Bryan <[email protected]>
Signed-off-by: Jonathan <[email protected]>
@jmcphers jmcphers merged commit 800b7c1 into main Mar 28, 2024
1 check passed
@jmcphers jmcphers deleted the bugfix/r-active-console-session branch March 28, 2024 02:44
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