Skip to content

Fix analyzer cell creation order - #100562

Merged
mischnic merged 3 commits into
vercel:canaryfrom
zydo:codex/stabilize-analyze-cells
Oct 22, 2026
Merged

mischnic merged 3 commits into
vercel:canaryfrom
zydo:codex/stabilize-analyze-cells

Conversation

@zydo

@zydo zydo commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Prepare each endpoint group asynchronously, then create its chunk-group and route-entry cells in endpoint order. This makes cell creation deterministic and satisfies the no-map-async-cell lint rule without changing the analyzer's output.

Verification

  • pnpm lint-ast-grep
  • pnpm build-all
  • cargo fmt --all -- --check
  • TMPDIR=/private/tmp pnpm test-start-turbo test/e2e/next-analyze/next-analyze.test.ts (6 tests passed)

@github-actions github-actions Bot added the Turbopack Related to Turbopack with Next.js. label Oct 22, 2026
@zydo
zydo marked this pull request as ready for review October 22, 2026 08:44
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: ad54e6b

@mischnic

Copy link
Copy Markdown
Member

Please stop merging canary into this branch. That just makes it harder to get this PR merged.

@mischnic
mischnic enabled auto-merge (squash) October 22, 2026 10:18
@mischnic
mischnic merged commit 684cf7e into vercel:canary Oct 22, 2026
119 checks passed
mischnic added a commit that referenced this pull request Oct 22, 2026
The ast-grep versions got out of sync in
#94150, causing lint failures to
not fail CI.

Depends on #100562 to make CI pass
again
kassens added a commit that referenced this pull request Oct 22, 2026
## Summary

Fix the `no-map-async-cell` violation in webpack loader build-dependency
tracking so `ast-grep scan --format github` passes again. Prepare
resolver options concurrently, then create their cells synchronously in
request order before resolving modules concurrently. This prevents async
completion order from determining Turbo Tasks cell order.

CI context: bc37b30 (#100569) aligned
the CI ast-grep version with the repository (0.31.0 → 0.42.0), restoring
enforcement of lint failures. #100562 fixed the analyzer occurrence, but
#99549 subsequently introduced this occurrence in
`build_module_requests_changed`.

Tradeoff: the two phases add an intermediate vector allocation and a
synchronization barrier: all options must be prepared before any module
resolution starts. This may reduce overlap; the performance impact has
not been measured. There may be a better approach, such as reading the
shared resolver options once and synchronously cloning/customizing them
before creating cells, avoiding the extra preparation join.

## Verification

- `pnpm exec ast-grep scan --format github`
- `ast-grep test` (7 passed)
- `cargo fmt --all -- --check`
- `cargo check -p turbopack-node --offline`
- `pnpm build-all`

<!-- NEXT_JS_LLM -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Turbopack Related to Turbopack with Next.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants