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

build fails because of error in floem_tiny_skia_renderer #557

Open
lucalewin opened this issue Aug 21, 2024 · 3 comments
Open

build fails because of error in floem_tiny_skia_renderer #557

lucalewin opened this issue Aug 21, 2024 · 3 comments

Comments

@lucalewin
Copy link

I copied the draggable example into a new main file added floem 0.1.1 as dependency and tried cargo run but got this error which I think is something I cannot fix myself:

   Compiling floem_tiny_skia_renderer v0.1.0
error[E0308]: mismatched types
   --> /home/lucalewin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/floem_tiny_skia_renderer-0.1.0/src/lib.rs:425:58
    |
425 |                 let pixmap = self.cache_glyph(cache_key, glyph_run.color);
    |                                   -----------            ^^^^^^^^^^^^^^^ expected `floem_peniko::Color`, found `peniko::color::Color`
    |                                   |
    |                                   arguments to this method are incorrect
    |
    = note: `peniko::color::Color` and `floem_peniko::Color` have similar names, but are actually distinct types
note: `peniko::color::Color` is defined in crate `peniko`
   --> /home/lucalewin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/peniko-0.1.1/src/color.rs:13:1
    |
13  | pub struct Color {
    | ^^^^^^^^^^^^^^^^
note: `floem_peniko::Color` is defined in crate `floem_peniko`
   --> /home/lucalewin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/floem-peniko-0.1.0/src/color.rs:9:1
    |
9   | pub struct Color {
    | ^^^^^^^^^^^^^^^^
note: method defined here
   --> /home/lucalewin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/floem_tiny_skia_renderer-0.1.0/src/lib.rs:302:8
    |
302 |     fn cache_glyph(&mut self, cache_key: CacheKey, color: Color) -> Option<Rc<Glyph>> {
    |        ^^^^^^^^^^^                                 ------------

For more information about this error, try `rustc --explain E0308`.
error: could not compile `floem_tiny_skia_renderer` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
@dominikwilkowski
Copy link
Contributor

Latest floem hasn't been published to crates yet. The latest floem can be included in your Cargo.toml file like this:

[dependencies.floem]
features = ["editor", "rfd-async-std"]
git = "https://github.com/lapce/floem.git"
rev = "77030428d8fb19c599fcb83155fcb17a3b8754aa"

@lucalewin
Copy link
Author

It works now!
I assume when floem v0.1.1 was published, everything was working. What could have changed for this error to occur? Or was a faulty version published?

@dominikwilkowski
Copy link
Contributor

The team only published the 0.1.1 to get the documentation out there I think? Floem isn't being published (yet) frequently.
So a lot of changes have happened since. :)

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

No branches or pull requests

2 participants