question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Revisit introduction of `mainLockfile`

See original GitHub issue

It looks like recently a mainLockfile was added to signal whether a user data dir is in use or not (https://github.com/microsoft/vscode/commit/126218be8798646ca3b36dd13d4702a380d98b3f). I see numerous issues with that:

  • writing a file on startup slows down startup, especially if the process has to wait for that to happen. We typically only tolerate this when there is very strong need for it and try to avoid this at all costs (cc @jrieken). It seems here we only add the log file for the debug case for debugging VSCode, but every user now will pay the price of slower startup even when not debugging VSCode.
  • dealing with files as a means to lock a folder is complicated. you cannot assume that lifecycleMainService.onWillShutdown is ever called, the application might crash leaving a stale lock file around (cc @alexdima who just implemented a locking solution that avoids these kind of issues for the extension host state process via https://github.com/microsoft/vscode/commit/b1b44a3910c7df865eea155c3c367c2ec085b2bd)

I don’t really understand why the existing IPC socket cannot be used to figure out if an instance is running? The IPC handle is statically computed based on some properties that can all be determined by reading package.json and or product.json:

https://github.com/microsoft/vscode/blob/126218be8798646ca3b36dd13d4702a380d98b3f/src/vs/platform/environment/electron-main/environmentMainService.ts#L54-L54

I hope we can find a different solution for this.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
connor4312commented, Sep 29, 2021

Ok, I’ll keep this open to track that, then.

0reactions
bpaserocommented, Sep 29, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing Introductions & Conclusions - TIP Sheet - Butte College
To create that satisfying sense of finality in your conclusion, you must revisit the stuff of your introduction. If you start with a...
Read more >
How to Write a Strong Conclusion Paragraph - Word Counter
Repeating your introduction as your conclusion. Although it's good practice to revisit your thesis statement or main ideas in your conclusion, make sure...
Read more >
Introductions and Conclusions
Then you can revisit it as the paper continues to take shape. Some tips: Be prepared to revise your introduction at any point...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found