-
Notifications
You must be signed in to change notification settings - Fork 3
sdk-core, electron: fix endless loop when loading SessionFiles #347
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
Conversation
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.
If someone already has session files - where do you handle a conversion from the old data model to the new one?
interface FileSession { | ||
readonly file: string; | ||
readonly sessionId: string; | ||
readonly sessionId: SessionId; |
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.
how about backward compatibility?
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.
You're right, this could fail. I added a check for this where required.
There's no conversion, the session ID is not used then, because it is not complete. |
8036415
to
1117d37
Compare
When two session file markers have the same ID, but different timestamp, it results in an endless loop.
This change prevents that by also using the timestamp as session ID.
This requires changes in Electron.