denoland/rusty_v8

could not compile `v8` (lib) when upgraded rust v1.73.0 or 1.74.0

vn542023 opened this issue · 3 comments

I'm getting below error when I have upgraded my rust and rust toolchain version to either v1.73.0 or 1.74.0. I tied with V8 latest version 0.8.0 but still erroring the same. It was working fine with rust and rust toolchain version 1.71.1. Could you please help us?

docker build -t image_test -f docker/Dockerfile.test --no-cache .

195.6    Compiling typed-builder v0.12.0
196.6    Compiling str_inflector v0.12.0
196.8 error[E0080]: evaluation of constant value failed
196.8     --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/v8-0.71.2/src/isolate.rs:1715:3
196.8      |
196.8 1715 |   assert!(size_of::<TypeId>() == size_of::<u64>());
196.8      |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: size_of::<TypeId>() == size_of::<u64>()', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/v8-0.71.2/src/isolate.rs:1715:3
196.8      |
196.8      = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
196.8 
196.9 For more information about this error, try `rustc --explain E0080`.
196.9 error: could not compile `v8` (lib) due to previous error
196.9 warning: build failed, waiting for other jobs to finish...
225.5 thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-chef-0.1.62/src/recipe.rs:204:27:
225.5 Exited with status code: 101
225.5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------
Dockerfile.test:66
--------------------
  64 |     
  65 |     # Build and cache dependencies via cargo chef
  66 | >>> RUN cargo chef cook --recipe-path recipe.json
  67 |     RUN cargo chef cook --tests --recipe-path recipe.json
  68 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c cargo chef cook --recipe-path recipe.json" did not complete successfully: exit code: 101

You appear to be using the v8 library rather than rusty_v8. There haven't been updates for a while with v8, so it's not compatible with the latest versions of Rust.

FYI v8 is an alias for rusty_v8. The problem appears to be that the version used is 0.71.2 that indeed didn't support Rust 1.74. If you upgrade to the latest version the problem should be resolved.

removed Cargo.lock file and regenerated the file again resolved the issue. thank you