Skip to content

fix(nix): add shared package to bun install filters#22665

Draft
jerome-benoit wants to merge 5 commits intoanomalyco:devfrom
jerome-benoit:fix/nix-shared-filter
Draft

fix(nix): add shared package to bun install filters#22665
jerome-benoit wants to merge 5 commits intoanomalyco:devfrom
jerome-benoit:fix/nix-shared-filter

Conversation

@jerome-benoit
Copy link
Copy Markdown
Contributor

@jerome-benoit jerome-benoit commented Apr 15, 2026

Issue for this PR

Closes #22657

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds --filter './packages/shared' to bun install in nix/node_modules.nix.

PR #22626 introduced packages/shared as a workspace dependency of opencode, app, and ui. Its tsconfig.json extends @tsconfig/bun/tsconfig.json (resolved via the workspace root catalog:). Without this filter, bun doesn't install shared's dependencies in the nix sandbox, so vite/esbuild fails resolving the tsconfig chain.

The nix-hashes CI will auto-recompute and commit updated hashes once this lands on dev.

How did you verify your code works?

  • nix eval ".#packages.aarch64-darwin.opencode.drvPath" passes locally
  • Verified the dependency chain: opencode → shared → tsconfig extends @tsconfig/bun
  • Confirmed no other nix files need changes (desktop.nix, opencode.nix consume node_modules without running bun install)

Screenshots / recordings

N/A — build-time fix, no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Copilot AI review requested due to automatic review settings April 15, 2026 20:43
@github-actions github-actions bot added contributor needs:compliance This means the issue will auto-close after 2 hours. labels Apr 15, 2026
@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Apr 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Nix bun install workspace filter list to include the newly introduced packages/shared workspace so its dependencies are available during sandboxed builds (fixing the reported @tsconfig/bun resolution failure).

Changes:

  • Add --filter './packages/shared' to the filtered bun install invocation in nix/node_modules.nix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jerome-benoit jerome-benoit marked this pull request as draft April 15, 2026 21:16
The --filter alone is insufficient because @tsconfig/bun was not
in shared's own package.json, so bun never installs it for shared
in the nix sandbox. Every other package extending @tsconfig/bun
declares it in its own devDependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nix: build fails after shared package introduction — missing --filter in node_modules.nix

2 participants