jobserver-rs
jobserver-rs copied to clipboard
Improve diagnostics on closed or corrupted file descriptors
This issue is a continuation of https://github.com/alexcrichton/jobserver-rs/issues/27#issuecomment-701020994.
Jobserver users may want to report warnings or errors if the jobserver cannot be correctly inherited from the environment.
For example, rustc previously ICEd on jobserver errors (https://github.com/rust-lang/rust/issues/46981), but now it either swallows them (when jobserver acquire or release fails) or silently creates a new jobserver. However, for diagnosing issues in the build environment we'd ideally want to
- Warn if the jobserver descriptors were passed but couldn't be parsed or turned out closed
- both name of the used env var (e.g
MAKEFLAGS
) and possible parsing errors should be available for reporting
- both name of the used env var (e.g
- Error or warn if the jobserver descriptors are open/accessible, but corrupted, i.e. reopened by someone else and no longer refer to pipes
- name of the used env var should be available in this case as well
Cargo probably wants something like this as well.
This crate can support producing extended error types from Client::from_env
to support such diagnostics.
@BelovDV is currently working on this.