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

pof crate nalgebra versions causes conflicts #124

Closed
qazwsxal opened this issue Feb 14, 2023 · 2 comments · Fixed by #125
Closed

pof crate nalgebra versions causes conflicts #124

qazwsxal opened this issue Feb 14, 2023 · 2 comments · Fixed by #125

Comments

@qazwsxal
Copy link
Contributor

Using the pof crate in my own project produced the following error message on compilation:

error[E0308]: mismatched types
    --> pof\src\parse.rs:1325:9
     |
1324 |     fn transform(&self) -> Mat4x4 {
     |                            ------ expected `nalgebra::Matrix<f32, nalgebra::Const<4>, nalgebra::Const<4>, ArrayStorage<f32, 4, 4>>` because of return type
1325 |         self.transform_as_matrix()
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `nalgebra::Matrix`, found struct `nalgebra::base::matrix::Matrix`
     |
     = note: struct `nalgebra::base::matrix::Matrix` and struct `nalgebra::Matrix` have similar names, but are actually distinct types
note: struct `nalgebra::base::matrix::Matrix` is defined in crate `nalgebra`
    --> C:\Users\thepe\.cargo\registry\src\github.com-1ecc6299db9ec823\nalgebra-0.31.4\src\base\matrix.rs:162:1
     |
162  | pub struct Matrix<T, R, C, S> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: struct `nalgebra::Matrix` is defined in crate `nalgebra`
    --> C:\Users\thepe\.cargo\registry\src\github.com-1ecc6299db9ec823\nalgebra-0.30.1\src\base\matrix.rs:162:1
     |
162  | pub struct Matrix<T, R, C, S> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `nalgebra` are being used?

Reproduction:
Make a new cargo project, copy over the pof folder, and add pof = { path = "pof" } to the dependencies.

@qazwsxal
Copy link
Contributor Author

This appears to be caused by a dae-parser version bump (0.8.7->0.8.8) with a bump in nalgebra version. Unfortunately nalgebra 0.30 and 0.31 types appear to be incompatible.
digama0/dae-parser@4bae1ba

Bumping the nalgebra versions and pinning dae-parser to 0.8.8 seems to fix this issue.

@Baezon
Copy link
Owner

Baezon commented Feb 14, 2023

Ah, pof only specifies 0.8 for dae-parser so I haven't actually gotten this update. I'll update the versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants