Skip to content

fix(desktop): fail fast in just dev on Linux when Tauri native deps are missing - #4415

Open
maxitoon wants to merge 1 commit into
block:mainfrom
maxitoon:fix/4122-linux-tauri-deps
Open

fix(desktop): fail fast in just dev on Linux when Tauri native deps are missing#4415
maxitoon wants to merge 1 commit into
block:mainfrom
maxitoon:fix/4122-linux-tauri-deps

Conversation

@maxitoon

@maxitoon maxitoon commented Aug 2, 2026

Copy link
Copy Markdown

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 checks pkg-config and 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 dev path.

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

  • Added regression/contract coverage for the missing-dependency behavior.
  • Verified the test passes without a TMPDIR override, including on a host where /tmp is noexec.
  • Verified both scripts with bash -n.
  • Verified Justfile parsing and just dev prerequisite order.
  • 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.

…re missing

On Linux, just dev previously discovered missing GTK/WebKitGTK system
libraries deep inside the Tauri cargo build as a cryptic pkg-config
error. Add scripts/check-tauri-linux-deps.sh, a read-only guard wired
into the dev recipe that checks for pkg-config and the modules backing
the documented apt package list, then exits with the missing module
names and the documented install line. The guard is a no-op on
non-Linux platforms and never installs anything or calls sudo.

Cover the guard with scripts/test-check-tauri-linux-deps.sh (mocked
pkg-config over an isolated PATH, following the existing shell contract
test conventions) and run it in the CI contract-test job. Update the
CONTRIBUTING.md Linux section, which named just ci and the
desktop-tauri-* recipes but omitted the just dev path.

Refs block#4122

Signed-off-by: Hermes Agent <hermes-agent@localhost>
@maxitoon
maxitoon requested a review from a team as a code owner August 2, 2026 21:57
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.

Linux desktop dev setup (just dev) fails silently through a chain of missing native deps — not mentioned in README/CONTRIBUTING

1 participant