fix(ci): use cargo update --workspace instead of generate-lockfile - #462
Merged
Conversation
cargo generate-lockfile regenerates the entire lockfile from scratch, resolving all dependencies to their latest compatible versions. This caused the tauri crate to jump from 2.10.3 to 2.11.0 while the npm @tauri-apps/api remained at 2.10.1, triggering a version mismatch error during the build. cargo update --workspace only updates workspace crate versions (the version we just patched) without touching third-party dependency resolutions, preserving the lockfile's pinned versions.
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
cargo generate-lockfilewithcargo update --workspacein the release workflow's version patching stepProblem
The release workflow's "Patch version" step ran
cargo generate-lockfile, which regenerates the entireCargo.lockfrom scratch. This resolvedtauri = "2"to the latest available version (2.11.0), while the npm@tauri-apps/apiremained locked at 2.10.1 viapnpm-lock.yaml. Tauri's build checks for major/minor version alignment between the Rust crate and the npm package, so the build failed with:Fix
cargo update --workspaceonly updates the version metadata for workspace crates (the desktop app version we just patched) without re-resolving third-party dependencies. This preserves the committed lockfile's pinnedtauri = 2.10.3, which is compatible with@tauri-apps/api = 2.10.1.Test plan
0.0.1-test.1after merging🤖 Generated with Claude Code