Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.14.0 npm run test breaks or does not provide the correct functionality #296

Open
legendofa opened this issue Dec 3, 2024 · 2 comments · May be fixed by #298
Open

v0.14.0 npm run test breaks or does not provide the correct functionality #296

legendofa opened this issue Dec 3, 2024 · 2 comments · May be fixed by #298
Labels
bug Something isn't working

Comments

@legendofa
Copy link

legendofa commented Dec 3, 2024

Tested on version tag v0.14.0.

Steps to reproduce the issue:

  1. cd rapier2d
  2. npm i
  3. npm run build
  4. cd ../testbed2d
  5. npm run test

Error message:

error[E0277]: `*mut u8` cannot be sent between threads safely
    --> rapier3d/../src/pipeline/physics_hooks.rs:21:23
     |
21   | impl PhysicsHooks for RawPhysicsHooks {
     |                       ^^^^^^^^^^^^^^^ `*mut u8` cannot be sent between threads safely
     |
     = help: within `physics_hooks::RawPhysicsHooks`, the trait `Send` is not implemented for `*mut u8`, which is required by `physics_hooks::RawPhysicsHooks: Send`
note: required because it appears within the type `PhantomData<*mut u8>`
    --> /build/rustc-1.82.0-src/library/core/src/marker.rs:741:12
note: required because it appears within the type `wasm_bindgen::JsValue`
    --> /home/julian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/lib.rs:91:12
     |
91   | pub struct JsValue {
     |            ^^^^^^^
note: required because it appears within the type `Object`
    --> /home/julian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/js-sys-0.3.69/src/lib.rs:3398:14
     |
3398 |     pub type Object;
     |              ^^^^^^
note: required because it appears within the type `physics_hooks::RawPhysicsHooks`
    --> rapier3d/../src/pipeline/physics_hooks.rs:6:12
     |
6    | pub struct RawPhysicsHooks {
     |            ^^^^^^^^^^^^^^^
note: required by a bound in `PhysicsHooks`
    --> /home/julian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rapier3d-0.22.0/src/pipeline/physics_hooks.rs:161:25
     |
161  | pub trait PhysicsHooks: Send + Sync {
     |                         ^^^^ required by this bound in `PhysicsHooks`

For more information about this error, try `rustc --explain E0277`.
warning: `dimforge_rapier2d` (lib) generated 107 warnings
error: could not compile `dimforge_rapier2d` (lib) due to 2 previous errors; 107 warnings emitted
warning: build failed, waiting for other jobs to finish...
warning: `dimforge_rapier2d` (lib test) generated 107 warnings (107 duplicates)
error: could not compile `dimforge_rapier2d` (lib test) due to 2 previous errors; 107 warnings emitted
warning: `dimforge_rapier3d` (lib) generated 51 warnings
error: could not compile `dimforge_rapier3d` (lib) due to 2 previous errors; 51 warnings emitted
warning: `dimforge_rapier3d` (lib test) generated 51 warnings (51 duplicates)
error: could not compile `dimforge_rapier3d` (lib test) due to 2 previous errors; 51 warnings emitted

npm run test executes: cargo test && wasm-pack test --headless is this the correct behavior? Issue #184 says that cargo should not be used directly. Or is there a problem with my particular build process?

@Vrixyz Vrixyz added the bug Something isn't working label Dec 4, 2024
@Vrixyz
Copy link
Contributor

Vrixyz commented Dec 18, 2024

Hey, thanks for the report!

This test script should just not exist, I'll remove them.

@Vrixyz Vrixyz linked a pull request Dec 18, 2024 that will close this issue
@legendofa
Copy link
Author

Ok perfect, thanks for the quick fix 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants