Uh oh!
There was an error while loading. Please reload this page.
Fix bootstrap failing on win32 - #71964
Conversation
rust-highfive
commented
May 7, 2020
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Mark-Simulacrum
commented
May 7, 2020
Huh. Surprising that we didn't catch this in CI, but I guess maybe we either have uname or don't test that platform? Regardless, this seems fine, so @bors r+ rollup Thanks! |
bors
commented
May 7, 2020
📌 Commit 7204fe4 has been approved by |
jcotton42
commented
May 7, 2020
Does your Windows build env have MinGW even when testing MSVC builds? Because I have MSVC but not MinGW on my box. That's the only thing I can think of. |
bors
commented
May 7, 2020
@jcotton42: 🔑 Insufficient privileges: Not in reviewers |
bors
commented
May 7, 2020
@jcotton42: 🔑 Insufficient privileges: not in try users |
…dows, r=Mark-Simulacrum Fix bootstrap failing on win32 ```powershell python x.py -h # or really any x.py command ``` would fail with ``` info: Downloading and building bootstrap before processing --help command. See src/bootstrap/README.md for help with common commands. Updating only changed submodules Submodules updated in 0.15 seconds Traceback (most recent call last): File "x.py", line 11, in <module> bootstrap.main() File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 960, in main bootstrap(help_triggered) File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 925, in bootstrap build.build = args.build or build.build_triple() File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 731, in build_triple return default_build_triple() File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 184, in default_build_triple ostype = require(["uname", "-s"], exit=required).decode(default_encoding) AttributeError: 'NoneType' object has no attribute 'decode' ``` This PR defers the `decode` call until after we're sure `ostype` and `cputype` are not `None`, as they would be on Windows since `uname` doesn't exist
Mark-Simulacrum
commented
May 7, 2020
r=me with commits squashed Yeah, that sounds quite plausible. |
mati865
commented
May 7, 2020
@Mark-Simulacrum all Windows builds on the CI are started from MSYS2 which provides |
jcotton42
commented
May 12, 2020
Bumping this PR since it's been a few days and it will make it annoying/difficult for anyone on Windows to contribute to Rust until it's merged. |
mati865
commented
May 12, 2020
@jcotton42 it's waiting for you to squash the commits. |
jcotton42
commented
May 12, 2020
Oh I'm dumb, thanks @mati865, will do that right now |
e7d6ef0 to
34b2072Comparejcotton42
commented
May 12, 2020
Rebased and squashed |
Mark-Simulacrum
commented
May 12, 2020
@bors r+ p=1 (but can be rolled up) |
bors
commented
May 12, 2020
📌 Commit 34b2072 has been approved by |
…dows, r=Mark-Simulacrum Fix bootstrap failing on win32 ```powershell python x.py -h # or really any x.py command ``` would fail with ``` info: Downloading and building bootstrap before processing --help command. See src/bootstrap/README.md for help with common commands. Updating only changed submodules Submodules updated in 0.15 seconds Traceback (most recent call last): File "x.py", line 11, in <module> bootstrap.main() File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 960, in main bootstrap(help_triggered) File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 925, in bootstrap build.build = args.build or build.build_triple() File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 731, in build_triple return default_build_triple() File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 184, in default_build_triple ostype = require(["uname", "-s"], exit=required).decode(default_encoding) AttributeError: 'NoneType' object has no attribute 'decode' ``` This PR defers the `decode` call until after we're sure `ostype` and `cputype` are not `None`, as they would be on Windows since `uname` doesn't exist
Rollup of 12 pull requests Successful merges: - rust-lang#71525 (`prefix` should not be mutable.) - rust-lang#71741 (Pointer printing: do not print 0 offset) - rust-lang#71870 (Be slightly more precise about any::type_name()'s guarantees.) - rust-lang#71909 (Document From trait for Option implementations) - rust-lang#71964 (Fix bootstrap failing on win32) - rust-lang#72137 (Clean up E0581 explanation) - rust-lang#72138 (Add doc comment for `rustc_middle::mir::mono::Linkage`) - rust-lang#72150 (Remove UnnormalizedProjection) - rust-lang#72151 (Update books) - rust-lang#72163 (docs: remove comment referencing non-existent method) - rust-lang#72169 (Clean up E0582 explanation) - rust-lang#72183 (Fix Arc::decr_strong_count doc test) Failed merges: r? @ghost
would fail with
This PR defers the
decodecall until after we're sureostypeandcputypeare notNone, as they would be on Windows sinceunamedoesn't exist