blst-security / cherrybomb

Stop half-done APIs! Cherrybomb is a CLI tool that helps you avoid undefined user behaviour by auditing your API specifications, validating them and running API security tests.
https://www.blstsecurity.com/cherrybomb
Apache License 2.0
1.12k stars 78 forks source link

Build error `E0277`: trait bound `f64: std::cmp::Eq` is not satisfied #65

Closed voxpelli closed 1 year ago

voxpelli commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Checkout latest main
  2. Run cargo build --release
  3. See error

Expected behavior The project would actually build.

Screenshots

Skärmavbild 2022-08-23 kl  18 01 35

error[E0277]: the trait bound f64: std::cmp::Eq is not satisfied --> swagger/src/schema.rs:56:5

https://github.com/blst-security/cherrybomb/blob/100453111366a8723162a649fd8954268e51731c/swagger/src/schema.rs#L56

= note: required because of the requirements on the impl of std::cmp::Eq for std::option::Option<f64> note: required by a bound in AssertParamIsEq --> /Users/pelle/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs:317:31

Desktop (please complete the following information):

Additional context I guess this might be because I'm compiling on an M1 and thus is targeting aarch64?

GuyL99 commented 2 years ago

Hi, what toolchain are you using? It can only compile on nightly, and I'll add it to the readme

voxpelli commented 2 years ago

@GuyL99 Rust 1.63.0, sorry for forgetting that very crucial information 😝

voxpelli commented 2 years ago

Could you add a rust-toolchain.toml file?

GuyL99 commented 2 years ago

@RazMag and @DeliciousBounty, can you do it?

RazMag commented 2 years ago

Thanks @voxpelli should be fixed now

dmdhrumilmistry commented 1 year ago

I'm getting same error when I ran

# rust version
$ rustc --version
rustc 1.65.0 (897e37553 2022-11-02)

# installing cherrybomb
$ cargo install cherrybomb

Screenshot: image

How can I fix the issue?

DeliciousBounty commented 1 year ago

@dmdhrumilmistry Do you compile on rust nightly?

dmdhrumilmistry commented 1 year ago

@dmdhrumilmistry Do you compile on rust nightly?

I believe I'm using a stable release since I installed rust using default options.

Edit:

I tried to install it again with the rust nightly build but it's returning the same error. Commands used are listed below:

$ rustup default nightly
$ rustup update
$ rustc --version
rustc 1.67.0-nightly (6284998a2 2022-11-12)
$ cargo install cherrybomb

The above commands prompted the same error.

image

RazMag commented 1 year ago

Thank you @dmdhrumilmistry looking into this rn

RazMag commented 1 year ago

Hey this should be fixed now in dev, in crates.io and soon in the main branch.