Skip to content

turbopack-cli: add --persistent-caching flag for filesystem-backed cache#91657

Merged
sokra merged 3 commits intocanaryfrom
sokra/turbopack-cli
Mar 20, 2026
Merged

turbopack-cli: add --persistent-caching flag for filesystem-backed cache#91657
sokra merged 3 commits intocanaryfrom
sokra/turbopack-cli

Conversation

@sokra
Copy link
Copy Markdown
Member

@sokra sokra commented Mar 19, 2026

What?

Adds --persistent-caching and --cache-dir CLI flags to turbopack dev and turbopack build in the standalone turbopack-cli crate.

Why?

The standalone turbopack-cli binary (used independently of next) had no way to opt into the filesystem-backed persistent cache that the next-napi-bindings integration already supports. Without this, repeated builds always start cold — every incremental run re-computes the full task graph from scratch.

How?

build.rs (new): A Cargo build script that uses vergen-gitcl to emit VERGEN_GIT_DESCRIBE and VERGEN_GIT_DIRTY as compile-time env vars. These are used to key the cache by git version, matching the same approach as next-napi-bindings. The build script embeds the dirty state at compile time rather than runtime to avoid a git subprocess on every startup.

The dirty-state caching tradeoff (explained in the build script comment): there's a narrow edge case where the tree becomes newly dirty without triggering a Cargo rebuild, but in practice this is safe — if nothing in the crate changed, the binary is semantically equivalent to a clean build, so using the HEAD hash as the cache key is correct.

arguments.rs: Two new flags on CommonArguments (shared by both dev and build subcommands):

  • --persistent-caching — opt-in flag to enable the filesystem cache
  • --cache-dir <PATH> — override the cache directory (defaults to .turbopack/cache in the project root)

dev/mod.rs and build/mod.rs:

  • The Backend type alias changes from TurboTasksBackend<NoopBackingStorage> to TurboTasksBackend<Either<TurboBackingStorage, NoopBackingStorage>> to unify the type without dynamic dispatch.
  • When --persistent-caching is set: initializes TurboBackingStorage via turbo_backing_storage(), selects StorageMode::ReadWriteOnShutdown for CI/short sessions and StorageMode::ReadWrite for interactive dev, and prints a warning if the cache was invalidated on startup.
  • When not set: falls back to noop_backing_storage() — identical behavior to before.
  • Respects the TURBO_ENGINE_READ_ONLY env var to force read-only mode.

@nextjs-bot nextjs-bot added created-by: Turbopack team PRs by the Turbopack team. Turbopack Related to Turbopack with Next.js. labels Mar 19, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 19, 2026

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing sokra/turbopack-cli (110d762) with canary (8cbc037)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@sokra sokra marked this pull request as ready for review March 19, 2026 15:56
@sokra sokra requested a review from mischnic March 19, 2026 15:56
@nextjs-bot
Copy link
Copy Markdown
Collaborator

Failing test suites

Commit: 7ab991a | About building and testing Next.js

pnpm test-start test/e2e/app-dir/segment-cache/prefetch-inlining/prefetch-inlining.test.ts (job)

  • next-types-plugin > should have type for root page (DD)
  • next-types-plugin > should have type for root layout (DD)
  • next-types-plugin > should have type for nested page (DD)
  • next-types-plugin > should have type for nested layout (DD)
  • next-types-plugin > should have type for dynamic page (DD)
  • next-types-plugin > should have type for dynamic layout (DD)
Expand output

