kurtlawrence/papyrus

0.14.0 fails to build from crates.io and cargo install

Closed this issue · 5 comments

cargo +nightly install papyrus and cargo +nightly install --path . fail to build with the following error:

error[E0433]: failed to resolve: could not find `Backtrace` in `backtrace`
   --> src/run/mod.rs:152:36
    |
152 |         let backtrace = backtrace::Backtrace::new();
    |                                    ^^^^^^^^^ could not find `Backtrace` in `backtrace`

error[E0412]: cannot find type `Backtrace` in crate `backtrace`
   --> src/run/mod.rs:230:27
    |
230 |     backtrace: backtrace::Backtrace,
    |                           ^^^^^^^^^
    | 
   ::: /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.42/src/print.rs:15:1
    |
15  | pub struct BacktraceFmt<'a, 'b> {
    | ------------------------------- similarly named struct `BacktraceFmt` defined here
    |
help: a struct with a similar name exists
    |
230 |     backtrace: backtrace::BacktraceFmt,
    |                           ^^^^^^^^^^^^
help: possible candidate is found in another module, you can import it into scope
    |
2   | use std::backtrace::Backtrace;
    |

Looks like the backtrace crate has been moved into the std library for the nightly toolchain: https://doc.rust-lang.org/std/backtrace/index.html

Also. I'm on x86_64-unknown-linux-gnu host and rust version 1.42.0-nightly (b5a3341f1 2020-01-20)

Same error on x86_64-unknown-linux-gnu with rust 1.40.0 stable.
Tried to install through:
cargo +stable install papyrus --no-default-features --features="runnable"

Thanks for raising the issue! It looks like the backtrace requires the feature std to be enabled for access to Backtrace, which flew under my radar. PR #76 will fix the issue.

@kurtlawrence thank you for the extremely quick fix, but that doesn't seem to fix the stable build.

Sorry I made the fix on the repo but got distracted and forgot to publish to crates.io, there should be a version 0.14.1 up soon =)