fix(dev): stop the Tauri dev app from killing concurrently's backend (bun desktop crash) (#745)
`bun desktop` runs concurrently[dev:api, dev:desktop] with --kill-others-on-fail. dev:api is a uvicorn backend on :3900, but the Tauri app launched by dev:desktop ALSO manages a backend — on boot it sees :3900 in use (and not yet healthy, because the dev backend is still importing torch + loading 32 models) and 'takes ownership', killing the dev:api process. That exits 137, which trips --kill-others-on-fail and tears the whole session down. The Tauri app already supports TAURI_SKIP_BACKEND to skip backend management (lib.rs:654) — it just wasn't wired for the concurrently-managed dev flow. Set it on dev:desktop so the dev app attaches to concurrently's backend instead of fighting it. Set only on dev:desktop (not dev:api, and not the standalone `frontend` desktop script, which legitimately self-manages the backend). bun's script shell evaluates the inline VAR=val cross-platform (verified), so no cross-env dep / lockfile churn. Prod (desktop-prod) is unaffected — there the Tauri app is the sole backend manager and orphan-kill is correct. Co-authored-by: mergetest <test@local> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
mergetest
Claude Opus 4.8
parent
4a01ecdfae
commit
fa66c6a025
+1
-1
@@ -8,7 +8,7 @@
|
||||
"setup:api": "uv sync && uv run python scripts/setup.py",
|
||||
"dev:api": "uv run uvicorn main:app --app-dir backend --host 0.0.0.0 --port 3900 --reload --reload-dir backend",
|
||||
"dev:frontend": "bun run --cwd frontend dev",
|
||||
"dev:desktop": "bun run --cwd frontend desktop",
|
||||
"dev:desktop": "TAURI_SKIP_BACKEND=1 bun run --cwd frontend desktop",
|
||||
"wait:api": "wait-on -t 300000 http-get://localhost:3900/system/info",
|
||||
"wait:frontend": "wait-on -t 120000 http://localhost:5173",
|
||||
"predev": "kill-port 3900 3901 || true",
|
||||
|
||||
Reference in New Issue
Block a user