Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Dev mode can't find the bundled ripgrep: align desktop/binaries with the packaged layout

クローズ
#195 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@pcbeingused333 がすでに取り組んでいます。

2026年10月28日 から。

  • #197 @pcbeingused333 による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bun, electron, typescript

調査の方向性

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 の本文から書いたものです。

説明

area:desktop bug difficulty:2 good first issue help wanted

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 to binaries/<triple>/rg[.exe].
  • desktop/scripts/build-sidecars.ts (line 31) writes the sidecar to binaries/<triple>/dreamcoder-sidecar.
  • desktop/electron/main.ts (line 109) starts the dev sidecar from binaries/<hostTriple>/dreamcoder-sidecar[.exe].
  • desktop/electron-builder.json copies binaries/<triple>/ to bin/ 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.md and docs/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 rg on PATH (for example PATH=/usr/bin:/bin), run bun run build:sidecars and bun run electron:dev. In a session, a Glob or Grep call returns results.
  • Add or update tests for the new paths in prepare-ripgrep and the dev sidecar path.
  • bun run electron:pack on macOS still puts dreamcoder-sidecar and rg side by side in DreamCoder.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 in desktop/binaries/ can be deleted.
主要言語
TypeScript
スター
490
フォーク
47
平均マージ
10時間 40分
マージ済み PR(30日)
83

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GoDiao/dreamcoder のほかの issue

GoDiao/dreamcoder の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。