Repository navigation
feat(packaging): ship awatcher in the non-Tauri Linux bundle - #1531
Conversation
The PyInstaller aw-qt bundle only merged aw-watcher-window, aw-watcher-input and aw-notify, so a stock Linux install on Wayland had no watcher that can report window activity. aw-qt#142 detects Wayland and substitutes a module named aw-watcher-window-wayland, but the bundle shipped neither that module nor awatcher, so it degraded to a warning and recorded nothing. Build the pinned awatcher submodule for Linux non-Tauri builds and copy it into dist/activitywatch as a top-level `aw-awatcher` executable, where aw-qt's bundled-module discovery finds it (executables named aw-* next to aw-qt). The copy fails closed so a Linux bundle can never silently ship without it. awatcher is Rust, so it is excluded when SKIP_SERVER_RUST=true (those CI legs skip the Rust toolchain). Tauri builds are unchanged: they already stage the same binary into aw-tauri/src-tauri/modules/. Cache awatcher/target alongside aw-server-rust/target in the two jobs that build it, to keep the extra Rust build off the critical path. Refs ActivityWatch#92
|
Note on the red Tauri legs: they fail at the pin guard, not in this change. master's top-level |
[High impact] Adds a new Rust component to the Linux release build pipeline. Fix the Linux Tauri build with both skip flags before merging. Findings
SummaryThis PR builds
TimeToBuildBob explicitly deferred teaching Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Linux build] --> B{Tauri build?}
B -->|No| C[Build awatcher unless Rust is skipped]
C --> D[Copy as aw-awatcher unless Rust is skipped]
B -->|Yes| E{Rust skipped?}
E -->|No| F[Build awatcher]
E -->|Yes| G[Skip awatcher]
F --> H[Stage watcher for Tauri]
G --> I[Staging fails if binary is missing]
Reviews (1) · Last reviewed commit: "feat(packaging): ship awatcher in the no..." · Reviewed by Greptile |
The Tauri staging block required awatcher/target/<targetdir>/awatcher unconditionally, but awatcher is now filtered out of SUBMODULES whenever SKIP_SERVER_RUST=true (it is Rust too). A Linux Tauri build with that flag therefore stopped before building aw-tauri even though aw-sync already degrades gracefully in the same situation. Mirror the aw-sync branch: stage awatcher when the binary exists (e.g. from the build cache), skip silently when SKIP_SERVER_RUST=true, and keep failing closed otherwise. Verified with make -n for Tauri/non-Tauri and skip/no-skip, plus a shell replay of the staging loop (missing binary + skip -> build proceeds; missing binary without skip -> exit 1; cached binary + skip -> staged). Git-Session-Id: 3a4e72d5-a63f-50a9-8cd3-149e50e744e5
awatcher's cctk dependency builds smithay-client-toolkit, whose build script runs pkg-config for xkbcommon. The Qt runner and the manylinux container do not ship the headers, so the awatcher build fails with: pkg-config exited with status code 1 > pkg-config --libs --cflags xkbcommon Add libxkbcommon-dev (apt) and libxkbcommon-devel (dnf) alongside the other X11/Qt development packages. Git-Session-Id: fd0e9fee-f902-4513-956c-6d49e7501af8
|
Two follow-ups pushed after the first run:
|
|
The Qt legs now pass with the awatcher build in place, and the artifact is verified:
The Greptile P1 thread is resolved: The only red checks are the three Tauri legs, and they fail at the pin guard, not in this diff: Master's top-level submodule moved in the 2026-10-16 nightly bump without aw-tauri's Merge order: #1529 first, then this branch needs a rebase onto master so its gitlink matches the Tauri lock; after that the Tauri legs here should go green without any further code change. |
🤖 AI code reviewSafe to merge — no P0/P1 findings on latest reviewUpdated after inline dispositions on finding threads — this is the current state; the verdict below is frozen at review time and is kept as the historical record of that pass. Finding disposition
Adds awatcher to the Linux non-Tauri build's SUBMODULES, builds it, and copies the resulting binary into dist/activitywatch as aw-awatcher during packaging. Excludes awatcher from PACKAGEABLES and from SUBMODULES when SKIP_SERVER_RUST is true. Caches awatcher/target in two release-workflow jobs and adds libxkbcommon development packages. Needs a look — P2 onlyConfidence 4/5 2 findings ·
|
What
Builds the pinned
awatchersubmodule for Linux non-Tauri builds and ships it in the PyInstaller bundle as a top-levelaw-awatcherexecutable.Why
Erik on #92 (2026-10-17): "Get on implementing Wayland support in aw-qt, should be as easy as bundling awatcher or something and adding the detection to aw-qt."
The two halves are currently split:
aw-watcher-window-wayland, degrading with a warning when none is installed.aw.spec) merges onlyaw-watcher-window,aw-watcher-inputandaw-notify. The rootMakefileaddsawatchertoSUBMODULESonly underTAURI_BUILD=true, staged intoaw-tauri/src-tauri/modules/.So a stock Linux aw-qt install on Wayland hits the #142 warning path and records nothing. This PR closes the bundling half.
How
awatchertoSUBMODULESfor Linux non-Tauri builds (macOS/Windows unchanged; Tauri unchanged).dist/activitywatch/aw-awatcherin thepackagetarget. aw-qt discovers bundled modules by scanning its own directory for executables namedaw-*, so a top-levelaw-awatcheris picked up with no aw-qt change.awatcherfrom the genericPACKAGEABLESloop (it is copied explicitly) and fromSUBMODULESwhenSKIP_SERVER_RUST=true(those CI legs skip the Rust toolchain).awatcher/targetnext toaw-server-rust/targetin the two jobs that build it.Verification
make -n packageemits the copy +test -xguard;make -n package TAURI_BUILD=trueandSKIP_SERVER_RUST=trueemit neither.make -pn buildshowsSUBMODULESending inawatcherfor the Linux non-Tauri case and unchanged for Tauri.aw-awatcher. This PR's own run exercises the build + package path.Follow-up (not in this PR)
ActivityWatch/aw-qt needs a small change so
_apply_wayland_substitutions()acceptsaw-awatcheras well asaw-watcher-window-wayland— without it the bundled binary is present but not selected. Tracked in the local task; will open separately against aw-qt (based on #142 if it has not merged).Refs #92