Repository navigation
fix(nix): preserve root dependency peer context - #56889
Conversation
Include the root alongside the existing workspace filters instead of merging incompatible Bun store entries. Refs anomalyco#56856
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
The fix works. I installed dependencies and built the binary the way the Nix flake does (Bun 1.4.2, x86_64-linux). On the base, packages/theme and packages/tui/packages/cli resolve different @opentui/core store entries, and the binary crashes at launch with e.replace is not a function. With --filter './', all three resolve the same entry (the one a plain install uses), and the binary starts to the home screen with an empty config. One cost to know about: including root dependencies brings in the root package's tooling (sst, @aws-sdk/client-s3, oxlint, turbo, …), so node_modules grows from about 1.7 GB to 2.0 GB (1421 → 1557 store entries). Leaving the arm64 Linux and macOS hashes unchanged is fine, because the nix-hashes workflow regenerates them when nix/node_modules.nix changes on dev.
Public API: unchanged (Nix packaging only).
Two requested changes:
- Please drop the
CHANGELOG.mdedit. The changelog is written at release time byscript/publish.ts, which inserts each new release above the first##heading. An## Unreleasedsection would end up below the next release and never get filled. - Please drop
nix/scripts/dependency-identity.test.ts(details inline).
Related: #55328
|
|
||
| Release notes for OpenCode V2, newest first. | ||
|
|
||
| ## Unreleased |
There was a problem hiding this comment.
CHANGELOG.md is generated at release time: script/publish.ts inserts the new ## vX.Y.Z entry above the first ## line. With this ## Unreleased section in place, the next release would be inserted above it, leaving this section stranded below. Please drop this hunk.
There was a problem hiding this comment.
Removed in 1c43d4b. Confirmed that script/publish.ts inserts release notes before the first ## heading; changelog generation stays release-owned.
There was a problem hiding this comment.
Thanks, confirmed: 1c43d4b removes the changelog entry and the standalone test. The pull request now only changes nix/node_modules.nix and the x86_64-linux hash. That fix is unchanged from the version I tested, so the crash result in my review still applies. I have no further requests.
| @@ -0,0 +1,77 @@ | |||
| import { expect, test } from "bun:test" | |||
There was a problem hiding this comment.
This test can be dropped so the change stays minimal. nix/ isn't a workspace package, so bun turbo test never runs it in CI, and it only works after a Nix-style install. Three of the six cases (the Zod and OpenTelemetry peer-context checks and the symlink walk) check things unrelated to the fix. They could start failing after an ordinary dependency bump. If you want a guard, a check in the build that every package resolves a single @opentui/core would catch this where it actually runs.
There was a problem hiding this comment.
Removed in 1c43d4b. The PR now changes only the install filter/comment and the verified x86_64-linux hash. Kept the investigation results in the PR description rather than adding a new build guard. bun run check passes after cleanup (34 successful cached typecheck tasks).
There was a problem hiding this comment.
Thanks, confirmed: 1c43d4b removes nix/scripts/dependency-identity.test.ts, and the pull request now only changes the install filter and comment in nix/node_modules.nix and the x86_64-linux hash. Not adding a build guard is fine. The investigation in the description is enough. My test-file comment is resolved.
Leave changelog generation to the release script and remove the install-specific test outside the CI workspace graph.

Issue for this PR
Closes #56856
Type of change
What does this PR do?
Change the Nix install filter from
!./to./, keeping the CLI/Desktop/App selectors. Excluding root dependencies makes Bun resolve separate OpenTUI instances for theme and TUI, breakingRGBAidentity at startup. Including root dependencies restores shared identity without rewriting dependency contexts.Alternative to #56881: fix the installation context rather than canonicalize OpenTUI afterward. Both normalization scripts and the spinner remain unchanged. The only other change is the verified x86_64-linux dependency hash. Tradeoff: the dependency output also includes root tooling.
How did you verify your code works?
Bun 1.4.2, Linux x86_64, base
501b15af:--standalone. Architecture verification remains enabled. A separate source-only override supplies rootscript/for nix run failure x86 with opencode-2.0.28+5aabb61.drv #55328 / fix(nix): ship the root script/ dir to the CLI build #55494; that prerequisite is not included here.bun run checkpasses after review cleanup: 34 successful cached typecheck tasks; lint reports warnings but no errors.ARM Linux/macOS were not built locally. Their hashes remain unchanged; the existing
nix-hashesworkflow regenerates all three platform hashes when this install change lands ondev.Screenshots / recordings
Packaging-only change. The built TUI welcome screen was also captured and visually inspected.
Checklist
Investigation and patch prepared with AI assistance.
Added by the opencode bot (AI-generated).
Related: #55328