Dev mode can't find the bundled ripgrep: align desktop/binaries with the packaged layout
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bun, electron, typescript
- 領域
- build-system, desktop
調査の方向性
Start with scripts/prepare-ripgrep.ts, desktop/scripts/build-sidecars.ts, and desktop/electron/main.ts to trace where the development binaries are written and launched. Then read desktop/electron-builder.json and the two CONTRIBUTING guides to check the packaged layout and documented paths. Update the paths to use a triple-named directory, add or update the requested path tests, and verify the macOS and Windows package layouts.
索引モデルが issue の本文から書いたものです。
説明
Problem
In dev mode (bun run electron:dev), search tools such as Glob and Grep can fail with:
ripgrep is not available. Install ripgrep and ensure rg --version works in this environment.
The installed app is not affected. Whether dev mode works depends on whether a real rg happens to be on the PATH of the shell that started it. For example, it works when started from a Codex shell, because Codex adds its own rg to PATH, and fails from a shell without one.
Cause
The dev layout of desktop/binaries differs from the packaged layout:
| Sidecar | ripgrep | |
|---|---|---|
Dev (desktop/binaries/) |
dreamcoder-sidecar-aarch64-apple-darwin |
rg-aarch64-apple-darwin |
Packaged (Resources/bin/) |
dreamcoder-sidecar |
rg |
At runtime the CLI looks for a file named rg next to its own executable (src/utils/ripgrepConfig.ts:29). In the packaged app that file exists. In dev mode it is named rg-<triple>, so the lookup fails and falls back to the system PATH.
The vendor/ripgrep/<platform>/rg fallback (src/utils/ripgrepConfig.ts:33) does not help either. Inside the compiled sidecar, sourceRoot is derived from import.meta.url, which points into Bun's embedded filesystem rather than the checkout.
The target-triple suffix is left over from Tauri, which required it for external binaries. Electron does not need it.
Proposed fix
Make the dev layout match the packaged one, with the triple as a directory instead of a file-name suffix:
desktop/binaries/<triple>/dreamcoder-sidecar[.exe]
desktop/binaries/<triple>/rg[.exe]
scripts/prepare-ripgrep.ts(around line 132) copies ripgrep tobinaries/<triple>/rg[.exe].desktop/scripts/build-sidecars.ts(line 31) writes the sidecar tobinaries/<triple>/dreamcoder-sidecar.desktop/electron/main.ts(line 109) starts the dev sidecar frombinaries/<hostTriple>/dreamcoder-sidecar[.exe].desktop/electron-builder.jsoncopiesbinaries/<triple>/tobin/for each platform, instead of renaming the two files one by one (lines 52-57 for macOS, 92-97 for Windows).- Update the path in
docs/CONTRIBUTING_en.mdanddocs/CONTRIBUTING_zh.md(line 155).
Keeping the triple as a directory means a cross-target build with DREAMCODER_TARGET_TRIPLE still does not overwrite the host build.
Please don't teach ripgrepConfig.ts to look for rg-<triple>. That would put build-script naming into the CLI's runtime lookup for the sake of dev mode only.
How to check
- With no
rgonPATH(for examplePATH=/usr/bin:/bin), runbun run build:sidecarsandbun run electron:dev. In a session, a Glob or Grep call returns results. - Add or update tests for the new paths in
prepare-ripgrepand the dev sidecar path. bun run electron:packon macOS still putsdreamcoder-sidecarandrgside by side inDreamCoder.app/Contents/Resources/bin/. Windows needs the same check for the NSIS build.- Existing checkouts need one more
bun run build:sidecars. The old suffixed files indesktop/binaries/can be deleted.
- 主要言語
- TypeScript
- スター
- 490
- フォーク
- 47
- 平均マージ
- 10時間 40分
- マージ済み PR(30日)
- 83
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GoDiao/dreamcoder のほかの issue
-
[good first issue] UX polish — friendlier copy for error toasts and empty states対応中かも @iamcipherdev が 14 日前に担当しました。 オープンarea:i18n area:ux difficulty:1 good first issue mentor-available
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
GoDiao/dreamcoder#9 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Add more provider presets (Groq / OpenRouter / SiliconFlow / etc.)再び着手できるかも @01iamysf が 22 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンarea:desktop area:provider difficulty:1 good first issue mentor-available
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
GoDiao/dreamcoder#6 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
-
area:desktop area:ux difficulty:2 enhancement help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
GoDiao/dreamcoder#218 ·
メンテナーはふだん 1 日以内に返信
-
area:desktop bug difficulty:2 help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
GoDiao/dreamcoder#217 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
GoDiao/dreamcoder#216 ·
メンテナーはふだん 1 日以内に返信
GoDiao/dreamcoder の issue をすべて見る
似ている issue
-
Replace discontinued crypto-js in the theme対応中かも @aelmanaa が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
PaloAltoNetworks/docusaurus-openapi-docs#1689 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
solana-foundation/solana-web3.js#4015 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
ivopogace/opencode-courier#422 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
chapel-lang/chapel-vscode#158 ·
メンテナーはふだん 1 日以内に返信