iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
24.93k stars 1.18k forks source link

Dose not build/doc with all features #639

Closed Mateholiker closed 4 years ago

Mateholiker commented 4 years ago

Since the 2.0 commit it is not possible to build/doc the crate with all features:

iced (master)> cargo build --all-features Compiling futures-io v0.3.5 Compiling adler32 v1.2.0 Compiling cache-padded v1.1.1 Compiling fastrand v1.3.5 Compiling parking v2.0.0 Compiling waker-fn v1.1.0 Compiling event-listener v2.4.0 Compiling vec-arena v0.5.2 Compiling async-task v3.0.0 Compiling send_wrapper v0.4.0 Compiling atomic-waker v1.0.0 Compiling parking v1.0.6 Compiling lzw v0.10.0 Compiling color_quant v1.0.1 Compiling pin-project-lite v0.2.0 Compiling scoped_threadpool v0.1.9 Compiling checked_int_cast v1.0.0 Compiling adler v0.2.3 Compiling matches v0.1.8 Compiling float-cmp v0.5.3 Compiling xmlparser v0.13.3 Compiling siphasher v0.2.3 Compiling unicode-script v0.5.2 Compiling unicode-vo v0.1.0 Compiling rctree v0.3.3 Compiling base64 v0.12.3 Compiling xmlwriter v0.1.0 Compiling sw-composite v0.7.13 Compiling glow v0.6.1 Compiling kurbo v0.6.3 Compiling futures-channel v0.3.5 Compiling concurrent-queue v1.2.2 Compiling miniz_oxide v0.3.7 Compiling inflate v0.4.5 Compiling async-mutex v1.3.0 Compiling unicode-bidi v0.3.4 Compiling data-url v0.1.0 Compiling miniz_oxide v0.4.1 Compiling gif v0.10.3 Compiling svgtypes v0.5.0 Compiling roxmltree v0.11.0 Compiling crc32fast v1.2.0 Compiling phf v0.8.0 Compiling multitask v0.2.0 Compiling async-channel v1.4.2 Compiling socket2 v0.3.15 Compiling shared_library v0.1.9 Compiling memmap2 v0.1.0 Compiling num-traits v0.2.12 Compiling polling v0.1.9 Compiling kv-log-macro v1.0.7 Compiling simplecss v0.2.0 Compiling deflate v0.8.6 Compiling tiff v0.5.0 Compiling deflate v0.7.20 Compiling futures-lite v0.1.11 Compiling flate2 v1.0.17 Compiling tokio v0.3.4 Compiling mio v0.6.22 Compiling osmesa-sys v0.1.2 Compiling calloop v0.6.5 Compiling wayland-sys v0.28.2 Compiling png v0.16.7 Compiling png v0.15.3 Compiling approx v0.3.2 Compiling euclid v0.22.1 Compiling num-integer v0.1.43 Compiling sid v0.6.1 Compiling ordered-float v1.1.0 Compiling spirv_headers v1.5.0 Compiling euclid v0.20.14 Compiling gfx-memory v0.2.0 Compiling gfx-backend-vulkan v0.6.1 Compiling gfx-backend-empty v0.6.0 Compiling gfx-descriptor v0.2.0 Compiling async-io v0.1.11 Compiling blocking v0.5.2 Compiling xcb v0.9.0 Compiling wayland-commons v0.28.2 Compiling glyph_brush_layout v0.2.0 Compiling mio-extras v2.0.6 Compiling num-iter v0.1.41 Compiling num-rational v0.3.0 Compiling lyon_geom v0.16.2 Compiling guillotiere v0.6.0 Compiling lyon_geom v0.15.3 Compiling async-executor v0.1.2 Compiling pathfinder_geometry v0.5.1 Compiling glutin_glx_sys v0.1.7 Compiling glutin_egl_sys v0.1.5 Compiling clipboard_x11 v0.1.0 Compiling twox-hash v1.5.0 Compiling futures-util v0.3.5 Compiling rgb v0.8.25 Compiling naga v0.2.0 Compiling wayland-client v0.28.2 Compiling lyon_path v0.16.2 Compiling raqote v0.8.0 Compiling wasm-bindgen v0.2.68 Compiling jpeg-decoder v0.1.20 Compiling svgfilters v0.1.0 Compiling lyon_algorithms v0.16.0 Compiling lyon_tessellation v0.16.2 Compiling smithay-client-toolkit v0.11.0 Compiling glyph_brush v0.7.0 Compiling harfbuzz-sys v0.3.4 Compiling js-sys v0.3.45 Compiling image v0.23.9 Compiling wayland-cursor v0.28.2 Compiling wayland-protocols v0.28.2 Compiling wayland-egl v0.28.2 Compiling wgpu-core v0.6.3 Compiling lyon v0.16.2 Compiling harfbuzz_rs v1.2.0 Compiling font-kit v0.8.0 Compiling palette v0.5.0 Compiling smithay-clipboard v0.5.2 Compiling futures-executor v0.3.5 Compiling usvg v0.9.1 Compiling glow_glyph v0.4.0 Compiling web-sys v0.3.45 Compiling clipboard_wayland v0.1.1 Compiling qrcode v0.12.0 Compiling futures v0.3.5 Compiling iced_core v0.3.0 (/home/jan/uni/Rust/GUI/iced/core) Compiling window_clipboard v0.1.2 Compiling smithay-client-toolkit v0.12.0 Compiling iced_style v0.2.0 (/home/jan/uni/Rust/GUI/iced/style) Compiling resvg v0.9.2 Compiling wgpu v0.6.0 Compiling winit v0.23.0 Compiling glutin v0.25.1 Compiling gloo-timers v0.2.1 Compiling wgpu_glyph v0.10.0 Compiling futures-timer v3.0.2 Compiling async-std v1.6.3 Compiling iced_futures v0.2.0 (/home/jan/uni/Rust/GUI/iced/futures) Compiling iced_native v0.3.0 (/home/jan/uni/Rust/GUI/iced/native) Compiling iced_graphics v0.1.0 (/home/jan/uni/Rust/GUI/iced/graphics) Compiling iced_winit v0.2.0 (/home/jan/uni/Rust/GUI/iced/winit) Compiling iced_wgpu v0.3.0 (/home/jan/uni/Rust/GUI/iced/wgpu) Compiling iced_glow v0.1.0 (/home/jan/uni/Rust/GUI/iced/glow) Compiling iced_glutin v0.1.0 (/home/jan/uni/Rust/GUI/iced/glutin) error[E0599]: no method named to_bgra8 found for enum image::DynamicImage in the current scope --> wgpu/src/image/raster.rs:46:40 | 46 | Memory::Host(image.to_bgra8()) | ^^^^^^^^ help: there is an associated function with a similar name: to_bgra

error[E0599]: no method named to_bgra8 found for enum image::DynamicImage in the current scope --> wgpu/src/image/raster.rs:53:40 | 53 | Memory::Host(image.to_bgra8()) | ^^^^^^^^ help: there is an associated function with a similar name: to_bgra

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0599. error: could not compile iced_wgpu.

To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: build failed

Mateholiker commented 4 years ago

The solution suggested by the compiler to call to_bgra() instead seems to work

hecrj commented 4 years ago

to_bgra has been deprecated in the image crate. You may need to run cargo update.

Mateholiker commented 4 years ago

Thanks a lot now it works