Skip to content

🐋🔧:install ripgrep so Todo Tree can find one - #1783

Merged
OpenINFbot merged 2 commits into
livefrom
fix/todo-tree-ripgrep
Aug 9, 2026
Merged

OpenINFbot merged 2 commits into
livefrom
fix/todo-tree-ripgrep

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

🐋 dev container
🔧 bug fix

Why

The Todo Tree extension fails to start on every attach:

Todo-Tree: Failed to find vscode-ripgrep - please install ripgrep manually
and set 'todo-tree.ripgrep' to point to the executable

Reading the extension's bundled ripgrepPath(), it tries the configured
todo-tree.ripgrep path first, then four hardcoded locations under
vscode.env.appRoot: node_modules and node_modules.asar.unpacked,
each joined with vscode-ripgrep/bin/rg or @vscode/ripgrep/bin/rg.
Current VS Code ships @vscode/ripgrep-universal/bin/<arch>/rg, which
matches none of the four, and this container has no rg of its own -- so
every candidate misses and the extension gives up.

What this does

Two changes, because each probe is a bare fs.existsSync and none of
them consults PATH
-- installing the binary alone would not have fixed
this:

  • Dockerfile: adds ripgrep to the existing apt call. Debian trixie
    packages 14.1.1, so it earns its place next to fish on exactly the
    reasoning already written there -- one apt call for something the
    distribution already ships, baked into a cached layer, no feature
    needed. Left unpinned per the same file's DL3008 note.
  • devcontainer.json: sets "todo-tree.ripgrep": "/usr/bin/rg".

The setting goes in devcontainer.json rather than
.vscode/settings.json because it is an absolute container path, and that
file is shared with anyone opening the repo outside this container, where
/usr/bin/rg is usually wrong (Homebrew uses /opt/homebrew/bin). Being
wrong there is harmless -- a failed existsSync just falls through -- but
it would still assert something untrue of that environment. Same split
#1779 just landed for dprint.path.

Test plan

  • apt-get install ripgrep in the running container lands at
    /usr/bin/rg; rg --version reports 14.1.1.
  • Replicated the extension's check: fs.existsSync("/usr/bin/rg") is
    true and the executable bit is set, so the configured path wins on
    the first candidate.
  • nps verify.dockerfile (dprint), verify.json (biome), and
    verify.valid-for-ec all exit 0, re-run after rebasing onto the v5
    base image and the build(deps-dev): bump all #1780/chore(deps): lock file maintenance #1782 dependency bumps.
  • Todo Tree starts without the error after a container rebuild
    (the settings block is seeded at create time, so a reload alone will
    not pick it up).

🤖 Generated with Claude Code

The extension fails to start on every attach:

    Todo-Tree: Failed to find vscode-ripgrep - please install ripgrep
    manually and set 'todo-tree.ripgrep' to point to the executable

It resolves `rg` by trying, in order, the configured todo-tree.ripgrep
path, then four hardcoded locations under vscode.env.appRoot:
node_modules and node_modules.asar.unpacked, each joined with either
vscode-ripgrep/bin/rg or @vscode/ripgrep/bin/rg. Current VS Code ships
@vscode/ripgrep-universal/bin/<arch>/rg instead, so all four miss, and
with nothing configured the extension gives up.

Two things are needed, because every one of those probes is a bare
fs.existsSync and none of them consults PATH:

- Install the binary. Debian trixie packages ripgrep 14.1.1, so it joins
  fish in the Dockerfile's existing apt call for the same reason fish is
  there: one apt call for something the distribution already has, baked
  into a cached layer, no feature required.
- Point todo-tree.ripgrep at /usr/bin/rg. Installing alone would not have
  fixed anything.

The setting goes in devcontainer.json rather than .vscode/settings.json
because it is an absolute container path, and that file is shared with
anyone opening the repo outside this container -- where /usr/bin/rg is
usually wrong. That is harmless in practice, since a failed existsSync
just falls through to the next candidate, but it would still be asserting
something untrue of that environment. This is the same split #1779 landed
for dprint.path.

Not pinned, per the DL3008 note already in this file: Debian drops
superseded versions, so a pin would fail the build at the first security
update, and nothing raises PRs for apt pins the way renovate does
elsewhere here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit 2c084bd
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a78d70e2440cd000811c641
😎 Deploy Preview https://deploy-preview-1783--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

648402c installed rg and pointed Todo Tree at it, but got the setting
name wrong: it set `todo-tree.ripgrep`, when the extension actually
resolves the path via `getConfiguration("todo-tree.ripgrep").ripgrep`
-- a config *section* lookup, not a leaf key. That call resolves to
the setting ID `todo-tree.ripgrep.ripgrep`, per the extension's own
package.json schema. VS Code silently drops unknown setting keys, so
the wrong one never reached the extension; it fell through to its
hardcoded vscode-ripgrep/@vscode/ripgrep probes, which still miss
under current VS Code's @vscode/ripgrep-universal layout, and gave up
with the same error the previous commit was meant to fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@OpenINFbot
OpenINFbot merged commit bc98a7c into live Aug 9, 2026
13 checks passed
@OpenINFbot
OpenINFbot deleted the fix/todo-tree-ripgrep branch August 9, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants