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

macroquad-particles = "0.2" Will not compile #676

Closed
TheDanielPBerry opened this issue Dec 26, 2023 · 4 comments
Closed

macroquad-particles = "0.2" Will not compile #676

TheDanielPBerry opened this issue Dec 26, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@TheDanielPBerry
Copy link

Compiling macroquad-particles v0.2.0
error[E0574]: expected struct, variant or union type, found enum 'ShaderSource'
--> /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-particles-0.2.0/src/lib.rs:568:17
|
568 | ShaderSource {
| ^^^^^^^^^^^^ not a struct, variant or union type

error[E0574]: expected struct, variant or union type, found enum 'ShaderSource'
--> /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-particles-0.2.0/src/lib.rs:610:17
|
610 | ShaderSource {
| ^^^^^^^^^^^^ not a struct, variant or union type

error[E0061]: this method takes 3 arguments but 2 arguments were supplied
--> /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-particles-0.2.0/src/lib.rs:642:17
|
642 | ctx.texture_set_filter(color_img, FilterMode::Nearest);
| ^^^^^^^^^^^^^^^^^^-------------------------------- an argument of type 'MipmapFilterMode' is missing
|
note: method defined here
--> /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/miniquad-0.4.0-alpha.10/src/graphics.rs:1125:8
|
1125 | fn texture_set_filter(
| ^^^^^^^^^^^^^^^^^^
help: provide the argument
|
642 | ctx.texture_set_filter(color_img, FilterMode::Nearest, /* MipmapFilterMode */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some errors have detailed explanations: E0061, E0574.
For more information about an error, try 'rustc --explain E0061'.
error: could not compile 'macroquad-particles' (lib) due to 3 previous errors

@not-fl3
Copy link
Owner

not-fl3 commented Dec 26, 2023

d17bee1#diff-c71544a874a6019b9949df6e660e8b78dd5c90a400242ec1170e441533a4e591 this might be the code of the fix, but apparently it did not made it to crates.io

Will fix soon!

@not-fl3 not-fl3 added the bug Something isn't working label Dec 26, 2023
@Shelim
Copy link

Shelim commented Jan 27, 2024

Seeing the same problem a month later.

Workaround:

Put this in Cargo.toml

[dependencies]
macroquad = "0.4"
macroquad-particles = { git = "https://github.com/not-fl3/macroquad" }

This is enough for the rust to pickup correct dependency from subdirectory (see confirmation on cargo here )

Any ETA on fix of crates.io version? :)

@aceArt-GmbH
Copy link

Current error after cargo add macroquad macroquad-particles

Error
error[E0659]: `RenderPass` is ambiguous
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-particles-0.2.1/src/lib.rs:506:27
    |
506 |     post_processing_pass: RenderPass,
    |                           ^^^^^^^^^^ ambiguous name
    |
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `RenderPass` could refer to the struct imported here
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-particles-0.2.1/src/lib.rs:1:5
    |
1   | use macroquad::prelude::*;
    |     ^^^^^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `RenderPass` to disambiguate
note: `RenderPass` could also refer to the struct imported here
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-particles-0.2.1/src/lib.rs:2:5
    |
2   | use macroquad::window::miniquad::*;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `RenderPass` to disambiguate

error[E0308]: mismatched types
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-particles-0.2.1/src/lib.rs:680:13
    |
680 |             post_processing_pass,
    |             ^^^^^^^^^^^^^^^^^^^^ expected `macroquad::texture::RenderPass`, found `macroquad::miniquad::RenderPass`
    |
    = note: `macroquad::miniquad::RenderPass` and `macroquad::texture::RenderPass` have similar names, but are actually distinct types
note: `macroquad::miniquad::RenderPass` is defined in crate `miniquad`
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/miniquad-0.4.5/src/graphics.rs:556:1
    |
556 | pub struct RenderPass(usize);
    | ^^^^^^^^^^^^^^^^^^^^^
note: `macroquad::texture::RenderPass` is defined in crate `macroquad`
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-0.4.11/src/texture.rs:347:1
    |
347 | pub struct RenderPass {
    | ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-particles-0.2.1/src/lib.rs:944:22
    |
944 |                 Some(self.post_processing_pass),
    |                 ---- ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `macroquad::miniquad::RenderPass`, found `macroquad::texture::RenderPass`
    |                 |
    |                 arguments to this enum variant are incorrect
    |
    = note: `macroquad::texture::RenderPass` and `macroquad::miniquad::RenderPass` have similar names, but are actually distinct types
note: `macroquad::texture::RenderPass` is defined in crate `macroquad`
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-0.4.11/src/texture.rs:347:1
    |
347 | pub struct RenderPass {
    | ^^^^^^^^^^^^^^^^^^^^^
note: `macroquad::miniquad::RenderPass` is defined in crate `miniquad`
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/miniquad-0.4.5/src/graphics.rs:556:1
    |
556 | pub struct RenderPass(usize);
    | ^^^^^^^^^^^^^^^^^^^^^
help: the type constructed contains `macroquad::texture::RenderPass` due to the type of the argument passed
   --> /home/tux/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macroquad-particles-0.2.1/src/lib.rs:944:17
    |
944 |                 Some(self.post_processing_pass),
    |                 ^^^^^-------------------------^
    |                      |
    |                      this argument influences the type of `Some`
note: tuple variant defined here
   --> /home/tux/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:579:5
    |
579 |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^

Some errors have detailed explanations: E0308, E0659.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `macroquad-particles` (lib) due to 3 previous errors

@cyrgani
Copy link
Contributor

cyrgani commented Jul 15, 2024

This is already fixed in the latest commit to macroquad-particles (52cac9b), but the new version wasn't released on crates.io yet.

@not-fl3 not-fl3 closed this as completed Sep 30, 2024
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

No branches or pull requests

5 participants