[pull] canary from vercel:canary#1119
Merged
Merged
Conversation
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
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )