dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
3.77k stars 235 forks source link

Compilation error with bevy and bevy_rapier3d #586

Closed wentao closed 4 months ago

wentao commented 5 months ago

I'm upgrading to bevy 0.12 and bevy_rapier3d 0.24 (which depends on rapier 0.18) from bevy 0.11 and bevy_rapier3d 0.22 on Mac.

After upgrading I'm seeing the following error when running cargo build. It seems to be an issue with rapier 0.18 source. So post it here to see if that is the case. This error is just one of the many leaked crate private type.

error[E0446]: crate-private type `SolverConstraintsSet<contact_constraints_set::ContactConstraintTypes>` in public interface
  --> /Users/wentao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rapier3d-0.18.0/src/dynamics/solver/contact_constraint/contact_constraints_set.rs:87:1
   |
87 | pub type ContactConstraintsSet = SolverConstraintsSet<ContactConstraintTypes>;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type
   |
  ::: /Users/wentao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rapier3d-0.18.0/src/dynamics/solver/solver_constraints_set.rs:39:1
   |
39 | pub(crate) struct SolverConstraintsSet<Constraints: ConstraintTypes> {
   | -------------------------------------------------------------------- `SolverConstraintsSet<contact_constraints_set::ContactConstraintTypes>` declared as crate-private
Ashwagandhae commented 5 months ago

I just updated rust with rustup update which fixed it!

sebcrozet commented 4 months ago

Looks like updating the compiler does the trick. Closing this issue.