Skip to content

bootstrap: Don't use panics to report user errors #107019

Open
@jyn514

Description

@jyn514

Currently, bootstrap uses assert! interchangeably between "we expect this command to always succeed" and "you, the user, did something wrong and need to fix it". See

assert!(out.status.success(), "`cargo miri setup` returned with non-0 exit code");
for an example of the former and
assert!(llvm_bin_path.is_dir());
for an example of the latter. We should have more helpful error reporting for the latter, to make it more clear that it's not a bug.

The background motivation is that people are used to seeing the latter panics, and so don't report bugs when they see the former. This makes it hard to fix bugs because we don't know things are broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustE-help-wantedCall for participation: Help is requested to fix this issue.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions