Repository navigation
ci: build the TypeScript job's Rust addon and CLIs in one invocation - #898
Merged
Merged
Conversation
…m-bindgen prebuilt The TypeScript job built the bindings addon with `napi build` and the CLIs with a separate `cargo build`; the two package selections resolve features differently, so shared dependencies compiled twice (~276 s together). They now build in one `cargo build`, and the addon is copied to the file name the loader reads (napi's generated index.js/index.d.ts are unused here). wasm-bindgen-cli was compiled with `cargo install` on every run (~40 s); it is now installed prebuilt at the Cargo.lock version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The prebuilt binary produced different generated bytes than the committed ones, so the generated-files check failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@greptileai review |
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.
Problem
The
TypeScript packages and CLIsjob spends most of its ~8 min compiling Rust (from #897's run):napi build --platform)cargo build -p alien-cli -p alien-deploy-cli -p alien-operator -p alien-ai-gateway)The two builds select different packages, so cargo resolves features differently and compiles shared dependencies twice.
Change
cargo buildfor the addon and, under the same condition as before, the CLIs and gateway. The addon is copied toalien-bindings-node.linux-arm64-gnu.node, which is whatpackages/bindings/src/loader.tsreads.napi build --platformadditionally generatesindex.js/index.d.tsin the crate. Those are gitignored and unused (seecrates/alien-bindings-node/.gitignore).packages/permissions/generated/bytes.js, so the generated-files check failed.Verified
This PR's own CI runs the affected steps:
pnpm generate, plus the check that generated files are committedMeasured on this PR: the merged build took 178 s, against 103 + 173 = 276 s for the two separate builds on #897.
🤖 Generated with Claude Code