Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: add a lockfile, and set the user data dir while debugging
- Loading branch information
1 parent
9044b2c
commit 126218b
Showing
5 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ test-results/ | |
yarn-error.log | ||
vscode.lsif | ||
vscode.db | ||
/.profile-oss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126218b
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.
/cc @bpasero
We are adding a new lock file to distinguish if an instance of the application is already running, usually we get this for free if we were to use https://github.com/electron/electron/blob/main/docs/api/app.md#apprequestsingleinstancelock but since we maintain our own singleton logic this file is helpful for js-debug use case.
126218b
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.
I think this is not good, filed #128366
126218b
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.
Btw I don't really see how the debug extension would benefit from the
requestSingleInstanceLock
because the extension is not running with Electron API acess.126218b
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.
Not the extension but if the vscode core used
requestSingleInstanceLock
to create singleton instance then the user data dir will containSingletonLock
file which the debugger already checks in case of chrome, the api in electron is derived from chrome implementation so most of the logic is similar like creating a lock file.126218b
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.
Ah ok, didn't know. Well for other reasons, we cannot use that Electron API...