floooh / sokol-tools

Command line tools for use with sokol headers
MIT License
219 stars 54 forks source link

Output sokol-shdc errors to stderr instead of stdout #130

Closed kcbanner closed 2 months ago

kcbanner commented 2 months ago

I'm using sokol-shdc with the zig build system (via b.addSystemCommand). zig build only reports errors to the user that the child process printed on stderr, so they weren't visible in the zig build output.

This change prints the errors on stderr instead.

If printing to stdout is still desired for existing workflows I can gate this behaviour on a command line argument.

floooh commented 2 months ago

Thanks! I'll need to check whether the output on stderr is picked up by IDEs like VSCode, VStudio and Xcode. If it works we can keep the PR as is, otherwise put it behind a cmdline option.

floooh commented 2 months ago

...it works on Xcode and VSCode, now quickly checking Visual Studio on Windows.

floooh commented 2 months ago

...also works on VStudio, merging (found an unrelated bug related to parsing the error output on Windows for absolute paths starting with a device name, I'll fix that after merging).

floooh commented 2 months ago

...and merged, new binaries will be available when this CI pipeline goes green: https://github.com/floooh/sokol-tools/actions/runs/9546329717

...this does not yet contain the fix for Windows absolute paths.