Build script regression prevents some builds from terminating #11196
Labels
A-build-scripts
Area: build.rs scripts
C-bug
Category: bug
regression-from-stable-to-stable
Regression in stable that worked in a previous stable release.
Problem
It seems build scripts previously were executed with a terminated stdin, but not since 1.63.0.
The build script of a package that I am using checks for an optional build-time dependency with
Command::new("exe").spawn().is_ok()
. It is expected to terminate immediately, but in newer versions of cargo it's blocking the script from completing while awaiting input from stdin. A solution for this package is to add.stdin(Stdio::null())
to quickly resolve the issue.I'm not sure if this is a deliberate change. But I can't seem to find any notes regarding this in the changelogs.
Steps
build.rs
thatCommand::new(...).spawn()
s a process that only terminates once stdin does (e.g.cat
)cargo build
with 1.62. Notice how it completescargo build
with 1.63. Notice how it freezes while building.I wrote a simple proof-of-concept
Possible Solution(s)
I was unable to find the culprit. If it's a desired change, I'd suggest adding a note about it in the changelog.
Notes
No response
Version
The text was updated successfully, but these errors were encountered: