github kunobi-ninja/kache v0.23.1
v0.23.1: build-script DEP variables under dash, Tauri builds on Debian and Ubuntu

5 hours ago

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.1

Homebrew, 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/sh launcher in place of each cached build script. Dash drops environment variables whose names are not shell identifiers, and Cargo spells links metadata keys as the script printed them. Tauri prints cargo: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/sh is 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

jleni

Full changelog: v0.23.0...v0.23.1

Don't miss a new kache release

NewReleases is sending notifications on new releases.