gschup / ggrs

GGRS is a reimagination of GGPO, enabling P2P rollback networking in Rust. Rollback to the future!
Other
507 stars 25 forks source link

Build Error: the trait `Sized` is not implemented #76

Closed axelmagn closed 4 months ago

axelmagn commented 4 months ago

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

Expected behavior ggrs builds successfully.

Screenshots N/A

Desktop (please complete the following information):

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.

gschup commented 4 months ago

Hi! Sorry for the inconveniences! This has been fixed and merged in #73, but I did not make a release yet :)

axelmagn commented 4 months ago

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?

gschup commented 4 months ago

Maybe on the weekend? No promises though, I am currently moving :)

jaynnn commented 4 months ago

I ran into the same issue. :|

gschup commented 4 months ago

ggrs 0.10.2 includes the fix (#73) and is now published :)