Skip to content
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

fix(cli): desktop app now can be re-opened on Linux #3323

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Andrew15-5
Copy link
Contributor

@Andrew15-5 Andrew15-5 commented Dec 10, 2024

Fixes #3322.

I added some tracing logs just in case someone else also needs them, like I did when debugging this issue.

IDK why this is added and so soon in the build cycle, but perhaps this can be replaced by the approach from this PR, but someone needs to check if replacing works.

// Kill any running executables on Windows
if cfg!(windows) {
runner.kill_all();
}

@istudyatuni
Copy link

Another solution is just remove target file and then copy. It also seems simpler to implement

@Andrew15-5
Copy link
Contributor Author

Interesting.

pros:

  • only 2 cumulative operations in the code base, i.e., just need to add 1 operation to an existing one

cons:

  • not an atomic operation, unlike mv (in Unix)

It doesn't require additional space for the 3rd binary. Well actually, since some process is still using the file, this would mean that after rm & cp there will be 2 visual copies and 1 more copy which is used by a process.

So this one is debatable. It will still require 2 operations for the Linux platform. And the code wouldn't become tremendously smaller, so I think we should keep the atomic approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Desktop app can't be automatically re-opened by the dx serve
2 participants