Skip to content

Improve diagnostics on closed or corrupted file descriptors #51

Open

Description

This issue is a continuation of #27 (comment).

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 (rust-lang/rust#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
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions