rust-lexical icon indicating copy to clipboard operation
rust-lexical copied to clipboard

[BUG] Tests fail to compile because quickcheck is missing from Cargo.toml in the crates.io tarball.

Open emixa-d opened this issue 3 years ago • 4 comments

Description

When compiling rust-lexical-util, it fails with the following error:

Compiling tests/mul_tests.rs to .guix-tests/mul_tests
error[E0432]: unresolved import `quickcheck`
 --> tests/mul_tests.rs:2:5
  |
2 | use quickcheck::quickcheck;
  |     ^^^^^^^^^^ use of undeclared crate or module `quickcheck`

error: cannot determine resolution for the macro `quickcheck`
 --> tests/mul_tests.rs:4:1
  |
4 | quickcheck! {
  | ^^^^^^^^^^
  |
  = note: import resolution is stuck, try simplifying macro imports

If I understand correctly, the issue is that the dependency quickcheck is not mentioned in the Cargo.toml, so the build system doesn't know to add --extern=quickcheck=... (abbreviated):

# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
# [...]
[package]
edition = "2018"
name = "lexical-util"
[...]
[dependencies.static_assertions]
version = "1"
[dev-dependencies.proptest]
version = "0.10.1"

[features]
[...]

emixa-d avatar Sep 14 '22 20:09 emixa-d

Oops, I didn't mean to assign anyone.

emixa-d avatar Sep 14 '22 20:09 emixa-d

Working-around it by replacing the Cargo.toml by Cargo.toml.orig.

emixa-d avatar Sep 14 '22 20:09 emixa-d

Working-around it by replacing the Cargo.toml by Cargo.toml.orig.

Assigning me is fine, thanks.

Alexhuszagh avatar Sep 15 '22 04:09 Alexhuszagh

Likewise for lexical-parse-float

emixa-d avatar Sep 16 '22 12:09 emixa-d