Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tests/* not shipped in crate, resulting in unused [dev-dependencies] #578

@kentfredric

Description

@kentfredric
[dev-dependencies.automod]
version = "0.1"

[dev-dependencies.rustversion]
version = "0.1"

[dev-dependencies.serde_bytes]
version = "0.11"

[dev-dependencies.serde_derive]
version = "1.0"

[dev-dependencies.serde_stacker]
version = "0.1"

[dev-dependencies.trybuild]
version = "1.0"
$ ls
Cargo.toml  Cargo.toml.orig  LICENSE-APACHE  LICENSE-MIT  README.md  src
$ grep 'automod' -r .
./Cargo.toml.orig:automod = "0.1"
./Cargo.toml:[dev-dependencies.automod]
$ grep 'rustversion' -r .
./Cargo.toml.orig:rustversion = "0.1"
./Cargo.toml:[dev-dependencies.rustversion]
 $ grep 'serde_bytes' -r .
./Cargo.toml.orig:serde_bytes = "0.11"
./src/de.rs:    /// use serde_bytes::ByteBuf;
./src/de.rs:    /// use serde_bytes::ByteBuf;
./Cargo.toml:[dev-dependencies.serde_bytes]
kent@katipo2 ~/.cpanm/work/1571714539.20228/serde_json-1.0.41 $ grep 'serde_derive' -r .
./Cargo.toml.orig:serde_derive = "1.0"
./Cargo.toml:[dev-dependencies.serde_derive]
kent@katipo2 ~/.cpanm/work/1571714539.20228/serde_json-1.0.41 $ grep 'serde_stacker' -r .
./Cargo.toml.orig:serde_stacker = "0.1"
./Cargo.toml.orig:# stack adapter provided by the serde_stacker crate. Additionally you will need
./src/de.rs:    /// growing stack adapter provided by the serde_stacker crate. Additionally
./src/de.rs:    ///     let deserializer = serde_stacker::Deserializer::new(&mut deserializer);
./Cargo.toml:[dev-dependencies.serde_stacker]
$ grep 'trybuild' -r .
./Cargo.toml.orig:trybuild = "1.0"
./Cargo.toml:[dev-dependencies.trybuild]
cargo test
    Updating crates.io index
  Downloaded automod v0.1.2
  Downloaded rustversion v0.1.4
  Downloaded trybuild v1.0.17
  Downloaded toml v0.5.3
   Compiling proc-macro2 v1.0.6
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.5
   Compiling cc v1.0.46
   Compiling ryu v1.0.2
   Compiling libc v0.2.65
   Compiling serde v1.0.101
   Compiling itoa v0.4.4
   Compiling cfg-if v0.1.10
   Compiling lazy_static v1.4.0
   Compiling glob v0.3.0
   Compiling termcolor v1.0.5
   Compiling psm v0.1.5
   Compiling stacker v0.1.6
   Compiling quote v1.0.2
   Compiling serde_derive v1.0.101
   Compiling rustversion v0.1.4
   Compiling automod v0.1.2
   Compiling toml v0.5.3
   Compiling serde_json v1.0.41
   Compiling serde_bytes v0.11.2
   Compiling serde_json v1.0.41 (./serde_json-1.0.41)
   Compiling serde_stacker v0.1.1
   Compiling trybuild v1.0.17
    Finished dev [unoptimized + debuginfo] target(s) in 1m 38s
     Running target/debug/deps/serde_json-92f70e40abbd2b3f

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests serde_json

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

This combination of choices is a waste of time for everyone who attempts to run tests on the shipped crate, and makes quality-assurance on published crates nigh impossible.

Granted, some of this exposes inadequacies in cargo, like:

But its presently a bug in the crate itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions