Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code coverage script does not work #614

Closed
philippecamacho opened this issue Jun 24, 2024 · 4 comments · Fixed by #620
Closed

Code coverage script does not work #614

philippecamacho opened this issue Jun 24, 2024 · 4 comments · Fixed by #620

Comments

@philippecamacho
Copy link
Contributor

The code coverage script mentioned in the README.md does not work.

> nix-shell:~/repositories/espressosys/jellyfish]$ ./scripts/test_coverage.sh 
++ IGNORED_FILES='--ignore **/errors.rs               --ignore **/src/bin/*               --ignore transactions/src/parameters.rs               --ignore transactions/src/bench_utils/*              '
++ export CARGO_INCREMENTAL=0
++ CARGO_INCREMENTAL=0
++ export 'RUSTFLAGS=-Zprofile -Ccodegen-units=1 -Copt-level=3 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
++ RUSTFLAGS='-Zprofile -Ccodegen-units=1 -Copt-level=3 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
++ export RUSTDOCFLAGS=
++ RUSTDOCFLAGS=
++ rm -vf './target/**/*.gcda'
++ cargo build --features 'test-srs, gadgets, bls, schnorr'
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Zprofile -Ccodegen-units=1 -Copt-level=3 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: the option `Z` is only accepted on the nightly compiler

  help: consider switching to a nightly toolchain: `rustup default nightly`

  note: selecting a toolchain with `+toolchain` arguments require a rustup proxy; see <https://rust-lang.github.io/rustup/concepts/index.html>

  note: for more information about Rust's stability policy, see <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html#unstable-features>

  error: 1 nightly option were parsed

@mrain mrain mentioned this issue Jun 25, 2024
6 tasks
@philippecamacho
Copy link
Contributor Author

Thanks @mrain !!

@philippecamacho
Copy link
Contributor Author

@mrain I still get an error:

> ./scripts/test_coverage.sh

+ IGNORED_FILES='--ignore **/errors.rs               --ignore **/src/bin/*               --ignore transactions/src/parameters.rs               --ignore transactions/src/bench_utils/*              '
+ export CARGO_INCREMENTAL=0
+ CARGO_INCREMENTAL=0
+ export 'RUSTFLAGS=-Zprofile -Ccodegen-units=1 -Copt-level=3 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
+ RUSTFLAGS='-Zprofile -Ccodegen-units=1 -Copt-level=3 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
+ export RUSTDOCFLAGS=
+ RUSTDOCFLAGS=
+ rm -vf './target/**/*.gcda'
+ cargo +nightly build --features 'test-srs, gadgets, bls, schnorr'
   Compiling proc-macro2 v1.0.69
   Compiling unicode-ident v1.0.12
   Compiling version_check v0.9.4
   Compiling autocfg v1.1.0
   Compiling serde v1.0.193
   Compiling rand_core v0.6.4
   Compiling typenum v1.17.0
   Compiling cfg-if v1.0.0
   Compiling subtle v2.5.0
   Compiling crossbeam-utils v0.8.16
   Compiling syn v1.0.109
   Compiling scopeguard v1.2.0
   Compiling rayon-core v1.12.1
   Compiling either v1.9.0
   Compiling ppv-lite86 v0.2.17
   Compiling paste v1.0.14
   Compiling zerocopy v0.7.26
   Compiling once_cell v1.18.0
   Compiling cpufeatures v0.2.11
   Compiling heck v0.4.1
   Compiling itertools v0.10.5
   Compiling crc-any v2.4.3
   Compiling base64 v0.22.0
   Compiling pin-project-lite v0.2.13
   Compiling tracing-core v0.1.32
   Compiling itertools v0.12.1
   Compiling rand_chacha v0.3.1
   Compiling allocator-api2 v0.2.16
   Compiling rand v0.8.5
   Compiling tracing v0.1.40
   Compiling generic-array v0.14.7
   Compiling ahash v0.8.6
   Compiling quote v1.0.33
   Compiling keccak v0.1.4
   Compiling memoffset v0.9.0
   Compiling crossbeam-epoch v0.9.15
   Compiling num-traits v0.2.17
   Compiling num-integer v0.1.45
   Compiling syn v2.0.39
   Compiling num-bigint v0.4.4
error[E0635]: unknown feature `stdsimd`
  --> /home/leloup/.cargo-nix/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.6/src/lib.rs:99:42
   |
99 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

   Compiling crossbeam-deque v0.8.3
   Compiling downcast-rs v1.2.0
For more information about this error, try `rustc --explain E0635`.
error: could not compile `ahash` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

@mrain
Copy link
Contributor

mrain commented Jun 26, 2024

@philippecamacho it works well on my side with ahash 0.8.11, maybe try cargo update first?

@philippecamacho
Copy link
Contributor Author

@philippecamacho it works well on my side with ahash 0.8.11, maybe try cargo update first?

@mrain This worked thank you. I had to update flake.nix though to be able to run the script. See #621.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants