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

x.ps1 does not fail the build #111136

Closed
ehuss opened this issue May 3, 2023 · 3 comments · Fixed by #111141
Closed

x.ps1 does not fail the build #111136

ehuss opened this issue May 3, 2023 · 3 comments · Fixed by #111141
Labels
C-bug Category: This is a bug. P-high High priority T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@ehuss
Copy link
Contributor

ehuss commented May 3, 2023

The x.ps1 shell script does not return with an exit code if the build fails. The process.ExitCode object doesn't appear to be an integer.

cc @rust-lang/bootstrap This may be an important issue since something could potentially fail in CI without failing the build.
Noticed in CI when something funky happened. Fortunately the metrics don't get created when a test fails (I think), but there may be other situations where it isn't working correctly.

This looks like it was added in #99992.

@ehuss ehuss added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label May 3, 2023
@jyn514 jyn514 added C-bug Category: This is a bug. P-high High priority labels May 3, 2023
@ChrisDenton
Copy link
Member

This is weird. I do remember doing a fair bit of testing of that PR.

@albertlarsan68
Copy link
Member

PowerShell is always the odd one, with it's 5+ streams and .NET integrations and structured pipelines. Honestly, it doesn't surprise me that much that PowerShell does not care about exit codes, since the way to declare an error in PowerShell is to print something to the Error stream (IIRC).

@ChrisDenton
Copy link
Member

Oh it did work originally. But then I broke it. There's a defect when using WaitForExit() instead of the -Wait parameter where ExitCode isn't set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. P-high High priority T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants