Repository navigation
repo: make the root nub-identity on nub.lock, and bootstrap CI with nub #807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
175179e
d18383b
9cf5eb5
1f16459
189d1af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -390,11 +390,14 @@ jobs: | |
| # runtime, never from the checkout. Install and stage the locked copies | ||
| # before building nub.exe so the release blob contains a self-sufficient | ||
| # runtime for the offline --smol gate below. | ||
| # A released nub materializes node_modules from nub.lock; the nub under | ||
| # test is built in the next step and cannot install its own inputs. | ||
| - uses: ./setup | ||
| - name: Install and stage runtime dependencies for embedded compile | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| npm ci | ||
| nub install --frozen-lockfile --node-linker hoisted | ||
| rm -rf runtime/node_modules | ||
| mkdir -p \ | ||
| runtime/node_modules/@js-temporal \ | ||
|
|
@@ -875,10 +878,12 @@ jobs: | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5 | ||
| with: | ||
| version: 10 | ||
| # No `cache: npm` — setup-node's npm cache keys on a lockfile npm can read, | ||
| # and the root now carries only nub.lock. nub's own store cache rides on | ||
| # the `./setup` step that installs the root deps further down. | ||
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
| cache: 'npm' | ||
| # Side-install the off-matrix tier representatives for the version_tiers | ||
| # integration test: compat 22.13, unsupported 18.18, detect-module in-band | ||
| # 20.11 (flag still required there), and 26.5 (carries the node:ffi/vfs/ | ||
|
|
@@ -938,15 +943,24 @@ jobs: | |
| run: | | ||
| pnpm --version | ||
| npm --version | ||
| # Root deps are npm-managed (package-lock.json — same PM wpt-worker's | ||
| # root `npm ci` uses; the pnpm domain lives in tools/). | ||
| - run: npm ci | ||
| # `npm` runs through the Socket Firewall shim, which `exec`s sfw — so sfw's | ||
| # status IS this step's status. An sfw crash that exits 0 leaves a | ||
| # half-built tree (package dirs present, package.json missing) and a GREEN | ||
| # install step; the tree then surfaces six minutes later as unresolvable | ||
| # helper imports in five unrelated transpile tests. Assert the install | ||
| # actually produced something resolvable, so infra failure fails here. | ||
| # Root deps come from nub.lock — the repo root is nub-identity, so nub is | ||
| # the only manager that reads it (the pnpm domain still lives in tools/). | ||
| # A released nub installs them: this leg builds no nub of its own before | ||
| # the tests need the tree. `hoisted` keeps node_modules real directories. | ||
| # | ||
| # THIS INSTALL NO LONGER PASSES THROUGH THE SOCKET FIREWALL SHIM. sfw is | ||
| # wired by shimming `npm`/`pnpm` by NAME on PATH, and `nub` carries no such | ||
| # shim, so the interception that covered the old `npm ci` does not cover | ||
| # this step. What still holds: nub.lock pins every tarball by integrity | ||
| # hash, `--frozen-lockfile` refuses to re-resolve, and lifecycle scripts | ||
| # run under nub's build jail rather than unconfined. The shims stay in | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The build jail is |
||
| # place for the pnpm/npm surfaces the tests themselves drive. | ||
| - uses: ./setup | ||
| - run: nub install --frozen-lockfile --node-linker hoisted | ||
| # An installer that exits 0 on a half-built tree (package dirs present, | ||
| # package.json missing) surfaces six minutes later as unresolvable helper | ||
| # imports in five unrelated transpile tests. Assert the install actually | ||
| # produced something resolvable, so infra failure fails HERE. | ||
| - name: assert root deps actually installed | ||
| run: node -e "require.resolve('@oxc-project/runtime/helpers/usingCtx')" | ||
| # The data-format loader tests need the nub-native addon (the npm yaml/toml/ | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This claim does not hold:
./setupis used bare at line 958, andsetup/action.ymldefaults thecacheinput to"false"while gating its cache step onif: inputs.cache == 'true'. Socache: 'npm'was removed and nothing replaced it — every leg of the test matrix now does a cold network install, as do busybox, both compile-native legs, and both release.yml legs.Technical details