Skip to content

Give a better error message when the version output can't be parsed #33

Closed
@jyn514

Description

@jyn514

Currently, when the version output isn't recognized, rustc_version gives an error like this:

thread 'main' panicked at 'failed to determine underlying rustc version of Miri: UnexpectedVersionFormat', src/tools/miri/cargo-miri/bin.rs:132:38

However this is very unhelpful for determining the actual issue, which is that the dynamic libraries were not set up correctly:

/home/r/src/rust/rustc.3/build/x86_64-unknown-linux-gnu/stage0-tools-bin/miri: error while loading shared libraries: libLLVM-11-rust-1.49.0-nightly.so: cannot open shared object file: No such file or directory

It would be great to either print the full output of the command on failure, or to store it in the error message so the library user can report it themselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions