ForesightMiningSoftwareCorporation / pre-commit

A collection of pre-commit hooks used by FMSC tools
0 stars 0 forks source link

Unexpected errors in published crates. #2

Open NthTensor opened 1 month ago

NthTensor commented 1 month ago

I enabled this, made some minor structural modifications to orica_libs/orica_backend/crates/orica_blasthole_rendering/src/lib.rs and committed them.

The pre-commit hooks returned the following unexpected errors in a published version of fse_app.

    Checking fse_app v0.32.3 (registry `foresight-mining-software-corporation`)
error[E0432]: unresolved import `fse_app_backend::floating_origin::IgnoreFloatingOrigin`
 --> /home/miles/.local/share/cargo/registry/src/ssh.shipyard.rs-0f11eef337e6c8fb/fse_app-0.32.3/src/plugins/viewport_theme/lighting.rs:3:48
  |
3 |     camera_controller::CameraControllerMarker, floating_origin::IgnoreFloatingOrigin,
  |                                                ^^^^^^^^^^^^^^^^^--------------------
  |                                                |                |
  |                                                |                help: a similar name exists in the module: `UpdateFloatingOrigin`
  |                                                no `IgnoreFloatingOrigin` in `floating_origin`

error[E0432]: unresolved import `fse_app_backend::floating_origin::IgnoreFloatingOrigin`
  --> /home/miles/.local/share/cargo/registry/src/ssh.shipyard.rs-0f11eef337e6c8fb/fse_app-0.32.3/src/plugins/viewport_theme/skybox.rs:12:5
   |
12 | use fse_app_backend::floating_origin::IgnoreFloatingOrigin;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------------
   |     |                                 |
   |     |                                 help: a similar name exists in the module: `UpdateFloatingOrigin`
   |     no `IgnoreFloatingOrigin` in `floating_origin`

    Checking fse_evaluators v0.12.0 (registry `foresight-mining-software-corporation`)
    Checking fse_dag_model v0.17.0 (registry `foresight-mining-software-corporation`)
error[E0599]: no method named `unwrap_or_default` found for struct `bevy::prelude::Vec2` in the current scope
   --> /home/miles/.local/share/cargo/registry/src/ssh.shipyard.rs-0f11eef337e6c8fb/fse_app-0.32.3/src/plugins/viewport_theme/infinite_grid.rs:100:53
    |
100 |         let hit_screen = world_to_screen(hit_world).unwrap_or_default();
    |                                                     ^^^^^^^^^^^^^^^^^ method not found in `Vec2`

error[E0599]: no method named `unwrap_or_default` found for struct `bevy::prelude::Vec2` in the current scope
   --> /home/miles/.local/share/cargo/registry/src/ssh.shipyard.rs-0f11eef337e6c8fb/fse_app-0.32.3/src/plugins/viewport_theme/infinite_grid.rs:101:67
    |
101 |         let hit_screen_offset = world_to_screen(hit_world_offset).unwrap_or_default();
    |                                                                   ^^^^^^^^^^^^^^^^^ method not found in `Vec2`

error[E0689]: can't call method `abs` on ambiguous numeric type `{float}`
   --> /home/miles/.local/share/cargo/registry/src/ssh.shipyard.rs-0f11eef337e6c8fb/fse_app-0.32.3/src/plugins/viewport_theme/infinite_grid.rs:109:65
    |
109 |         let screen_distance_unchecked = (1_000.0 / size as f64).abs() as f32;
    |                                                                 ^^^

Ended up disabling the hooks because I didn't have time to debug.

kurtlawrence commented 1 month ago

Fwiw fse_app is on 0.32.7,so it might be some sort of dep cache issue. Try cargo update.