supranational / pasta-msm

High-performance Multi-scalar Multiplication for Pasta curves
Apache License 2.0
21 stars 11 forks source link

Issues running test due to old dependencies #10

Closed huitseeker closed 11 months ago

huitseeker commented 11 months ago
     Removed 826 files, 290.3MiB total
huitseeker@sleipnir➜huitseeker/tmp/pasta-msm(main)» git rev-parse HEAD                                                                                                                                                                [9:01:26]
994b68e8444f0c5cf44cf905fc908b55b1069d90
huitseeker@sleipnir➜huitseeker/tmp/pasta-msm(main)» cargo test                                                                                                                                                                        [9:01:35]
   Compiling libc v0.2.137
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling either v1.8.0
   Compiling cc v1.0.74
   Compiling crossbeam-utils v0.8.12
   Compiling serde v1.0.147
   Compiling radium v0.7.0
   Compiling memchr v2.5.0
   Compiling proc-macro2 v1.0.47
   Compiling tap v1.0.1
   Compiling lazy_static v1.4.0
   Compiling funty v2.0.0
   Compiling quote v1.0.21
   Compiling scopeguard v1.1.0
   Compiling unicode-ident v1.0.5
   Compiling rayon-core v1.9.3
   Compiling ppv-lite86 v0.2.16
   Compiling ryu v1.0.11
   Compiling subtle v2.4.1
   Compiling syn v1.0.103
   Compiling serde_json v1.0.87
   Compiling arrayref v0.3.6
   Compiling constant_time_eq v0.1.5
   Compiling serde_derive v1.0.147
   Compiling arrayvec v0.7.2
   Compiling itoa v1.0.4
   Compiling unicode-width v0.1.10
   Compiling plotters-backend v0.3.4
   Compiling regex-automata v0.1.10
   Compiling same-file v1.0.6
   Compiling itoa v0.4.8
   Compiling half v1.8.2
   Compiling static_assertions v1.1.0
   Compiling bitflags v1.3.2
   Compiling regex-syntax v0.6.27
   Compiling cast v0.3.0
   Compiling oorandom v11.1.3
   Compiling wyz v0.5.0
   Compiling itertools v0.10.5
   Compiling memoffset v0.6.5
   Compiling crossbeam-epoch v0.9.11
   Compiling num-traits v0.2.15
   Compiling rayon v1.5.3
   Compiling walkdir v2.3.2
   Compiling textwrap v0.11.0
   Compiling plotters-svg v0.3.3
   Compiling blake2b_simd v1.0.0
   Compiling semolina v0.1.4
   Compiling bitvec v1.0.1
   Compiling clap v2.34.0
   Compiling crossbeam-channel v0.5.6
   Compiling csv-core v0.1.10
   Compiling getrandom v0.2.8
   Compiling which v4.3.0
   Compiling num_cpus v1.13.1
   Compiling atty v0.2.14
   Compiling criterion-plot v0.4.5
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/huitseeker/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.47/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Proc-macro2 removed the use of that feature in version 1.0.60. v1.0.47 is imported here through criterion. The fix seems to be upgrading criterion & serde:

huitseeker@sleipnir➜huitseeker/tmp/pasta-msm(main)» cargo tree -p proc-macro2 -i                                                                                                                                                      [9:01:38]
proc-macro2 v1.0.47
├── quote v1.0.21
│   ├── serde_derive v1.0.147 (proc-macro)
│   │   └── criterion v0.3.6
│   │       [dev-dependencies]
│   │       └── pasta-msm v0.1.4 (/home/huitseeker/tmp/pasta-msm)
│   └── syn v1.0.103
│       └── serde_derive v1.0.147 (proc-macro) (*)
├── serde_derive v1.0.147 (proc-macro) (*)
└── syn v1.0.103 (*)
dot-asm commented 11 months ago

Not that updating criterion is out of the question, but why don't I see the problem? If I look into my Cargo.lock as it is now, I get version = "1.0.70" for proc-macro2. Is it possible that cargo update would solve the problem too?

huitseeker commented 11 months ago

My bad, it should, and does 🤦 : https://github.com/bheisler/criterion.rs/blob/f9ccd05caad4d068679074c3bc33c3f712ff2343/Cargo.toml#L23-L25 I should have had that 2d cup of coffee this morning.