Skip to content

fix: compile on Linux, and check that it does - #50

Closed
pathscale wants to merge 1 commit into
masterfrom
fix/compile-on-linux
Closed

pathscale wants to merge 1 commit into
masterfrom
fix/compile-on-linux

Conversation

@pathscale

Copy link
Copy Markdown
Owner

This crate does not build on Linux:

2656 |  callback(RawWindow { _marker: &marker });
     |           ^^^^^^^^^ missing `default_vbox` and `gtk_window`
error: could not compile `tauri-runtime-blitz` (lib) due to 4 previous errors

RawWindow is Tauri's escape hatch to the underlying native window, and on Linux and the BSDs its shape is a gtk::ApplicationWindow and a gtk::Box. This runtime draws with Blitz and owns no GTK window, so those fields cannot be filled with anything true.

The callback is skipped on those platforms. An embedder reaching for a GTK handle from a Blitz window is asking for something that does not exist, and it is better that its integration does not run than that it is handed a window belonging to something else.

Why CI did not catch it

The job named Linux never compiled anything for Linux. cargo tree resolves without building, and cargo package --no-verify skips the build by definition. So the crate stopped compiling there while every check stayed green, and it surfaced in a consumer instead, as four errors inside a dependency nobody had edited.

It now runs cargo check -p tauri-runtime-blitz --features agent-control, with the GTK headers that needs. That step is the point of this PR as much as the fix is.

How it was found

qa-inspect-host depends on this crate, so ps-qa could not be run on a Linux runner at all — which is what pathscale/ps-blitz#86 needs to drive its fixtures.

macOS is unaffected: cargo check --all-features is clean. I have no Linux machine here, so the new CI step is the verification.

`RawWindow` is Tauri's escape hatch to the underlying native window, and on
Linux and the BSDs its shape is a `gtk::ApplicationWindow` and a `gtk::Box`.
This runtime draws with Blitz and owns no GTK window, so those fields cannot be
filled with anything true, and constructing the struct without them is what kept
the crate from compiling there:

    missing `default_vbox` and `gtk_window`

The callback is skipped on those platforms instead. An embedder reaching for a
GTK handle from a Blitz window is asking for something that does not exist, and
it is better that its integration does not run than that it is handed a window
belonging to something else.

The job named Linux never compiled anything for it: `cargo tree` resolves
without building and `cargo package --no-verify` skips the build by definition.
So the crate stopped compiling on Linux while every check stayed green, and it
surfaced in a consumer instead, as four errors inside a dependency nobody had
edited. It now runs `cargo check`, with the GTK headers that needs.
@pathscale

Copy link
Copy Markdown
Owner Author

Superseded by #51, which fixes the cause rather than the symptom.

This PR made the window runtime compile on Linux. But a headless QA host opens no window and should never have been compiling that runtime in the first place, so the Linux build of it was never on the path that mattered. It also added GTK development headers to CI, which is exactly the wrong direction for a headless test.

#51 moves the inspection and activation surface out of runtime.rs, makes tauri optional, and leaves a headless consumer with zero window-stack crates in its graph.

@pathscale pathscale closed this Sep 6, 2026
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

Successfully merging this pull request may close these issues.

1 participant