Describe the bug
The version of the v8 crate currently used by the Router relies on (and checks that) std::any::TypeId is 64 bits large. In Rust 1.72.0 this was changed to 128 bits. The crate added support for this but the Router still needs to update to a version that contains that change.
Work around
For now, please use Rust 1.71.1 instead. This is the default when Rust installed with rustup and when compiling from the router repository. When using apollo_router as a library, either make a rust-toolchain.toml file at the root of your project like below, or run cargo +1.71.1 instead of cargo (after rustup install 1.71.1)
[toolchain]
channel = "1.71.1"
components = ["rustfmt", "clippy"]
To Reproduce
Steps to reproduce the behavior:
- Clone current
dev: 1a3e677
- Change the
rust-toolchain.toml file to specify channel = "1.72.0"
- Run
cargo check
Expected behavior
Compilation succeeds
Output
error[E0080]: evaluation of constant value failed
--> /Users/simon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/v8-0.71.2/src/isolate.rs:1715:3
|
1715 | assert!(size_of::<TypeId>() == size_of::<u64>());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: size_of::<TypeId>() == size_of::<u64>()', /Users/simon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/v8-0.71.2/src/isolate.rs:1715:3
Describe the bug
The version of the
v8crate currently used by the Router relies on (and checks that)std::any::TypeIdis 64 bits large. In Rust 1.72.0 this was changed to 128 bits. The crate added support for this but the Router still needs to update to a version that contains that change.Work around
For now, please use Rust 1.71.1 instead. This is the default when Rust installed with rustup and when compiling from the router repository. When using
apollo_routeras a library, either make arust-toolchain.tomlfile at the root of your project like below, or runcargo +1.71.1instead ofcargo(afterrustup install 1.71.1)To Reproduce
Steps to reproduce the behavior:
dev: 1a3e677rust-toolchain.tomlfile to specifychannel = "1.72.0"cargo checkExpected behavior
Compilation succeeds
Output