1. 06 Feb, 2025 27 commits
  2. 05 Feb, 2025 13 commits
    • Will Binns-Smith's avatar
      Invalidator: don’t call invalidate at all if there’s nothing to invalidate (#75706) · d2711d22
      Will Binns-Smith authored
      No behavior changes in this PR, just a small adjustment since while
      debugging it was surprising that `invalidate` was called even though it
      was a no-op with an empty array.
      
      Previously, `invalidate` would unconditionally get called after
      building, even if no work was queued.
      
      Test Plan: CI
      d2711d22
    • Josh Story's avatar
      `rootParams()` is now a plain Proimse (not exotic) (#75717) · 5fa487a1
      Josh Story authored
      When we made Request data APIs async we made them exotic to make the
      transition to the Promise API easier to adopt because lots of existing
      code probably accessed these values synchronously. `rootParams` is a new
      Request Data API however and it has no existing usage that is async so
      we do not need to support exotic access to these values. This change
      removes the exotic construction in favor of a simple resolved Promise.
      5fa487a1
    • vercel-release-bot's avatar
      v15.2.0-canary.42 · 444a182b
      vercel-release-bot authored
      444a182b
    • Hendrik Liebau's avatar
      Unused `searchParams` in `"use cache"` page should not cause dynamic (#75662) · ae5026a0
      Hendrik Liebau authored
      When `dynamicIO` is not enabled, and only the standalone `useCache`
      experimental flag is enabled, we can not encode `searchParams` as
      hanging promises. To still avoid unused search params from making a page
      dynamic (due to the `searchParams` being encoded into the cache key), we
      set them to a promise that resolves to an empty object, while also
      overwriting the to-be-invoked function for generating a cache entry with
      a function that creates an erroring `searchParams` prop before invoking
      the original function. This ensures that used `searchParams` inside of
      cached functions would still yield an error.
      
      closes NAR-85
      ae5026a0
    • Benjamin Woodruff's avatar
      chore(next-swc-napi): Remove unused(?) rlib target (#75707) · 1eb708ad
      Benjamin Woodruff authored
      napi-rs only uses the cdylib version: https://github.com/napi-rs/napi-rs/blob/688a266f132f947b8002e892b78decd660d8a6ec/crates/napi/README.md#building
      
      This might(?) slightly improve compile times for certain invocations of `cargo`.
      1eb708ad
    • Hendrik Liebau's avatar
      Add test to verify which pages are prerendered in `use-cache` test suite (#75681) · 72611f31
      Hendrik Liebau authored
      This allows us to catch regressions and monitor progress (e.g. for NAR-85).
      
      In addition, we're consolidating all pages in the test app to use a single root layout without a suspense boundary. Before we switched the app from using the `dynamicIO` flag to the `useCache` flag, some pages needed a suspense boundary to not fail the build.
      72611f31
    • Tobias Koppers's avatar
      [Turbopack] disable dependency tracking for next build (#75704) · eb789ecf
      Tobias Koppers authored
      ### What?
      
      fix a previous PR that disables dependency tracking when not needed.
      eb789ecf
    • JJ Kasper's avatar
      Ensure src/middleware handles correctly (#75702) · 9b7e34f4
      JJ Kasper authored
      This is a follow-up to https://github.com/vercel/next.js/pull/75624
      which ensures middleware behaves correctly in the `src/` directory. This
      previously wasn't an issue since edge runtime output location isn't
      picky since it's just output in the middleware-manifest although with
      node runtime it is particular.
      9b7e34f4
    • JJ Kasper's avatar
      Fix lint for cacheTag doc (#75703) · c5b823e7
      JJ Kasper authored
      Seems this was failing in https://github.com/vercel/next.js/pull/75693
      c5b823e7
    • Niklas Mischkulnig's avatar
      Turbopack: lazily evaluate `obj` for member replacements (#75453) · 94aea60d
      Niklas Mischkulnig authored
      Don't even evaluate the left side of `obj.prop` if we know that we don't have anything in the replacement maps that matches  `*.prop` anyway.
      
      This particular helps in huge files with complex code and also containing many member expressions
      
      ```
      testing against 0293c96cf32
      
      canary b6f8743e
      13,75 GB 
      TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD=  507.86s user 77.80s system 847% cpu 1:09.11 total
      TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD=  503.13s user 77.86s system 855% cpu 1:07.90 total
      
      
      mischnic/analyzer-faster-members ed38e94ba2
      13,75 GB 
      TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD=  499.54s user 79.28s system 857% cpu 1:07.51 total
      TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD=  498.31s user 76.99s system 855% cpu 1:07.27 total
      ```
      94aea60d
    • Tawsif Haque's avatar
    • Benjamin Woodruff's avatar
      chore(turbo-tasks): Remove support for local_cells (a specific mode of local… · a29bfa2b
      Benjamin Woodruff authored
      chore(turbo-tasks): Remove support for local_cells (a specific mode of local tasks we ended up not using) (#75672)
      
      Local cells would allow us to avoid allocating real cells for data
      passed to local task functions.
      
      Unfortunately, in practice, we manually resolve most arguments passed to
      local task functions, which would defeat this optimization.
      
      I was holding onto this in the hopes that we might end up using it, but
      that seems fleeting:
      - We could get similar benefits by scanning for unreferenced cells at
      the end of function execution using `TraceRawVcs` at the cost of a bit
      of execution time. This would work even on `Vc`s that were resolved.
      - For ergonomics reasons, we want to eventually rename `ResolvedVc` to
      `Vc` (and `Vc` to something like `UnresolvedVc`), which will probably
      lead to us resolving even more stuff, breaking this potential
      optimization even more.
      - Cache eviction may do a good enough job of removing cells, the bigger
      enemy are the harder-to-evict tasks, which our current version of local
      tasks does do a good job of reducing.
      
      Meanwhile, it makes the code harder to follow, and could cause issues if
      this codepath somehow got activated.
      a29bfa2b
    • Hendrik Liebau's avatar
      Add regression test for previously hanging compilation with Turbopack (#75507) · e8b41f6e
      Hendrik Liebau authored
      When adding or removing a `"use cache"` directive to a function or
      module, Turbopack was not able to finish the compilation and hung. This
      is now fixed, and we're adding the test to prevent regression.
      e8b41f6e