axiom-crypto / halo2-lib

Monorepo of halo2 crates
MIT License
236 stars 145 forks source link

fix: update toolchain to nightly to fix failing bench builds #260

Closed drcapybara closed 5 months ago

drcapybara commented 7 months ago

running benches:

cargo test --release -- --nocapture bench_msm

is currently failing to build:

error: package `clap_builder v4.5.0` cannot be built because it requires rustc 1.74 or newer, while the currently active rustc version is 1.73.0-nightly
Either upgrade to rustc 1.74 or newer, or use
cargo update -p clap_builder@4.5.0 --precise ver
where `ver` is the latest version of `clap_builder` supporting rustc 1.73.0-nightly

PR simply updates to nightly in rust-toolchain

jonathanpwang commented 6 months ago

Thanks - not pinning a nightly version likely leads to problems down the line. Do you know what dependency is importing clap? It seems to be a consistent source of problems, so it'd be preferable to remove it if possible.

Otherwise, we can re-pin the rust toolchain to a newer nightly.

drcapybara commented 6 months ago

Do you know what dependency is importing clap?

Its coming in from Criterion v0.5.1 which is the latest version:

[dev-dependencies]
├── criterion v0.5.1
│   ├── anes v0.1.6
│   ├── cast v0.3.0
│   ├── ciborium v0.2.2
│   │   ├── ciborium-io v0.2.2
│   │   ├── ciborium-ll v0.2.2
│   │   │   ├── ciborium-io v0.2.2
│   │   │   └── half v2.3.1
│   │   │       └── cfg-if v1.0.0
│   │   └── serde v1.0.196 (*)
│   ├── clap v4.5.0
│   │   └── clap_builder v4.5.0
│   │       ├── anstyle v1.0.6
│   │       └── clap_lex v0.7.0

These features are identified as requiring nightly FYI:

#![feature(slice_group_by)]
#![feature(trait_alias)]
#![feature(slice_group_by)]
jonathanpwang commented 6 months ago

Ah got it, can you change the rust-toolchain to specify a date so we can pin it, and then also pin the criterion version with =0.5.1 so hopefully future updates don't break things again? Thanks!

drcapybara commented 6 months ago

Ah got it, can you change the rust-toolchain to specify a date so we can pin it, and then also pin the criterion version with =0.5.1 so hopefully future updates don't break things again? Thanks!

Criterion version appears pinned already. PR pins nightly as of today.

drcapybara commented 6 months ago

noticing a ton of redundant imports and other clippy CI violations now that rustc is pinned to nightly. @jonathanpwang we can either fix those or pin to a different nightly that is compatible with clap

jonathanpwang commented 6 months ago

@drcapybara maybe we can just add clap as a dev dependency and pin the version to something before 4.5.0