Repository navigation
Lock @tauri-apps/api to the tauri crate's minor, and check the pair in CI - #572
Merged
Merged
Conversation
…n CI The v0.4.0 release run failed on all three platforms at "Build Tauri desktop" within two seconds: the Tauri CLI refuses to build when the Rust crate and its npm package are on different major.minor releases, and Cargo.lock has held tauri 2.12.1 since it was committed on 2026-10-02 while pnpm-lock.yaml still locked @tauri-apps/api 2.11.1. Only the release workflow runs `tauri build`, and CI's desktop jobs run `cargo check`, which never looks at npm, so nothing caught it. @tauri-apps/api moves to 2.12.4 (the package declares no dependencies, so the lockfile change is the importer entry and its integrity hash). The CLI stays at 2.11.4, which the check does not compare. Running the CLI against main's lockfiles reproduces the release failure exactly; against these it passes the check and goes on to build the web frontend and compile the crates. scripts/check-tauri-versions.sh reads both lockfiles and checks the pairs the CLI checks (tauri with @tauri-apps/api, and each tauri-plugin-<name> with @tauri-apps/plugin-<name> when both are locked), and fails if it cannot read a version rather than passing. CI's Smoke check job and the release workflow's Validate job run it, so a lockfile that moves one side now fails on the pull request instead of 30 minutes into a release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013J2EUgaGKdJEx9AhbrXLmS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unblocks the v0.4.0 release (#495).
What failed
Release run 42749626023 (full edition,
v0.4.0, frommain6bd5f6b) failed on all three platforms at Build Tauri desktop, two seconds into the step:Nothing was published. The release, Steam and Defender jobs were all skipped, and no tag was created.
Why nothing caught it
apps/desktop/src-tauri/Cargo.lockhas heldtauri2.12.1 since it was committed on 2026-10-02 (d1d3b87).pnpm-lock.yamlstill locked@tauri-apps/api2.11.1.Cargo.lock, so its build resolved a matching crate.tauri build. CI's desktop jobs runcargo check, which never looks at npm.The fix
@tauri-apps/api→ 2.12.4 (published 2026-10-14) inapps/desktop/package.jsonandpnpm-lock.yaml.@tauri-apps/apiat runtime; the CLI's check is the only consumer.@tauri-apps/clistays at 2.11.4. That is the CLI the last good release built with, and the check doesn't compare it.scripts/check-tauri-versions.shreads both lockfiles and checks the pairs the Tauri CLI checks:tauriwith@tauri-apps/api;tauri-plugin-<name>with@tauri-apps/plugin-<name>, when both are locked.It fails if it cannot read a version, rather than passing silently. It runs in two places:
docs/release-checklist.md: thevalidaterow now lists what that job actually checks.Closes #
Checklist
Tests and CI
pnpm install --frozen-lockfilewith the edited lockfile; no code under test changed)bash scripts/smoke-check.shDocumentation
# SPDX-License-Identifier: Apache-2.0headerTesting notes
main's lockfiles:pnpm --filter @convsim/desktop exec tauri build --config apps/desktop/src-tauri/tauri.steam.conf.json --no-bundleIt printed the same
tauri (v2.12.1) : @tauri-apps/api (v2.11.1)error.beforeBuildCommandbuilds the web frontend, and cargo starts compiling. It then stops atgdk-sys, because this container has no GTK system libraries. The release runner installs them in an earlier step.pnpm install --frozen-lockfilesucceeds on this branch. pnpm checked the hand-written integrity hash when it downloaded 2.12.4.scripts/check-tauri-versions.sh:main's lockfiles with the release run's exact pair;tauricrate on a different minor;scripts/*.sh;python3 scripts/project-structure.py validatepasses.Generated by Claude Code