-
Notifications
You must be signed in to change notification settings - Fork 437
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
Improve examples scripts #2397
base: master
Are you sure you want to change the base?
Improve examples scripts #2397
Conversation
I get an error when I try to run the script:
|
Interesting, may I know the output you get when running |
Eh? XD |
Er, the original bourne shell didn't have that option. Oof. I suspect you have actual bourne shell installed. I can't seem to be able to install it, only bash, on my system. If you really have it installed that's actually chef's kiss. |
I assume it's done for compatibility reasons, and I guess it also stops people from using |
Yeah, that's why I'm happy you have it. It's not possible to install for me so mistakes are bound to happen. Bash is Linux-specific so I wanted to make the script more compatible by being inclusive to the BSD systems (and I guess MacOS?) |
That's why I also removed all the RiiR programs. Personally when I tried to run the script I had 1/4 of those programs installed, and the one I did have installed (ripgrep) was a dependency at the time. Kind of silly if you ask me, since the whole point of shell scripts is that they run without additional setup. |
It seems |
Now it works, but the gl-interop example crashes (as it has been for a while), and the script terminates instead of continuing. Is there a way to make it continue? |
Wait, is continuing on failure the expected behavior? |
I actually hadn't noticed that, that the sh script would continue even after one of the commands returned non-zero. That makes the way the PowerShell scripts run inconsistent. But in any case, the gl-interop example crashes because of SIGSEGV which terminates everything I think. Not sure why exactly. |
I put this at the start of the async-update example: unsafe { (1 as *mut u8).write_volatile(69) }; And indeed this makes xargs terminate, unlike a panic for instance. |
It's what the script did before, at least. And there should be a way to skip over a problematic example so that you can continue with the rest, it shouldn't block you from everything else. |
As I say that's still the behavior, except for SIGSEGV, which makes xargs terminate for some reason. Pretty weird. |
I'll use a loop instead of xargs, and make the PowerShell version behave the same, sometime later. This PR is not that high-priority anyway. |
This adds a PowerShell version of the
run_all.sh
script for those that want to test on Windows, as well as headless versions of both scripts which will come in handy for CI but can also be used by us. I also made the existingrun_all.sh
script more portable.