Build Error: the trait `Sized` is not implemented
axelmagn opened this issue · comments
Describe the bug
I am following the extreme bevy tutorial. When I add bevy_ggrs
as a dependency, ggrs fails to compile with the following error:
error[E0277]: the size for values of type `dyn StdError + Send + Sync` cannot be known at compilation time
--> /home/axelmagn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ggrs-0.10.1/src/network/compression.rs:37:41
|
37 | let buf = bitfield_rle::decode(data)?;
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `dyn StdError + Send + Sync`, which is required by `Result<Vec<Vec<u8>>, Box<dyn StdError>>: FromResidual<Result<Infallible, Box<dyn StdError + Send + Sync>>>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Yeet<E>>>
<Result<T, F> as FromResidual<Result<Infallible, E>>>
= note: required for `Box<dyn StdError + Send + Sync>` to implement `StdError`
= note: required for `Box<dyn StdError>` to implement `From<Box<dyn StdError + Send + Sync>>`
= note: required for `Result<Vec<Vec<u8>>, Box<dyn StdError>>` to implement `FromResidual<Result<Infallible, Box<dyn StdError + Send + Sync>>>`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `ggrs` (lib) due to 1 previous error
To Reproduce
- follow extreme bevy tutorial up to the line
bevy_ggrs = { version = "0.15.0", features = ["wasm-bindgen"] }
- toolchain: stable-x86_64-unknown-linux-gnu
- rustc version: rustc 1.77.2 (25ef9e3d8 2024-04-09)
- target: wasm32-unknown-unknown
Expected behavior
ggrs builds successfully.
Screenshots
N/A
Desktop (please complete the following information):
- OS: WSL2 inside of Windows 11
- Version: Windows 11, version 23H2
Additional context
I'm not super familiar with ggrs as a library, but I would be happy to contribute towards the fix if someone could diagnose the problem and mentor me in the right direction.
Hi! Sorry for the inconveniences! This has been fixed and merged in #73, but I did not make a release yet :)
No worries! Glad you're already on top of it. I'll keep an eye out for the new release. Do you have an idea of when that will happen?
Maybe on the weekend? No promises though, I am currently moving :)
I ran into the same issue. :|
ggrs 0.10.2 includes the fix (#73) and is now published :)