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

0.12.1 Failing to compile when included as dependency #2353

Closed
2 tasks done
yeastplume opened this issue Mar 25, 2024 · 1 comment
Closed
2 tasks done

0.12.1 Failing to compile when included as dependency #2353

yeastplume opened this issue Mar 25, 2024 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right
Milestone

Comments

@yeastplume
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Compiling a minimal project that includes iced and nothing else

[package]
name = "iced-test"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
iced = "0.12"

results in

error[E0053]: method `from` has an incompatible type for trait
   --> C:\Users\xxxx\.cargo\registry\src\index.crates.io-6f17d22bba15001f\iced_widget-0.12.3\src\container.rs:315:10
    |
315 |     ) -> Container<'a, Message, Theme, Renderer> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |          |
    |          expected `Element<'a, Message, Theme, Renderer>`, found `Container<'a, Message, Theme, Renderer>`
    |          help: change the output type to match the trait: `iced_renderer::iced_core::Element<'a, Message, Theme, Renderer>`
    |
    = note: expected signature `fn(container::Container<'_, _, _, _>) -> iced_renderer::iced_core::Element<'a, Message, Theme, Renderer>`
               found signature `fn(container::Container<'_, _, _, _>) -> container::Container<'a, Message, Theme, Renderer>`

error[E0308]: mismatched types
   --> C:\Users\xxxx\.cargo\registry\src\index.crates.io-6f17d22bba15001f\iced_widget-0.12.3\src\container.rs:316:9
    |
315 |     ) -> Container<'a, Message, Theme, Renderer> {
    |          --------------------------------------- expected `container::Container<'a, Message, Theme, Renderer>` because of return type
316 |         Element::new(column)
    |         ^^^^^^^^^^^^^^^^^^^^ expected `Container<'_, Message, Theme, Renderer>`, found `Element<'_, Message, Theme, Renderer>`
    |
    = note: expected struct `container::Container<'a, Message, Theme, Renderer>`
               found struct `iced_renderer::iced_core::Element<'_, Message, Theme, Renderer>`

Some errors have detailed explanations: E0053, E0308.
For more information about an error, try `rustc --explain E0053`.
error: could not compile `iced_widget` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

It looks like 0.12.1 is resolving iced-widget to a later 0.12.3:

PS D:\xxx\iced-test> cargo tree -i iced_widget
iced_widget v0.12.3
└── iced v0.12.1
    └── iced-test v0.1.0 (D:\Projects\grin-projects\iced-test)
PS D:\xxx\iced-test> 

What is the expected behavior?

Compilation

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

@yeastplume yeastplume added the bug Something isn't working label Mar 25, 2024
@hecrj
Copy link
Member

hecrj commented Mar 25, 2024

Can't reproduce. Those versions should be compatible, since they are just patches.

Try cargo update.

@hecrj hecrj closed this as completed Mar 25, 2024
@hecrj hecrj added the invalid This doesn't seem right label Mar 25, 2024
@hecrj hecrj added this to the 0.12.3 milestone Mar 25, 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 invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants