build: bring the prebuilt addon into new worktrees - #586
Merged
Conversation
`--all-features` enables `embed-runtime`, whose build script hashes every runtime entrypoint and panics when `runtime/addons/nub-native.node` is missing. The file is gitignored, so a fresh worktree never has it and `cargo clippy --all-targets --all-features` — the pre-push gate AGENTS.md prescribes — cannot run there at all until it is staged by hand. Copied rather than symlinked: `make addon-fast` writes that exact path, so a symlink would send a worktree's addon build through into the shared tree and clobber it for every sibling worktree. A missing source is skipped, so a tree that has never built the addon still creates worktrees fine.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — a single .worktreeinclude entry so fresh worktrees carry the gitignored N-API addon that the --all-features pre-push clippy gate requires.
- Bring
runtime/addons/nub-native.nodeinto new worktrees — addscopy runtime/addons/nub-native.node(with an explanatory comment) socargo clippy --all-targets --all-featuresno longer panics in a fresh worktree on the missingembed-runtimeentrypoint.
Every claim in the comment checks out against the code:
make addon-fast(Makefile:65-73) writes exactlyruntime/addons/nub-native.node, so the copy-not-symlink rationale (a symlink would route a worktree's addon build back into the shared tree and clobber siblings) is correct.applyIncludeinscripts/new-worktree.tsskips a missing source (151-153),mkdirSyncs theruntime/addons/parent before copying (160), andcpSyncs the single file (165) — so a never-built tree still creates worktrees fine and the destination dir is created as needed.
Claude Opus | 𝕏
Contributor
Author
|
Shipped in v0.7.0: https://github.com/nubjs/nub/releases/tag/v0.7.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

cargo clippy --all-targets --all-features— the pre-push gate AGENTS.md prescribes — cannot run in a fresh worktree.--all-featuresenablesembed-runtime, whose build script hashes every runtime entrypoint and panics on the missingruntime/addons/nub-native.node:The addon is gitignored, so
git worktree addnever brings it along and every new worktree hits this until someone stages the file by hand. It reads as a build failure on correct source, which is what makes it cost time rather than a moment.Adding it to
.worktreeincludecloses that.Copied, not symlinked:
make addon-fastwrites that exact path, so a symlink would send a worktree's addon build through into the shared tree and clobber it for every sibling. A missing source is skipped by the existing loop, so a tree that has never built the addon still creates worktrees fine.