Skip to content

[pull] canary from vercel:canary#1119

Merged
pull[bot] merged 6 commits into
code:canaryfrom
vercel:canary
Jun 11, 2026
Merged

[pull] canary from vercel:canary#1119
pull[bot] merged 6 commits into
code:canaryfrom
vercel:canary

Conversation

@pull

@pull pull Bot commented Jun 11, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

bgw and others added 6 commits June 10, 2026 14:23
We're consolidating on `actions/cache` now that we got rid of
self-hosted runners. This doesn't remove all of the uses of turborepo's
cache (notably sccache), but this does eliminate the remote turborepo
cache for the native build cache and the docker image.

These build steps use docker so that we're building against an old
pinned glibc (2.31), and so that we can have access to both `aarch64`
and `x86_64` musl sysroots.

## Testing

**Local Build:** `node scripts/docker-native-build.js` still works (this
script just exists for being able to debug these builds locally)

**CI Build:**
- Run an automated-preview CI job, but cancel it before the native build
succeeds to test writing to the docker cache but not the native cache:
https://github.com/vercel/next.js/actions/runs/26986955366/job/79638633136?pr=94319
- Re-run the job with only the docker image cache, see that we get a
cache hit for the docker image:
https://github.com/vercel/next.js/actions/runs/26986955366/job/79639365126?pr=94319
- Re-run the job again and see that we hit the native build cache hit
and don't touch docker at all:
https://github.com/vercel/next.js/actions/runs/26986955366/job/79647324952?pr=94319
- Manually trigger the job to do a full preview build:
https://github.com/vercel/next.js/actions/runs/26989861549
…#94579)

I determined that [`nvm` wasn't sufficient for our use-case since we
need to support
windows](#94175 (comment)),
so this doubles down on `fnm`.

This reduces risks of supply chain attacks with `fnm`.

This also cleans up some old stuff that was left over from self-hosted
runners and/or that was there for debugging, if it isn't useful anymore.
…nd `visit_export_default_decl()` (#94581)

Talked IRL, we found that calling this in `visit_export_default_expr()`
cut down the `module-cost` benchmark on ESM execution by about 10ms
(approx. 35%).

Doing this unlocks a codegen optimization to avoid arrow functions, this
special case was needed to support `export default ...` which is a kind
of declaration all on its own.
The Node resume adapter returned its stream without observing whether
React produced a resumable HTML shell. When an empty prerendered shell
resumed into a redirect, React reported an onShellError, but Next.js
continued into Flight injection and waited forever for an HTML chunk
that would never arrive.

Wire the resume shell callbacks into a promise and await the result
after starting the pipe. Shell errors now propagate into the existing
app-render recovery path, matching the Web stream behavior and producing
a complete error document containing the redirect signal.
`results` became `segments` and `results_final` became `locked_prefix`,
the `segments` name I'm not too attached to, I'm just trying to
communicate that that vector stores the "other" parts of the path that
aren't fixed and can change. Meanwhile, the `locked_prefix` has to be at
the start - it contains variables we don't know the value of (and
anything that came before it) or also the starting "." or "..". I think
this is what "final" was originally trying to communicate.

I also had Claude generate tests for this function based on the
pre-existing tests in the `node` repo. There was some divergence related
to absolute paths if anyone is curious:

| Input | turbopack | node |
|---|---|---|
| `["", "foo"]` | `/foo` | `foo` |
| `["", "", "foo"]` | `/foo` | `foo` |
| `["", "..", "..", "/foo"]` | `/../../foo` | `../../foo` |
| `["/"]` | `` (empty) | `/` |
| `["/", "."]` | `` (empty) | `/` |
| `["/foo", "../../../bar"]` | `/../../bar` | `/bar` |
| `["/", ".."]` | `/..` | `/` |
| `["/", "..", ".."]` | `/../..` | `/` |
| `["", "."]` | `` (empty) | `.` |
| `[""]` | `` (empty) | `.` |
| `["", ""]` | `` (empty) | `.` |

I can follow-up and fix these as well if that'd be worthwhile, though I
think it was mentioned that we don't support absolute paths
@pull pull Bot locked and limited conversation to collaborators Jun 11, 2026
@pull pull Bot added the ⤵️ pull label Jun 11, 2026
@pull pull Bot merged commit da451d7 into code:canary Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants