This patch fixes build-script caching on Linux distributions whose /bin/sh is dash, such as Debian and Ubuntu. In 0.23.0, a dependent build script there could miss the DEP_* metadata a links dependency passed down. Tauri apps failed to build as a result. Build scripts now start through a small native launcher that ships inside kache, and their runs are still cached.
cargo install kache --locked --version 0.23.1Homebrew, APT, AUR, winget, Scoop, Chocolatey, mise, Nix, and the GitHub release binaries also ship 0.23.1.
Fixed
-
build scripts: a dependent build script receives every
DEP_*variable, including names with:,-or.. In 0.23.0, kache put a#!/bin/shlauncher in place of each cached build script. Dash drops environment variables whose names are not shell identifiers, and Cargo spellslinksmetadata keys as the script printed them. Tauri printscargo:core:window__CORE_PLUGIN___PERMISSION_FILES_PATH=..., so its app build scripts failed with:Permission core:window:allow-start-dragging not found, expected one of ..., core:default, ...macOS was not affected, because its
/bin/shis bash. The launcher is now a native program that passes Cargo's environment on unchanged. It is 26 KB per build script in the static Linux release builds and adds about 165 µs per launch, against about 1.65 ms for the shell script. (#1089 by @jleni)A target directory where 0.23.0 installed launchers keeps them until those build scripts compile again. Fresh CI checkouts are not affected. On a machine with a long-lived target directory, clean it once:
cargo clean
Contributors
Full changelog: v0.23.0...v0.23.1