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

make output on Windows has interwoven stdout/stderr streams #193

Open
DeflateAwning opened this issue Jul 20, 2024 · 4 comments
Open

make output on Windows has interwoven stdout/stderr streams #193

DeflateAwning opened this issue Jul 20, 2024 · 4 comments

Comments

@DeflateAwning
Copy link
Contributor

It appears that xPack's make on Windows has some serious issues where the stdout and stderr logs get interwoven.

I've opened an issue over on their repo. Hopefully they're able to fix it at the source: xpack-dev-tools/windows-build-tools-xpack#27

However, if can't/don't fix it, it would be nice if you were able to redirect stderr to stdout as you call that make.exe command (for Windows only) so that the build outputs are readable on Windows.

Here's an example of the bizzare output:

image

@DeflateAwning
Copy link
Contributor Author

Update: the issue appears to be present on some Mac systems, and on Windows. One solution/work-around is to force -j1 to make the output readable (at the cost of build speed).

Can I please request adding a selector or "use multiple threads" checkbox or similar in the extension which lets you pick the number of threads to use?

@jortbmd
Copy link
Member

jortbmd commented Jul 29, 2024

I am aware of this issue. Unfortunately this is due to an update in make from 4.0 onwards. To counter this you can add the -O flag to make and it should separate the streams.
e.g. add this to the .yaml file:

makeFlags:
  - -O  # use this option when the output of make is mixed up only works for make version 4.0 and upwards

Hope this helps.

@DeflateAwning
Copy link
Contributor Author

Would you accept a PR that checks the make version and sets this flag, if appropriate?

@jortbmd
Copy link
Member

jortbmd commented Jul 30, 2024

Thanks for offering! Yes I would. If this is an universal thing for make 4.0 then it would make sense to have it. Implementation wise it would probably make sense to do this check on extension start-up. The function checkBuildTools in src/buildTools/index.ts is run upon start-up and would probably be the most logical entrypoint for implementing the feature. The injection of the flag should probably happen in the buildSTM function in src/BuildTask.ts. Hope this helps and I am looking forward to the PR!

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

No branches or pull requests

2 participants