fix(desktop): fail fast in just dev on Linux when Tauri native deps are missing
Bug Description
On Linux, just dev could reach the Tauri Cargo build before reporting missing GTK/WebKitGTK and related native development libraries. The resulting pkg-config failure was late and difficult to remediate.
Fixes #4122
Root Cause
The documented Linux package prerequisites existed, but just dev did not validate them before running its bootstrap, migration and build prerequisites.
Fix
- Add
scripts/check-tauri-linux-deps.sh, a read-only Linux preflight that checkspkg-configand the required Tauri modules. - Make the guard the first prerequisite of
just dev. - Keep the guard a silent no-op on non-Linux platforms.
- Report all missing modules and the documented Debian/Ubuntu install command; never install packages or invoke
sudo. - Add a portable shell contract test covering non-Linux no-op, missing
pkg-config, missing one or more modules and the all-present path. - Run the contract test in CI.
- Update the Linux contributor documentation to describe the actual
just devpath.
How to Verify
bash -n scripts/check-tauri-linux-deps.sh scripts/test-check-tauri-linux-deps.sh
bash scripts/test-check-tauri-linux-deps.sh
just --summary
just -n dev
The dry-run should begin with:
./scripts/check-tauri-linux-deps.sh
Test Plan
- [x] Added regression/contract coverage for the missing-dependency behavior.
- [x] Verified the test passes without a
TMPDIRoverride, including on a host where/tmpisnoexec. - [x] Verified both scripts with
bash -n. - [x] Verified Justfile parsing and
just devprerequisite order. - [x] Verified the real Linux host reports its missing native modules and remediation command.
- [ ] Full
just ci/ Rust / Flutter / Docker suite — unavailable in the contributor container because the required toolchains and Docker are not installed.
Risk Assessment
Low — the change is limited to a read-only preflight, one just dev prerequisite, documentation and a CI contract test. Non-Linux platforms exit successfully without output, and no package manager, network call or privileged command is executed.
Scope Notes
This is intentionally limited to just dev native dependency detection and does not overlap with the separate buzz doctor work in #4063.