fix: reuse target-specific sidecar binaries#396
Closed
webees wants to merge 1 commit into
Closed
Conversation
Contributor
|
This PR fixes a sidecar binary lookup edge case where explicitly-set Code review:
Suggestions: None — the change is focused, correct, and well-scoped. |
6b09111 to
74b3b2d
Compare
74b3b2d to
429c7d1
Compare
Owner
|
Hi there :) This script is not used in the CI. No need for this change |
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.
Which issue does this PR fix?
No linked issue.
This fixes a sidecar lookup edge case in
copy-proxy-binary.mjs: whenTARGETis explicitly set and equals the host Rust target, the script previously still usedsrc-tauri/target/{debug,release}. Release workflows often build sidecars with an explicit--target, which writes them tosrc-tauri/target/${TARGET}/{debug,release}instead.On Apple Silicon runners this matters for
TARGET=aarch64-apple-darwin, because the explicit target can be the same as the host target. Without this change, a prebuilt sidecar intarget/aarch64-apple-darwin/releasecan be missed, andbeforeBuildCommandmay rebuilddonut-proxy/donut-daemoneven though the target-specific artifacts already exist.Benefits:
beforeBuildCommand.TARGETis not explicitly set.How to test
node --check src-tauri/copy-proxy-binary.mjsPROFILE=release TARGET=aarch64-apple-darwin node src-tauri/copy-proxy-binary.mjscopies fromtarget/aarch64-apple-darwin/releasewhen those sidecar binaries already exist.rustc/cargofixture that a missing explicit host-target sidecar is built with--target aarch64-apple-darwinand then copied fromtarget/aarch64-apple-darwin/release.Checklist
pnpm format && pnpm lint && pnpm testlocally and it passesAI usage
AI was used to identify the release-build sidecar lookup issue and draft the focused fix.