-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement bindings for Turbopack trace server #8094
Merged
sokra
merged 1 commit into
main
from
05-06-Implement_bindings_for_Turbopack_trace_server
May 6, 2024
Merged
Implement bindings for Turbopack trace server #8094
sokra
merged 1 commit into
main
from
05-06-Implement_bindings_for_Turbopack_trace_server
May 6, 2024
+36
−0
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
7 Ignored Deployments
|
turbo-orchestrator
bot
added
needs: triage
New issues get this label. Remove it after triage
owned-by: turborepo
labels
May 6, 2024
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @timneutkens and the rest of your teammates on Graphite |
🟢 Turbopack Benchmark CI successful 🟢Thanks |
✅ This change can build |
|
sokra
approved these changes
May 6, 2024
timneutkens
added a commit
to vercel/next.js
that referenced
this pull request
May 6, 2024
## What? Implements support for running the Turbopack trace server, which is the websocket server that powers https://turbo-trace-viewer.vercel.app/ when using `NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1`. Currently you have to manually run the server through the Turbo repository which in practice means that only people working on Turbopack are able to run it. With the bindings implemented anyone should be able to run the trace server. Note that the traces that come out of Turbopack are very low level, they're meant for optimizing Turbopack like finding slowdowns / large memory usage / optimizing performance. However, it's useful for people that want to peek into why their application is slow to compile. I.e. we've used https://turbo-trace-viewer.vercel.app to investigate reports in #48748. This PR adds support for `trace.log` by default, so if you add `NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1` it will automatically select the `trace.log` for the current instance of Next.js. You can only have one trace server running at the same time. ### `next internal` In order to support running the trace server standalone, which is useful for investigating trace files other people have shared, I've added a new subcommand `internal` that is not covered by semver / use at your own risk. It's meant for internal tools that are useful to be bound to the version of Next.js, the turbo-trace-server is a great example of that as it has an internal binary format for storing data that needs to match the trace.log file. If you want to take a look at `.next/trace` instead the new `next internal` subcommand can be used for that: ```sh # Replace [path] with a path to a file. next internal turbo-trace-server [path] ``` For example: ```sh next internal turbo-trace-server ~/Downloads/trace ``` Currently the trace server does not support loading multiple files, just hasn't been implemented yet. Once we can load two or more files we can load both `.next/trace` and `trace.log` when `NEXT_TURBOPACK_TRACE_SERVER=1` and support multiple paths passed to `next internal turbo-trace-server`. ### Turbopack upgrade PR includes a Turbopack upgrade: * vercel/turborepo#8073 <!-- OJ Kwon - feat(webpack-loaders): support dummy span interface --> * vercel/turborepo#8083 <!-- OJ Kwon - fix(webpack): print resource, project path when relative calc fails --> * vercel/turborepo#8094 <!-- Tim Neutkens - Implement bindings for Turbopack trace server --> <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-3328
chris-olszewski
pushed a commit
that referenced
this pull request
May 7, 2024
### Description Implement turbopack_bindings for the trace server. Added under `turbopack_bindings::turbopack::trace_server`. Currently only exposing one function: `turbopack_bindings::turbopack::trace_server::start_turbopack_trace_server` <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
sokra
added a commit
to vercel/next.js
that referenced
this pull request
May 8, 2024
* vercel/turborepo#8073 <!-- OJ Kwon - feat(webpack-loaders): support dummy span interface --> * vercel/turborepo#8083 <!-- OJ Kwon - fix(webpack): print resource, project path when relative calc fails --> * vercel/turborepo#8094 <!-- Tim Neutkens - Implement bindings for Turbopack trace server --> * vercel/turborepo#8061 <!-- Tobias Koppers - reduce memory usage in analyser --> * vercel/turborepo#8077 <!-- Alexander Lyon - Remove async-trait from a few crates --> * vercel/turborepo#8102 <!-- Tobias Koppers - fix memory counting without custom allocator --> * vercel/turborepo#8096 <!-- Benjamin Woodruff - turbo-tasks: Expand `<T as TaskOutput>::Return` values in macros --> * vercel/turborepo#8105 <!-- Benjamin Woodruff - turbopack-node: Use path.join for postcss loader --> * vercel/turborepo#8099 <!-- Tim Neutkens - Replace websocket with tungstenite for turbo-trace-server --> * vercel/turborepo#8060 <!-- Donny/강동윤 - feat: Add lint for `grid-template-areas` --> * vercel/turborepo#8110 <!-- Tobias Koppers - fix lockfile -->
Neosoulink
pushed a commit
to Neosoulink/turbo
that referenced
this pull request
Jun 14, 2024
### Description Implement turbopack_bindings for the trace server. Added under `turbopack_bindings::turbopack::trace_server`. Currently only exposing one function: `turbopack_bindings::turbopack::trace_server::start_turbopack_trace_server` <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Jul 25, 2024
### Description Implement turbopack_bindings for the trace server. Added under `turbopack_bindings::turbopack::trace_server`. Currently only exposing one function: `turbopack_bindings::turbopack::trace_server::start_turbopack_trace_server` <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Jul 29, 2024
### Description Implement turbopack_bindings for the trace server. Added under `turbopack_bindings::turbopack::trace_server`. Currently only exposing one function: `turbopack_bindings::turbopack::trace_server::start_turbopack_trace_server` <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Jul 29, 2024
### Description Implement turbopack_bindings for the trace server. Added under `turbopack_bindings::turbopack::trace_server`. Currently only exposing one function: `turbopack_bindings::turbopack::trace_server::start_turbopack_trace_server` <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Aug 1, 2024
### Description Implement turbopack_bindings for the trace server. Added under `turbopack_bindings::turbopack::trace_server`. Currently only exposing one function: `turbopack_bindings::turbopack::trace_server::start_turbopack_trace_server` <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Aug 14, 2024
Implements support for running the Turbopack trace server, which is the websocket server that powers https://turbo-trace-viewer.vercel.app/ when using `NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1`. Currently you have to manually run the server through the Turbo repository which in practice means that only people working on Turbopack are able to run it. With the bindings implemented anyone should be able to run the trace server. Note that the traces that come out of Turbopack are very low level, they're meant for optimizing Turbopack like finding slowdowns / large memory usage / optimizing performance. However, it's useful for people that want to peek into why their application is slow to compile. I.e. we've used https://turbo-trace-viewer.vercel.app to investigate reports in #48748. This PR adds support for `trace.log` by default, so if you add `NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1` it will automatically select the `trace.log` for the current instance of Next.js. You can only have one trace server running at the same time. In order to support running the trace server standalone, which is useful for investigating trace files other people have shared, I've added a new subcommand `internal` that is not covered by semver / use at your own risk. It's meant for internal tools that are useful to be bound to the version of Next.js, the turbo-trace-server is a great example of that as it has an internal binary format for storing data that needs to match the trace.log file. If you want to take a look at `.next/trace` instead the new `next internal` subcommand can be used for that: ```sh next internal turbo-trace-server [path] ``` For example: ```sh next internal turbo-trace-server ~/Downloads/trace ``` Currently the trace server does not support loading multiple files, just hasn't been implemented yet. Once we can load two or more files we can load both `.next/trace` and `trace.log` when `NEXT_TURBOPACK_TRACE_SERVER=1` and support multiple paths passed to `next internal turbo-trace-server`. PR includes a Turbopack upgrade: * vercel/turborepo#8073 <!-- OJ Kwon - feat(webpack-loaders): support dummy span interface --> * vercel/turborepo#8083 <!-- OJ Kwon - fix(webpack): print resource, project path when relative calc fails --> * vercel/turborepo#8094 <!-- Tim Neutkens - Implement bindings for Turbopack trace server --> <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change Closes NEXT- Fixes # --> Closes NEXT-3328
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Aug 15, 2024
Implements support for running the Turbopack trace server, which is the websocket server that powers https://turbo-trace-viewer.vercel.app/ when using `NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1`. Currently you have to manually run the server through the Turbo repository which in practice means that only people working on Turbopack are able to run it. With the bindings implemented anyone should be able to run the trace server. Note that the traces that come out of Turbopack are very low level, they're meant for optimizing Turbopack like finding slowdowns / large memory usage / optimizing performance. However, it's useful for people that want to peek into why their application is slow to compile. I.e. we've used https://turbo-trace-viewer.vercel.app to investigate reports in #48748. This PR adds support for `trace.log` by default, so if you add `NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1` it will automatically select the `trace.log` for the current instance of Next.js. You can only have one trace server running at the same time. In order to support running the trace server standalone, which is useful for investigating trace files other people have shared, I've added a new subcommand `internal` that is not covered by semver / use at your own risk. It's meant for internal tools that are useful to be bound to the version of Next.js, the turbo-trace-server is a great example of that as it has an internal binary format for storing data that needs to match the trace.log file. If you want to take a look at `.next/trace` instead the new `next internal` subcommand can be used for that: ```sh next internal turbo-trace-server [path] ``` For example: ```sh next internal turbo-trace-server ~/Downloads/trace ``` Currently the trace server does not support loading multiple files, just hasn't been implemented yet. Once we can load two or more files we can load both `.next/trace` and `trace.log` when `NEXT_TURBOPACK_TRACE_SERVER=1` and support multiple paths passed to `next internal turbo-trace-server`. PR includes a Turbopack upgrade: * vercel/turborepo#8073 <!-- OJ Kwon - feat(webpack-loaders): support dummy span interface --> * vercel/turborepo#8083 <!-- OJ Kwon - fix(webpack): print resource, project path when relative calc fails --> * vercel/turborepo#8094 <!-- Tim Neutkens - Implement bindings for Turbopack trace server --> <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change Closes NEXT- Fixes # --> Closes NEXT-3328
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Aug 16, 2024
Implements support for running the Turbopack trace server, which is the websocket server that powers https://turbo-trace-viewer.vercel.app/ when using `NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1`. Currently you have to manually run the server through the Turbo repository which in practice means that only people working on Turbopack are able to run it. With the bindings implemented anyone should be able to run the trace server. Note that the traces that come out of Turbopack are very low level, they're meant for optimizing Turbopack like finding slowdowns / large memory usage / optimizing performance. However, it's useful for people that want to peek into why their application is slow to compile. I.e. we've used https://turbo-trace-viewer.vercel.app to investigate reports in #48748. This PR adds support for `trace.log` by default, so if you add `NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1` it will automatically select the `trace.log` for the current instance of Next.js. You can only have one trace server running at the same time. In order to support running the trace server standalone, which is useful for investigating trace files other people have shared, I've added a new subcommand `internal` that is not covered by semver / use at your own risk. It's meant for internal tools that are useful to be bound to the version of Next.js, the turbo-trace-server is a great example of that as it has an internal binary format for storing data that needs to match the trace.log file. If you want to take a look at `.next/trace` instead the new `next internal` subcommand can be used for that: ```sh next internal turbo-trace-server [path] ``` For example: ```sh next internal turbo-trace-server ~/Downloads/trace ``` Currently the trace server does not support loading multiple files, just hasn't been implemented yet. Once we can load two or more files we can load both `.next/trace` and `trace.log` when `NEXT_TURBOPACK_TRACE_SERVER=1` and support multiple paths passed to `next internal turbo-trace-server`. PR includes a Turbopack upgrade: * vercel/turborepo#8073 <!-- OJ Kwon - feat(webpack-loaders): support dummy span interface --> * vercel/turborepo#8083 <!-- OJ Kwon - fix(webpack): print resource, project path when relative calc fails --> * vercel/turborepo#8094 <!-- Tim Neutkens - Implement bindings for Turbopack trace server --> <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change Closes NEXT- Fixes # --> Closes NEXT-3328
ForsakenHarmony
pushed a commit
to vercel/next.js
that referenced
this pull request
Aug 16, 2024
* vercel/turborepo#8073 <!-- OJ Kwon - feat(webpack-loaders): support dummy span interface --> * vercel/turborepo#8083 <!-- OJ Kwon - fix(webpack): print resource, project path when relative calc fails --> * vercel/turborepo#8094 <!-- Tim Neutkens - Implement bindings for Turbopack trace server --> * vercel/turborepo#8061 <!-- Tobias Koppers - reduce memory usage in analyser --> * vercel/turborepo#8077 <!-- Alexander Lyon - Remove async-trait from a few crates --> * vercel/turborepo#8102 <!-- Tobias Koppers - fix memory counting without custom allocator --> * vercel/turborepo#8096 <!-- Benjamin Woodruff - turbo-tasks: Expand `<T as TaskOutput>::Return` values in macros --> * vercel/turborepo#8105 <!-- Benjamin Woodruff - turbopack-node: Use path.join for postcss loader --> * vercel/turborepo#8099 <!-- Tim Neutkens - Replace websocket with tungstenite for turbo-trace-server --> * vercel/turborepo#8060 <!-- Donny/강동윤 - feat: Add lint for `grid-template-areas` --> * vercel/turborepo#8110 <!-- Tobias Koppers - fix lockfile -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Implement turbopack_bindings for the trace server. Added under
turbopack_bindings::turbopack::trace_server
. Currently only exposing one function:turbopack_bindings::turbopack::trace_server::start_turbopack_trace_server
Testing Instructions