-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
discussion: electron main fixup #8056
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
93d158b
Use `window` instead of `globalThis`.
b65d482
Resolved incorrect rebase, updated output URI.
2ec5183
inject the frontend app config from the gen code
657be51
removed redundant app name.
bab72e0
fixed app termination when closing the last window
b865b52
simplified `stop` abstraction.
61d6251
aligned the behavior with master.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why remove cwd???
My approach was to pass everything Electron gives us because here's how the second instance API works:
cd some/place && app .
and it will open/some/place
as a workspace because the app knows what's the cwd when you doapp .
cd somewhere/else && app .
. Here it will trigger the second-instance mechanism and forward the cwd used to invoke the second instance to the already running process. If we don't have the new cwd we cannot resolveapp .
to the correct location.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.
Work in progress; otherwise, I could not start the app without a workspace error on macOS.
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, can you please fix the macOS behavior on your branch, and I'll just rebase this PR from yours and get back the
cwd
support. What you wrote 👆 sounds good to me, a very nice addition, but it does not work on macOS 😕 We must verify the bundled app behavior too.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.
@marechal-p, VS Code handles it differently, right?
So the approach you have implemented does not work on macOS; when I start the app from a terminal in dev mode with
yarn
, or I launch the electron backend launch config from VS Code, without specifying anyfile
my options will fall back to the electron process:"/Users/akos.kitta/Desktop/theia/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron"
and this cannot be opened for sure.Is there a chance to support this new feature once it works in a follow-up PR?
CC: @akosyakov