Repository navigation
fix(desktop): stage the dev sidecar and ripgrep like the packaged bin layout - #197
Merged
GoDiao merged 2 commits intoOct 30, 2026
Merged
Conversation
… layout In dev mode the sidecar and ripgrep sat in desktop/binaries as dreamcoder-sidecar-<triple> and rg-<triple>, while the CLI looks for a file named rg next to its executable, so Glob and Grep failed unless a system rg was on PATH. Put them in desktop/binaries/<triple>/ under their packaged names, start the dev sidecar from there, and have electron-builder copy the target directory to bin/. Fixes GoDiao#195 Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
GoDiao
approved these changes
Oct 30, 2026
GoDiao
left a comment
Owner
There was a problem hiding this comment.
Thanks @pcbeingused333, this is the fix proposed in #195, and it is clean: the dev layout now matches the packaged one, electron-builder.json copies the whole target directory instead of renaming files one by one, and the old names are gone from the code and docs.
We ran it in the dev app on macOS (with no rg on PATH): the sidecar starts from binaries/aarch64-apple-darwin/, the file search finds files outside a git repo, and Glob and Grep work in a chat. The macOS and Windows packaging jobs pass too.
We pushed a merge of main on top to resolve the CHANGELOG conflict. Approving and merging. Thanks again!
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.
Closes #195
In dev mode the sidecar and ripgrep were staged as
desktop/binaries/dreamcoder-sidecar-<triple>anddesktop/binaries/rg-<triple>, while the CLI looks for a file namedrgnext to its own executable (src/utils/ripgrep.ts/ripgrepConfig.ts). So Glob and Grep only worked inbun run electron:devwhen a systemrghappened to be onPATH.This follows the proposal in #195: the dev layout now matches the packaged one, with the triple as a directory instead of a file-name suffix.
prepare-ripgrep.tscopies ripgrep todesktop/binaries/<triple>/rg[.exe](newdevBinariesDirhelper).build-sidecars.tswrites the sidecar todesktop/binaries/<triple>/dreamcoder-sidecar.electron/main.tsstarts the dev sidecar frombinaries/<hostTriple>/through a newdevSidecarPathshelper insidecar.ts, and uses that directory asappRoot, sorgsits next to the executable.electron-builder.jsoncopiesbinaries/<triple>tobinfor macOS and Windows instead of renaming the two files one by one.CONTRIBUTING_en.mdandCONTRIBUTING_zh.mdshow the new path;CHANGELOG.mdhas an entry (existing checkouts need one morebun run build:sidecars).ripgrepConfig.tsis unchanged, andDREAMCODER_TARGET_TRIPLEcross builds still do not overwrite the host build.Tests:
scripts/prepare-ripgrep.test.tscovers the staging directory, and the newdesktop/electron/devSidecarPaths.test.tscovers the dev sidecar and ripgrep paths (with and without.exe) and checks thatelectron-builder.jsoncopies each target directory tobin. The new tests fail onmain;bun test scripts/prepare-ripgrep.test.ts, the vitest files above andtsc -p electron/tsconfig.json --noEmitpass. Not run here:bun run build:sidecars,bun run electron:devwithout a systemrg, andelectron:packon macOS and Windows, so the packaging change still needs that check.This change was prepared with Claude Code (AI-assisted).
🤖 Generated with Claude Code