fix(desktop): sync release-pipeline fixes into main - #38
Merged
Conversation
A prior dependabot bump (ff189ac) took rand 0.8.6 -> 0.10.1 in Cargo.toml without updating the two call sites, silently breaking the desktop build on every platform (never caught because no tagged release had actually run desktop-release.yml until now). rand 0.10 renamed thread_rng() -> rng() and no longer re-exports RngCore at the crate root — filling a byte slice now goes through the RngExt trait's fill() method instead. Verified with `cargo check` and a release build against the exact resolved 0.10.1 source. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
VITE_EDITION=community vite build ... is POSIX inline-env-var syntax —
Windows cmd.exe can't parse it ('VITE_EDITION' is not recognized...),
so tauri-action's beforeBuildCommand failed on windows-latest before
even reaching the Rust compile. Wrapped with cross-env, which every
other package manager script in this monorepo already avoids needing
because none of them set an inline env var like this one does.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
PR #37 merged this branch partway through — before the last two fixes landed.
maincurrently still has both bugs that broke the v0.1.0 desktop build on every platform:apps/desktop/src-tauri/src/lib.rs: still callsrand::thread_rng()/ importsrand::RngCore, which don't exist in therand0.10.x that's now pinned (including the separate Dependabot bump to 0.10.2 that merged via chore(deps): Bump rand from 0.10.1 to 0.10.2 in /apps/desktop/src-tauri #30). Fixed to userand::rng()+ theRngExttrait's.fill().apps/desktop/package.json:build:frontendset an env var with POSIX-only syntax (VITE_EDITION=community vite build ...), which fails on Windows (cmd.execan't parse it). Wrapped withcross-env.Both are exactly what made the actual v0.1.0 release (tag pushed separately, already published) fail to build on every platform until fixed. Without this PR, the next tagged release from
mainwould hit the identical failures.Test plan
cargo checkand a full localcargo build --releaseagainst the actual resolvedrandversion — clean.npm run build:frontendlocally — builds correctly withcross-env.