build fails because of error in `floem_tiny_skia_renderer`
lucalewin opened this issue · 3 comments
lucalewin commented
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 commented
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 commented
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 commented
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. :)