● next-types-plugin › should have type for root page

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  12 |     it('should have type for root page', async () => {
  13 |       expect(await next.hasFile('app/page.tsx')).toBe(true)
> 14 |       expect(await next.hasFile('.next/types/app/page.ts')).toBe(true)
     |                                                             ^
  15 |     })
  16 |     it('should have type for root layout', async () => {
  17 |       expect(await next.hasFile('app/layout.tsx')).toBe(true)

  at Object.toBe (production/app-dir/next-types-plugin/basic/index.test.ts:14:61)

● next-types-plugin › should have type for root layout

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  16 |     it('should have type for root layout', async () => {
  17 |       expect(await next.hasFile('app/layout.tsx')).toBe(true)
> 18 |       expect(await next.hasFile('.next/types/app/layout.ts')).toBe(true)
     |                                                               ^
  19 |     })
  20 |     it('should have type for nested page', async () => {
  21 |       expect(await next.hasFile('app/nested/page.tsx')).toBe(true)

  at Object.toBe (production/app-dir/next-types-plugin/basic/index.test.ts:18:63)

● next-types-plugin › should have type for nested page

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  20 |     it('should have type for nested page', async () => {
  21 |       expect(await next.hasFile('app/nested/page.tsx')).toBe(true)
> 22 |       expect(await next.hasFile('.next/types/app/nested/page.ts')).toBe(true)
     |                                                                    ^
  23 |     })
  24 |     it('should have type for nested layout', async () => {
  25 |       expect(await next.hasFile('app/nested/layout.tsx')).toBe(true)

  at Object.toBe (production/app-dir/next-types-plugin/basic/index.test.ts:22:68)

● next-types-plugin › should have type for nested layout

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  24 |     it('should have type for nested layout', async () => {
  25 |       expect(await next.hasFile('app/nested/layout.tsx')).toBe(true)
> 26 |       expect(await next.hasFile('.next/types/app/nested/layout.ts')).toBe(true)
     |                                                                      ^
  27 |     })
  28 |     it('should have type for dynamic page', async () => {
  29 |       expect(await next.hasFile('app/[dynamic]/page.tsx')).toBe(true)

  at Object.toBe (production/app-dir/next-types-plugin/basic/index.test.ts:26:70)

● next-types-plugin › should have type for dynamic page

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  28 |     it('should have type for dynamic page', async () => {
  29 |       expect(await next.hasFile('app/[dynamic]/page.tsx')).toBe(true)
> 30 |       expect(await next.hasFile('.next/types/app/[dynamic]/page.ts')).toBe(true)
     |                                                                       ^
  31 |     })
  32 |     it('should have type for dynamic layout', async () => {
  33 |       expect(await next.hasFile('app/[dynamic]/layout.tsx')).toBe(true)

  at Object.toBe (production/app-dir/next-types-plugin/basic/index.test.ts:30:71)

● next-types-plugin › should have type for dynamic layout

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  32 |     it('should have type for dynamic layout', async () => {
  33 |       expect(await next.hasFile('app/[dynamic]/layout.tsx')).toBe(true)
> 34 |       expect(await next.hasFile('.next/types/app/[dynamic]/layout.ts')).toBe(
     |                                                                         ^
  35 |         true
  36 |       )
  37 |     })

  at Object.toBe (production/app-dir/next-types-plugin/basic/index.test.ts:34:73)

@nextjs-bot
Copy link
Copy Markdown
Collaborator

nextjs-bot commented Mar 19, 2026

Failing test suites

Commit: 110d762 | About building and testing Next.js

pnpm test-start-turbo test/production/dynamic-css-client-navigation/react-lazy.test.ts (turbopack) (job)

  • dynamic-css-client-navigation react lazy nodejs > should not remove style when navigating from static imported component to react lazy at runtime nodejs (DD)
Expand output

● dynamic-css-client-navigation react lazy nodejs › should not remove style when navigating from static imported component to react lazy at runtime nodejs

expect(received).toBe(expected) // Object.is equality

Expected: "rgb(255, 0, 0)"
Received: null

  22 |       )
  23 |
> 24 |       expect(buttonBgColor).toBe('rgb(255, 0, 0)')
     |                             ^
  25 |     })
  26 |   }
  27 | )

  at Object.toBe (production/dynamic-css-client-navigation/react-lazy.test.ts:24:29)

pnpm test-start-turbo test/e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts (turbopack) (job)

  • Graceful Shutdown > production (standalone mode) > should not accept new requests during shutdown cleanup > should stop accepting new requests when shutting down (DD)
Expand output

● Graceful Shutdown › production (standalone mode) › should not accept new requests during shutdown cleanup › should stop accepting new requests when shutting down

expect(received).toEqual(expected) // deep equality

- Expected  - 1
+ Received  + 1

  Array [
-   143,
    null,
+   "SIGTERM",
  ]

  227 |
  228 |         // App finally shuts down with signal-based exit code (128 + 15 for SIGTERM)
> 229 |         expect(await appKilledPromise).toEqual([143, null])
      |                                        ^
  230 |         expect(app.exitCode).toBe(143)
  231 |       })
  232 |     })

  at Object.toEqual (production/graceful-shutdown/index.test.ts:229:40)

pnpm test-start test/e2e/app-dir/use-node-streams-env-precedence/use-node-streams-env-precedence.test.ts (job)

  • use-node-streams env precedence > should respect explicit useNodeStreams=false even when env flag is true (DD)
Expand output

● use-node-streams env precedence › should respect explicit useNodeStreams=false even when env flag is true

can not run export while server is running, use next.stop() first

  251 |   ) {
  252 |     if (this.childProcess) {
> 253 |       throw new Error(
      |             ^
  254 |         `can not run export while server is running, use next.stop() first`
  255 |       )
  256 |     }

  at NextStartInstance.build (lib/next-modes/next-start.ts:253:13)
  at Object.build (e2e/app-dir/use-node-streams-env-precedence/use-node-streams-env-precedence.test.ts:19:48)

@nextjs-bot
Copy link
Copy Markdown
Collaborator

nextjs-bot commented Mar 19, 2026

Stats from current PR

✅ No significant changes detected

📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 507ms 506ms ▁▁▁▁▁
Cold (Ready in log) 470ms 472ms ▁▁▁▁▁
Cold (First Request) 935ms 939ms ▁▁▃▄▃
Warm (Listen) 509ms 508ms ▁▁▁▁▁
Warm (Ready in log) 467ms 472ms ▁▁▁▁▁
Warm (First Request) 347ms 347ms ▁▁▁▁▁
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 507ms 508ms █▅▁▁▁
Cold (Ready in log) 493ms 494ms █▅▁▁▁
Cold (First Request) 2.265s 2.260s █▆▁▂▁
Warm (Listen) 507ms 507ms █▅▁▁▁
Warm (Ready in log) 489ms 488ms █▆▁▁▁
Warm (First Request) 2.275s 2.257s █▆▁▁▁

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 4.395s 4.352s ▁▂▂▁▁
Cached Build 4.421s 4.403s ▁▂▂▁▁
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 16.695s 16.776s █▆▁▁▁
Cached Build 16.835s 16.902s █▆▁▁▁
node_modules Size 484 MB 484 MB ▁▁▁▁▁
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles
Canary PR Change
0.9zdz7ux63kn.js gzip 48.7 kB N/A -
0~lwfcrlb4v_9.css gzip 115 B 115 B
00h0nz7r436~l.js gzip 13.3 kB N/A -
00ivb_iunbucu.js gzip 13 kB N/A -
01tk89nk.ffi8.js gzip 158 B N/A -
02j5b_sjm5buz.js gzip 155 B N/A -
02ku7edzc_wf7.js gzip 450 B N/A -
03~yq9q893hmn.js gzip 39.4 kB 39.4 kB
04mfts9t5w62g.js gzip 155 B N/A -
08wow2p6zxy.b.js gzip 7.61 kB N/A -
092lcb3fqrrf9.js gzip 8.52 kB N/A -
0aj~xs1l1g8tg.js gzip 8.53 kB N/A -
0h35gmp9u328z.js gzip 8.54 kB N/A -
0h6fkavebp.iz.js gzip 8.47 kB N/A -
0i3d7jh-x_at5.js gzip 155 B N/A -
0ino_yf1k3h6k.js gzip 10.4 kB N/A -
0jjd.m22v.i-k.js gzip 156 B N/A -
0kdikcbiixwmk.js gzip 160 B N/A -
0kjkxzk698p9u.js gzip 70.8 kB N/A -
0ksw2n1gx8yd7.js gzip 65.7 kB N/A -
0mc16gv2x1bet.js gzip 13.7 kB N/A -
0moy~uao4dl.m.js gzip 9.19 kB N/A -
0q50rtpusjy90.js gzip 2.28 kB N/A -
0smgy2grrrlka.js gzip 8.58 kB N/A -
0t1dzhdfh0txh.js gzip 215 B 215 B
0tfl8rayb0-sl.js gzip 153 B N/A -
0tv_d-a_r-xf~.js gzip 156 B N/A -
0v6b~03xbk0ty.js gzip 168 B N/A -
0vt7pofxnk8in.js gzip 10.1 kB N/A -
0w9h4-_.9uabj.js gzip 160 B N/A -
0yqlkd5xff7.b.js gzip 153 B N/A -
0zid7o0-vupvp.js gzip 225 B N/A -
11j5tjy629bgg.js gzip 154 B N/A -
11yo3xfd6b147.js gzip 12.9 kB N/A -
13.84hqxl_1p7.js gzip 9.76 kB N/A -
137644g4qzo_7.js gzip 156 B N/A -
1554wr-t7p6z-.js gzip 8.55 kB N/A -
15tjst79~qy3_.js gzip 1.46 kB N/A -
15z_v00ne4ud0.js gzip 8.47 kB N/A -
17d_m3p4j9w6r.js gzip 5.62 kB N/A -
17yu~3yiu7d2m.js gzip 8.52 kB N/A -
turbopack-0...x10g.js gzip 4.16 kB N/A -
turbopack-00..wv2..js gzip 4.16 kB N/A -
turbopack-05..yugx.js gzip 4.16 kB N/A -
turbopack-08..j__l.js gzip 4.16 kB N/A -
turbopack-09..9pa1.js gzip 4.14 kB N/A -
turbopack-0c..7zg9.js gzip 4.16 kB N/A -
turbopack-0c..squ..js gzip 4.16 kB N/A -
turbopack-0d..trg8.js gzip 4.17 kB N/A -
turbopack-0i..xoa9.js gzip 4.15 kB N/A -
turbopack-0m..n7zi.js gzip 4.16 kB N/A -
turbopack-0q.._3~2.js gzip 4.16 kB N/A -
turbopack-0t..tm2i.js gzip 4.16 kB N/A -
turbopack-0v..8q6q.js gzip 4.16 kB N/A -
turbopack-11..~~sa.js gzip 4.16 kB N/A -
0-~kc4ap47t-y.js gzip N/A 161 B -
018c5y8lg9p79.js gzip N/A 155 B -
02p4h_hie86eo.js gzip N/A 155 B -
03t__~.5lvgeu.js gzip N/A 5.62 kB -
04d6ll75jqx3r.js gzip N/A 9.19 kB -
0583exyh-yhc7.js gzip N/A 9.76 kB -
072lv63r8dcz~.js gzip N/A 8.58 kB -
075t9dxgbf0m8.js gzip N/A 13.7 kB -
07sepdovlyvl0.js gzip N/A 155 B -
0ar1~bwpezfgw.js gzip N/A 13.3 kB -
0c99mq1ez2bke.js gzip N/A 450 B -
0cq-cmde_ws6u.js gzip N/A 8.47 kB -
0e7fprzho_rur.js gzip N/A 168 B -
0fwf102w10o9~.js gzip N/A 8.52 kB -
0g0r-8gqop3r4.js gzip N/A 152 B -
0gtmn.q_j1v5r.js gzip N/A 10.4 kB -
0h5~v-tahitcf.js gzip N/A 10.1 kB -
0jo.-p0x_18u~.js gzip N/A 65.7 kB -
0nclq9z6yzzm5.js gzip N/A 1.46 kB -
0nzumcogektg7.js gzip N/A 8.55 kB -
0p5sjual.nuis.js gzip N/A 13 kB -
0p88ggrxiy7bp.js gzip N/A 7.6 kB -
0qy62drk_cphp.js gzip N/A 155 B -
0s.c-cn5eebrx.js gzip N/A 8.47 kB -
0tna7lg6q4zne.js gzip N/A 12.9 kB -
0votdfxr5fb5u.js gzip N/A 2.28 kB -
0wz-g5ya6or-8.js gzip N/A 48.7 kB -
0xxdafvjerw_a.js gzip N/A 70.8 kB -
0ykl9bs_qj.5..js gzip N/A 8.52 kB -
0yq~k621klwzw.js gzip N/A 153 B -
0zfen0tnxp4gh.js gzip N/A 8.55 kB -
10wkq1h9jzkg..js gzip N/A 225 B -
10x7re-lumild.js gzip N/A 155 B -
118ev3phr.7~f.js gzip N/A 155 B -
13_p9g3dsp0fp.js gzip N/A 160 B -
149ndfh8zfcaz.js gzip N/A 8.53 kB -
15jy71cuk5lja.js gzip N/A 153 B -
17mt927cfhlsi.js gzip N/A 155 B -
turbopack-05...agn.js gzip N/A 4.16 kB -
turbopack-08..95zq.js gzip N/A 4.17 kB -
turbopack-0e..1_aa.js gzip N/A 4.16 kB -
turbopack-0f..2zj0.js gzip N/A 4.16 kB -
turbopack-0o..ay2b.js gzip N/A 4.16 kB -
turbopack-0p..-7hy.js gzip N/A 4.16 kB -
turbopack-0t..ml6l.js gzip N/A 4.16 kB -
turbopack-0v..sq0k.js gzip N/A 4.16 kB -
turbopack-0w..n4fv.js gzip N/A 4.16 kB -
turbopack-0x..nj1d.js gzip N/A 4.16 kB -
turbopack-11..jdct.js gzip N/A 4.14 kB -
turbopack-12..gyok.js gzip N/A 4.16 kB -
turbopack-12.._vzb.js gzip N/A 4.16 kB -
turbopack-12..4wtb.js gzip N/A 4.16 kB -
Total 463 kB 463 kB ✅ -15 B

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 713 B 711 B
Total 713 B 711 B ✅ -2 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 427 B 432 B 🔴 +5 B (+1%)
Total 427 B 432 B ⚠️ +5 B

📦 Webpack

Client

Main Bundles
Canary PR Change
5528-HASH.js gzip 5.54 kB N/A -
6280-HASH.js gzip 60.4 kB N/A -
6335.HASH.js gzip 169 B N/A -
912-HASH.js gzip 4.59 kB N/A -
e8aec2e4-HASH.js gzip 62.7 kB N/A -
framework-HASH.js gzip 59.7 kB 59.7 kB
main-app-HASH.js gzip 256 B 254 B
main-HASH.js gzip 39.3 kB 39.2 kB
webpack-HASH.js gzip 1.68 kB 1.68 kB
262-HASH.js gzip N/A 4.59 kB -
2889.HASH.js gzip N/A 169 B -
5602-HASH.js gzip N/A 5.55 kB -
6948ada0-HASH.js gzip N/A 62.7 kB -
9544-HASH.js gzip N/A 61.1 kB -
Total 234 kB 235 kB ⚠️ +672 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Total 39.4 kB 39.4 kB
Pages
Canary PR Change
_app-HASH.js gzip 194 B 194 B
_error-HASH.js gzip 183 B 180 B 🟢 3 B (-2%)
css-HASH.js gzip 331 B 330 B
dynamic-HASH.js gzip 1.81 kB 1.81 kB
edge-ssr-HASH.js gzip 256 B 256 B
head-HASH.js gzip 351 B 352 B
hooks-HASH.js gzip 384 B 383 B
image-HASH.js gzip 580 B 581 B
index-HASH.js gzip 260 B 260 B
link-HASH.js gzip 2.51 kB 2.51 kB
routerDirect..HASH.js gzip 320 B 319 B
script-HASH.js gzip 386 B 386 B
withRouter-HASH.js gzip 315 B 315 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Total 7.98 kB 7.98 kB ✅ -1 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 125 kB 125 kB
page.js gzip 269 kB 269 kB
Total 394 kB 394 kB ✅ -315 B
Middleware
Canary PR Change
middleware-b..fest.js gzip 616 B 614 B
middleware-r..fest.js gzip 156 B 155 B
middleware.js gzip 43.7 kB 44 kB
edge-runtime..pack.js gzip 842 B 842 B
Total 45.3 kB 45.6 kB ⚠️ +278 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 715 B 718 B
Total 715 B 718 B ⚠️ +3 B
Build Cache
Canary PR Change
0.pack gzip 4.29 MB 4.28 MB 🟢 9.2 kB (0%)
index.pack gzip 110 kB 111 kB
index.pack.old gzip 110 kB 111 kB
Total 4.51 MB 4.5 MB ✅ -8.28 kB

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 334 kB 334 kB
app-page-exp..prod.js gzip 181 kB 181 kB
app-page-tur...dev.js gzip 333 kB 333 kB
app-page-tur..prod.js gzip 181 kB 181 kB
app-page-tur...dev.js gzip 330 kB 330 kB
app-page-tur..prod.js gzip 179 kB 179 kB
app-page.run...dev.js gzip 330 kB 330 kB
app-page.run..prod.js gzip 179 kB 179 kB
app-route-ex...dev.js gzip 76.2 kB 76.2 kB
app-route-ex..prod.js gzip 51.8 kB 51.8 kB
app-route-tu...dev.js gzip 76.2 kB 76.2 kB
app-route-tu..prod.js gzip 51.9 kB 51.9 kB
app-route-tu...dev.js gzip 75.8 kB 75.8 kB
app-route-tu..prod.js gzip 51.6 kB 51.6 kB
app-route.ru...dev.js gzip 75.8 kB 75.8 kB
app-route.ru..prod.js gzip 51.6 kB 51.6 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 43.4 kB 43.4 kB
pages-api-tu..prod.js gzip 33 kB 33 kB
pages-api.ru...dev.js gzip 43.4 kB 43.4 kB
pages-api.ru..prod.js gzip 33 kB 33 kB
pages-turbo....dev.js gzip 52.8 kB 52.8 kB
pages-turbo...prod.js gzip 38.6 kB 38.6 kB
pages.runtim...dev.js gzip 52.8 kB 52.8 kB
pages.runtim..prod.js gzip 38.6 kB 38.6 kB
server.runti..prod.js gzip 62.5 kB 62.5 kB
Total 2.96 MB 2.96 MB ⚠️ +2 B
📎 Tarball URL
https://vercel-packages.vercel.app/next/commits/110d762ad2bd8a5bc3b7e881721ff7633eb789a1/next

sokra and others added 2 commits March 19, 2026 19:30
Adds `--persistent-caching` and `--cache-dir` CLI flags to both `turbopack
dev` and `turbopack build`. When enabled, uses `turbo_backing_storage` with
the git HEAD describe/dirty state as the cache version key, matching the
same pattern used by next-napi-bindings.

Co-Authored-By: Claude <[email protected]>
…nts fields

The small_apps bench used a positional struct literal for CommonArguments
which broke after adding persistent_caching and cache_dir fields. Add them
with their false/None defaults.

Co-Authored-By: Claude <[email protected]>
@sokra sokra force-pushed the sokra/turbopack-cli branch from 7ab991a to 51405d8 Compare March 19, 2026 19:30
@sokra sokra merged commit 7984e4a into canary Mar 20, 2026
154 of 158 checks passed
@sokra sokra deleted the sokra/turbopack-cli branch March 20, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by: Turbopack team PRs by the Turbopack team. Turbopack Related to Turbopack with Next.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants