### What? Optimizes the `get_compilation_issues` MCP tool to use a single whole-app module graph computation instead of iterating all endpoint groups and computing per-route module graphs individually. ### Why? The `get_compilation_issues` MCP tool was too slow for large apps because `get_all_compilation_issues_inner_operation` called `endpoint_group.module_graphs()` for every endpoint group, computing separate per-route module graphs. This is O(routes) graph computations when a single whole-app graph would suffice. The reason the original code didn't use `whole_app_module_graphs()` was that it calls `drop_issues()` in development mode (to prevent every route from re-reporting all issues during HMR). This would suppress the issues the MCP tool needs to collect. ### How? - **New method `Project::whole_app_module_graphs_without_dropping_issues()`** — calls the same underlying `whole_app_module_graph_operation` (the `#[turbo_tasks::function(operation, root)]` computation) but connects the result without dropping issues. Issues propagate normally so callers can collect them. - **`get_all_compilation_issues_inner_operation`** now calls this new method instead of iterating endpoint groups, reducing the work to a single graph computation. - **Extracted `scale_down_node_pool` helper** — the Node.js process pool scale-down logic (shared between both `whole_app_module_graphs` variants) is extracted into a free function to avoid duplication. - **Existing `whole_app_module_graphs()`** is unchanged in behavior — still drops issues in dev mode for HMR per-route subscriptions. <!-- NEXT_JS_LLM_PR --> --------- Co-authored-by: Tobias Koppers <[email protected]> Co-authored-by: Claude <[email protected]>
Getting Started
Used by some of the world's largest companies, Next.js enables you to create full-stack web applications by extending the latest React features, and integrating powerful Rust-based JavaScript tooling for the fastest builds.
- Visit our Learn Next.js course to get started with Next.js.
- Visit the Next.js Showcase to see more sites built with Next.js.
Documentation
Visit https://nextjs.org/docs to view the full documentation.
Community
The Next.js community can be found on GitHub Discussions where you can ask questions, voice ideas, and share your projects with other people.
To chat with other community members you can join the Next.js Discord server.
Do note that our Code of Conduct applies to all Next.js community channels. Users are highly encouraged to read and adhere to it to avoid repercussions.
Contributing
Contributions to Next.js are welcome and highly appreciated. However, before you jump right into it, we would like you to review our Contribution Guidelines to make sure you have a smooth experience contributing to Next.js.
Good First Issues:
We have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place for newcomers and beginners alike to get started, gain experience, and get familiar with our contribution process.
Security
If you believe you have found a security vulnerability in Next.js, we encourage you to responsibly disclose this and NOT open a public issue.
To participate in our Open Source Software Bug Bounty program, please email [email protected]. We will add you to the program and provide further instructions for submitting your report.