-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat(windows): use std Command #63
Conversation
Use std `Command` instead of `ShellExecuteW` from windows sys crate. This change was already attempted in: Byron#25 and later reverted in: Byron#27 and it it seems that it didn't work due to incorrect usage of `explorer` instead of `cmd /c start`. (see helix-editor/helix#5820 (comment) for detailed explanation). Related: helix-editor/helix#5820
I am currently taking a look at the build failures - I should be able to get the fix here quickly due to access to a Windows VM. |
…ied with rustup.exe This seems like an odd problem to have and nothign to spend time on given the lack of importance of the win32 platform. We would except open-rs to build fine on win32 if it builds for win64.
Thanks a lot for your help! I am looking forward to the |
Adds new `command` function that returns the underlying `std::Command` that would be called to open given path. Related: Byron#63 Related: helix-editor/helix#5820
Adds new `command` function that returns the underlying `std::Command` that would be called to open given path. Related: Byron#63 Related: helix-editor/helix#5820
Adds new `command` function that returns the underlying `std::Command` that would be called to open given path. Related: Byron#63 Related: helix-editor/helix#5820
Adds new `command` function that returns the underlying `std::Command` that would be called to open given path. Related: Byron#63 Related: helix-editor/helix#5820
Adds new `command` function that returns the underlying `std::Command` that would be called to open given path. Related: Byron#63 Related: helix-editor/helix#5820
Adds new `command` function that returns the underlying `std::Command` that would be called to open given path. Related: Byron#63 Related: helix-editor/helix#5820
Adds new `command` function that returns the underlying `std::Command` that would be called to open given path. Related: Byron#63 Related: helix-editor/helix#5820
Adds new `command` function that returns the underlying `std::Command` that would be called to open given path. Related: Byron#63 Related: helix-editor/helix#5820
Adds new `command` function that returns the underlying `std::Command` that would be called to open given path. Related: Byron#63 Related: helix-editor/helix#5820
This now causes cmd windows to pop up. Is that intentional? |
Thanks for letting me know, I wasn't aware. Thinking about it, my testing was done from within a terminal application, which didn't pop up another terminal so I thought it was alright - wishful thinking. As a little retrospective, a couple of folks looked into why Windows was so complicated and it wasn't obvious anymore and thus seems like a good idea to make it uniform to support the It looks like v3.2 is the last version that uses the I think it will be yanked as well and replaced with a new crate called @pascalkuthe as Maybe there are other options I am not seeing, if so please let me know as well. |
We will eventually create a GUI for helix too so it would be good to have a proper fix. I think adding the |
FWIW, while I understand the appeal of the uniformity of If you are committed to running a subprocess for this, you should look into: |
the problem is that we want to use the commands returned by |
I'm not sure if tokio's process spawning will work with creation_flags. I can see that it can convert from the std Command to the tokio equivalent, but I don't know if that will be enough because the docs for tokio's command suggest that it does some custom spawn handling. An alternative approach, if that doesn't work, is to use |
I also thought about doing That said |
Thanks @wez and @pascalkuthe for hashing out a solution - it turns out to be working just like you think as per #69 and a new release is available with a fix. |
Use std
Command
instead ofShellExecuteW
from windows sys crate.This change was already attempted in: #25 and later reverted in: #27 and it it seems that it didn't work due to incorrect usage of
explorer
instead ofcmd /c start
.(see helix-editor/helix#5820 (comment) for detailed explanation).
Related: helix-editor/helix#5820