akubera / bigdecimal-rs

Arbitrary precision decimal crate for Rust
Other
284 stars 71 forks source link

`cargo build --all-targets` fails #111

Closed rukai closed 1 year ago

rukai commented 1 year ago

I'm assuming this is because criterion has msrv above this crate so you dont want to include in dependencies. But having benches that just dont build makes development difficult for contributors. I would suggest either:

akubera commented 1 year ago

The benchmarks are more of a curiosity at this point, and you're right they should probably be moved to their own repository (complete with all the benchmarking test data), but for now I'll do a quick fix and apply my "feature comments" to the [[bench]] section of cargo.toml.

I added --all-targets flags to the ci to ensure that continues to work. Thanks for bringing that to my attention.

MSRV is one issue, the other is lack of features in dev-dependencies, so anybody testing would always build the benchmarking crates, changing the dependency tree from

bigdecimal v0.4.2+dev (/Users/andrewkubera/development/rust/bigdecimal)
├── libm v0.2.7
├── num-bigint v0.4.3
│   ├── num-integer v0.1.45
│   │   └── num-traits v0.2.15
│   │       [build-dependencies]
│   │       └── autocfg v1.1.0
│   │   [build-dependencies]
│   │   └── autocfg v1.1.0
│   └── num-traits v0.2.15 (*)
│   [build-dependencies]
│   └── autocfg v1.1.0
├── num-integer v0.1.45 (*)
└── num-traits v0.2.15 (*)
[build-dependencies]
└── autocfg v1.1.0
[dev-dependencies]
├── paste v1.0.13 (proc-macro)
├── serde_json v1.0.97
│   ├── itoa v1.0.6
│   ├── ryu v1.0.14
│   └── serde v1.0.164
└── siphasher v0.3.10

to

bigdecimal v0.4.2+dev (/Users/andrewkubera/development/rust/bigdecimal)
├── libm v0.2.7
├── num-bigint v0.4.3
│   ├── num-integer v0.1.45
│   │   └── num-traits v0.2.15
│   │       [build-dependencies]
│   │       └── autocfg v1.1.0
│   │   [build-dependencies]
│   │   └── autocfg v1.1.0
│   └── num-traits v0.2.15 (*)
│   [build-dependencies]
│   └── autocfg v1.1.0
├── num-integer v0.1.45 (*)
└── num-traits v0.2.15 (*)
[build-dependencies]
└── autocfg v1.1.0
[dev-dependencies]
├── criterion v0.4.0
│   ├── anes v0.1.6
│   ├── atty v0.2.14
│   │   └── libc v0.2.147
│   ├── cast v0.3.0
│   ├── ciborium v0.2.1
│   │   ├── ciborium-io v0.2.1
│   │   ├── ciborium-ll v0.2.1
│   │   │   ├── ciborium-io v0.2.1
│   │   │   └── half v1.8.2
│   │   └── serde v1.0.164
│   │       └── serde_derive v1.0.164 (proc-macro)
│   │           ├── proc-macro2 v1.0.66
│   │           │   └── unicode-ident v1.0.11
│   │           ├── quote v1.0.32
│   │           │   └── proc-macro2 v1.0.66 (*)
│   │           └── syn v2.0.28
│   │               ├── proc-macro2 v1.0.66 (*)
│   │               ├── quote v1.0.32 (*)
│   │               └── unicode-ident v1.0.11
│   ├── clap v3.2.25
│   │   ├── bitflags v1.3.2
│   │   ├── clap_lex v0.2.4
│   │   │   └── os_str_bytes v6.5.1
│   │   ├── indexmap v1.9.3
│   │   │   └── hashbrown v0.12.3
│   │   │   [build-dependencies]
│   │   │   └── autocfg v1.1.0
│   │   └── textwrap v0.16.0
│   ├── criterion-plot v0.5.0
│   │   ├── cast v0.3.0
│   │   └── itertools v0.10.5
│   │       └── either v1.9.0
│   ├── itertools v0.10.5 (*)
│   ├── lazy_static v1.4.0
│   ├── num-traits v0.2.15 (*)
│   ├── oorandom v11.1.3
│   ├── plotters v0.3.5
│   │   ├── num-traits v0.2.15 (*)
│   │   ├── plotters-backend v0.3.5
│   │   └── plotters-svg v0.3.5
│   │       └── plotters-backend v0.3.5
│   ├── rayon v1.7.0
│   │   ├── either v1.9.0
│   │   └── rayon-core v1.11.0
│   │       ├── crossbeam-channel v0.5.8
│   │       │   ├── cfg-if v1.0.0
│   │       │   └── crossbeam-utils v0.8.16
│   │       │       └── cfg-if v1.0.0
│   │       ├── crossbeam-deque v0.8.3
│   │       │   ├── cfg-if v1.0.0
│   │       │   ├── crossbeam-epoch v0.9.15
│   │       │   │   ├── cfg-if v1.0.0
│   │       │   │   ├── crossbeam-utils v0.8.16 (*)
│   │       │   │   ├── memoffset v0.9.0
│   │       │   │   │   [build-dependencies]
│   │       │   │   │   └── autocfg v1.1.0
│   │       │   │   └── scopeguard v1.2.0
│   │       │   │   [build-dependencies]
│   │       │   │   └── autocfg v1.1.0
│   │       │   └── crossbeam-utils v0.8.16 (*)
│   │       ├── crossbeam-utils v0.8.16 (*)
│   │       └── num_cpus v1.16.0
│   │           └── libc v0.2.147
│   ├── regex v1.9.3
│   │   ├── regex-automata v0.3.6
│   │   │   └── regex-syntax v0.7.4
│   │   └── regex-syntax v0.7.4
│   ├── serde v1.0.164 (*)
│   ├── serde_derive v1.0.164 (proc-macro) (*)
│   ├── serde_json v1.0.97
│   │   ├── itoa v1.0.6
│   │   ├── ryu v1.0.14
│   │   └── serde v1.0.164 (*)
│   ├── tinytemplate v1.2.1
│   │   ├── serde v1.0.164 (*)
│   │   └── serde_json v1.0.97 (*)
│   └── walkdir v2.3.3
│       └── same-file v1.0.6
├── lazy_static v1.4.0
├── oorandom v11.1.3
├── paste v1.0.13 (proc-macro)
├── serde_json v1.0.97 (*)
└── siphasher v0.3.10

which is a lot of compilation that nobody needs.