-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix bootstrap failing on win32 #71964
Fix bootstrap failing on win32 #71964
Conversation
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. |
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! |
📌 Commit 7204fe4 has been approved by |
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. |
@jcotton42: 🔑 Insufficient privileges: Not in reviewers |
@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
r=me with commits squashed Yeah, that sounds quite plausible. |
@Mark-Simulacrum all Windows builds on the CI are started from MSYS2 which provides |
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. |
@jcotton42 it's waiting for you to squash the commits. |
Oh I'm dumb, thanks @mati865, will do that right now |
e7d6ef0
to
34b2072
Compare
Rebased and squashed |
@bors r+ p=1 (but can be rolled up) |
📌 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
decode
call until after we're sureostype
andcputype
are notNone
, as they would be on Windows sinceuname
doesn't exist