Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use context.storageUri for session file (and refactor) #4088

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

Merged
andyleejordan merged 8 commits into main from andschwa/session-path
Jul 21, 2022

Conversation

Copy link
Member

@andyleejordan andyleejordan commented Jul 20, 2022

This is a decent cleanup of our session file logic in the client, so it needs a close review. Most important note is that I completely removed writeSessionFile...and everything works as expected in my testing. Which I think makes sense, as we pass the session file path to the server and expect it to write the session file. I don't know why we had the client ever writing a session file. Furthermore, the only reference I can find to it in the server is with a writer, no reader. 🤷

Related to #4071.

@andyleejordan andyleejordan added Issue-Enhancement A feature request (enhancement). Area-Engine labels Jul 20, 2022
@andyleejordan andyleejordan marked this pull request as ready for review July 20, 2022 22:25
@andyleejordan andyleejordan requested a review from a team July 20, 2022 22:25
debugServicePipeName: string;
}

export type IReadSessionFileCallback = (details: IEditorServicesSessionDetails) => void;
Copy link
Member Author

@andyleejordan andyleejordan Jul 20, 2022

Choose a reason for hiding this comment

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

I can't find what this was used for...delete it?

Note that we seemed to be unnecessarily writing a new debug session file
for the `RunCode` and `PesterTests` features; they work fine without
that logic as the debugger itself handles the session file.
No idea why we were writing it as the client. Maybe I've totally
misunderstood, but everything works as expected without this (and
moreover, we delete any existing session file and then wait for it,
after passing the path to the server).
Since `cwd` can be `undefined` we need to use optional chaining.
Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM!

I think originally it used to write the session file first and wait for it to be populated... something like that? Can't remember if it was a strange limitation of the time or just accidental over engineering but either way can probably just be dropped 😁

andyleejordan reacted with laugh emoji
@andyleejordan andyleejordan deleted the andschwa/session-path branch July 21, 2022 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@SeeminglyScience SeeminglyScience SeeminglyScience approved these changes

Assignees
No one assigned
Labels
Area-Engine Issue-Enhancement A feature request (enhancement).
Projects
No open projects
Status: Done
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /