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

bootstrap.py: Always use .exe for Windows #98895

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

ChrisDenton
Copy link
Member

@ChrisDenton ChrisDenton commented Jul 4, 2022

This ensures that it will run the Windows executable if other files in the directory (such as Linux executables) have the same file name minus the extension. I've been tripped up by this a few times where both bootstrap and bootstrap.exe end up in the same directory.

This PR avoids ever having to see the following message:

OSError: [WinError 193] %1 is not a valid Win32 application

This ensure that it will run the Windows executable if other files in the directory (such as Linux executables) have the same file name minus the extension.
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 4, 2022
@jyn514
Copy link
Member

jyn514 commented Jul 5, 2022

Hmm, this worked before because Windows will look for .exe files if bootstrap alone isn't found?

I've been tripped up by this a few times where both bootstrap and bootstrap.exe end up in the same directory.

That seems kind of odd - is this something we're generating? Are you switching between MSVC and gnu hosts maybe?

That said, this looks fine - r=me

@ChrisDenton
Copy link
Member Author

Hmm, this worked before because Windows will look for .exe files if bootstrap alone isn't found?

Yeah, if bootstrap is not found then it'll append .exe and try again.

That seems kind of odd - is this something we're generating? Are you switching between MSVC and gnu hosts maybe?

I think it's me switching to WSL sometimes.

@jyn514
Copy link
Member

jyn514 commented Jul 5, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 5, 2022

📌 Commit b1541ff has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 5, 2022
src/bootstrap/bootstrap.py Outdated Show resolved Hide resolved
@ChrisDenton
Copy link
Member Author

@bors r-

@bors r=jyn514 rollup

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 5, 2022
@bors
Copy link
Contributor

bors commented Jul 5, 2022

📌 Commit 9ac4a4e has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 5, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jul 5, 2022
bootstrap.py: Always use `.exe` for Windows

This ensures that it will run the Windows executable if other files in the directory (such as Linux executables) have the same file name minus the extension. I've been tripped up by this a few times where both `bootstrap` and `bootstrap.exe` end up in the same directory.

This PR avoids ever having to see the following message:

`OSError: [WinError 193] %1 is not a valid Win32 application`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 5, 2022
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#98860 (adjust dangling-int-ptr error message)
 - rust-lang#98888 (interpret: fix CheckedBinOp behavior when overflow checking is disabled)
 - rust-lang#98889 (Add regression test for rust-lang#79467)
 - rust-lang#98895 (bootstrap.py: Always use `.exe` for Windows)
 - rust-lang#98920 (adapt issue-37945 codegen test to accept any order of ops)
 - rust-lang#98921 (Refactor: remove a redundant mutable variable)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a82f4a5 into rust-lang:master Jul 5, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 5, 2022
@ChrisDenton ChrisDenton deleted the no-elves-allowed branch July 5, 2022 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants