linebender / glazier

Deprecated Rust Window Creation Library
Apache License 2.0
206 stars 32 forks source link

AccessKit example fails to build on Linux #112

Closed xStrom closed 1 year ago

xStrom commented 1 year ago

The AccessKit example fails to even build on Linux (with both Wayland & X11). We had to disable Linux testing of it in #111.

Run cargo build --features x11,accesskit --no-default-features --example accesskit
 Downloading crates ...
  Downloaded accesskit v0.11.0
 Downloading crates ...
  Downloaded accesskit_macos v0.7.1
 Downloading crates ...
  Downloaded accesskit_windows v0.14.0
   Compiling glazier v0.7.0 (/home/runner/work/glazier/glazier)
   Compiling accesskit v0.11.0
error[E0599]: no method named `update_accesskit_if_active` found for enum `backend::linux::window::WindowHandle` in the current scope
    --> src/window.rs:436:16
     |
436  |         self.0.update_accesskit_if_active(update_factory)
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `WindowHandle`
     |
    ::: src/backend/linux/window.rs:233:1
     |
233  | pub(crate) enum WindowHandle {
     | ---------------------------- method `update_accesskit_if_active` not found for this enum
     |
note: the method `update_accesskit_if_active` exists on the type `x11::window::WindowHandle`
    --> src/backend/x11/window.rs:1457:5
     |
1457 | /     pub fn update_accesskit_if_active(
145[8](https://github.com/linebender/glazier/actions/runs/5486073995/jobs/9995685149#step:8:9) | |         &self,
145[9](https://github.com/linebender/glazier/actions/runs/5486073995/jobs/9995685149#step:8:10) | |         _update_factory: impl FnOnce() -> accesskit::TreeUpdate,
1460 | |     ) {
     | |_____^

For more information about this error, try `rustc --explain E0599`.
error: could not compile `glazier` (lib) due to previous error
Error: Process completed with exit code [10](https://github.com/linebender/glazier/actions/runs/5486073995/jobs/9995685149#step:8:11)1.

Moving forward this should be resolved. The example should at least build, even if that means an empty main function guarded by #[cfg]. Then we can have a unified CI that tests all examples on all platforms.