dimforge / bevy_rapier

Official Rapier plugin for the Bevy game engine.
https://rapier.rs
Apache License 2.0
1.25k stars 260 forks source link

[0.13.2] serde-serialize feature fails to compile #171

Closed Xemiru closed 2 years ago

Xemiru commented 2 years ago

Given a Cargo.toml who enables the feature serde-serialize, and only that feature, i.e.

bevy_rapier3d = { version = "0.13.2", features = [ "serde-serialize" ] }

.. the following compile error appears.

error[E0277]: the trait bound `spherical_joint::SphericalJoint: serde::Serialize` is not satisfied
   --> /home/mimi/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_rapier3d-0.13.2/src/dynamics/spherical_joint.rs:132:34
    |
132 | pub struct SphericalJointBuilder(SphericalJoint);
    |                                  ^^^^^^^^^^^^^^ the trait `serde::Serialize` is not implemented for `spherical_joint::SphericalJoint`
    |
note: required by a bound in `serialize_newtype_struct`
   --> /home/mimi/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.137/src/ser/mod.rs:904:12
    |
904 |         T: Serialize;
    |            ^^^^^^^^^ required by this bound in `serialize_newtype_struct`

The error disappears when the feature is removed.

tomaspecl commented 2 years ago

I have the same issue on version 0.14.1.

Aceeri commented 2 years ago

This should be fixed with https://github.com/dimforge/bevy_rapier/pull/190