-
Notifications
You must be signed in to change notification settings - Fork 49
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: use ShellExecuteW
for detached spawning on Windows
#91
feat: use ShellExecuteW
for detached spawning on Windows
#91
Conversation
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 great work, thanks so much for contributing!
And all that is done without adding a new crate, just by declaring external linkage of a C function. I wonder how it knows what to link to, it seems to be implied.
In any case, I will be merging this under the assumption that it was validated on Windows, and create a new release promptly: https://github.com/Byron/open-rs/releases/tag/v5.1.0
Please note that I had to yank that release as it doesn't seem to be able to link in that function that is declared as having external linkage. https://github.com/Byron/gitoxide/actions/runs/8124066000/job/22205141131?pr=1236#step:7:446 I am using this PR to try to reproduce the problem, but yanking the version in question definitely helped to fix |
It looks like I am unable to reproduce the issue :/, maybe you can take a look? I thought it's about win32 targets, but doesn't seem to be the case. Maybe it's some interplay of Thanks for your help! I am quite aware that yanking v5.1 might break others who are relying on it, it's like being caught between a rock and a hard place. |
Maybe because of incremental build? I can build and link it on current head 21a73ee with windows-sys
|
The defined extern is almost identical to the one generated by windows-sys crate as you can see here.
You can publish 5.1.1 without this PR logic so users who depend on 5.1 won't have any issues. |
The linking error, just for completeness, is this one:
I'd be inclined to say that somehow the symbol it tries to link to is prefixed with Also I tried to reproduce the issue locally on a x64 Windows VM, but to not avail. In order to not leave |
Thanks, we will enable this feature on tauri-plugin-shell and see if we face any issues over time. |
closes #90
ref: tauri-apps/plugins-workspace#1003