-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Don't require all build script output to be utf-8 #2560
Conversation
Build scripts often stream output of native build systems like cmake/make and those aren't always guaranteed to produce utf-8 output. For example German MSVC cmake build has been reported to print non-utf-8 umlauts. This commit instead only attempts to interpret each line as utf-8 rather than the entire build script output. All non-utf-8 output is ignored. Closes rust-lang#2556
r? @brson |
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ |
📌 Commit 020db0d has been approved by |
Don't require all build script output to be utf-8 Build scripts often stream output of native build systems like cmake/make and those aren't always guaranteed to produce utf-8 output. For example German MSVC cmake build has been reported to print non-utf-8 umlauts. This commit instead only attempts to interpret each line as utf-8 rather than the entire build script output. All non-utf-8 output is ignored. Closes #2556
☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
Random comment on an old PR, but I hit this same issue with my sccache2 tool that wraps compiler execution. For the MSVC case, what you really want to do is convert from the system codepage, which works fine. (In general the problem is sort of unsolvable unless you want to just take the bytes from the program's stdout and write them using |
@luser just to clarify, did you hit this assertion or see any bad behavior because of this? I was hoping that this would cause Cargo to avoid all non-utf8 output and only look at lines which are utf-8, which in theory all |
No, sorry, I mean "my project had the same problem dealing with non-UTF-8 output from MSVC". |
Ah ok, thanks for the clarification! Also, thanks for the link! |
Build scripts often stream output of native build systems like cmake/make and
those aren't always guaranteed to produce utf-8 output. For example German
MSVC cmake build has been reported to print non-utf-8 umlauts.
This commit instead only attempts to interpret each line as utf-8 rather than
the entire build script output. All non-utf-8 output is ignored.
Closes #2556