Skip to content

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

Merged
bors merged 2 commits into
rust-lang:masterfrom
ChrisDenton:no-elves-allowed
Jul 5, 2022
Merged

bootstrap.py: Always use .exe for Windows#98895
bors merged 2 commits into
rust-lang:masterfrom
ChrisDenton:no-elves-allowed

Conversation

@ChrisDenton

@ChrisDenton ChrisDenton commented Jul 4, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

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

jyn514 commented Jul 5, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
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

jyn514 commented Jul 5, 2022

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Jul 5, 2022

Copy link
Copy Markdown
Collaborator

📌 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
Comment thread src/bootstrap/bootstrap.py Outdated
Co-authored-by: Marco Colombo <mar.colombo13@gmail.com>
@ChrisDenton

Copy link
Copy Markdown
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

bors commented Jul 5, 2022

Copy link
Copy Markdown
Collaborator

📌 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