[pull] canary from vercel:canary#787
Merged
pull[bot] merged 3 commits intocode:canaryfrom Feb 13, 2026
Merged
Conversation
…#89788) ## What Add a `#[derive(ValueToString)]` proc macro and convert ~45 manual `ValueToString` implementations across turbopack crates to use it (-660 lines of boilerplate, 49 files touched). ## Why Nearly every `ValueToString` impl follows the same pattern: format some fields into a string, possibly awaiting `Vc` values first. These hand-written impls are noisy boilerplate that obscure the actual format string. ## How The derive macro generates the `#[turbo_tasks::value_impl] impl ValueToString` block automatically. A helper trait `ValueToStringify` with a blanket impl for `Display` and specializations for `Vc<T>`/`ResolvedVc<T>` handles async resolution of fields. ### Supported forms - **No attribute** — delegates to `Display::to_string(&self)` - `#[value_to_string("constant")]` — emits `rcstr!` directly - `#[value_to_string("{field} text {other_field}")]` — auto-resolves named/positional fields via `ValueToStringify` - `#[value_to_string("fmt {}", expr1, expr2)]` — explicit expressions as format args - `#[value_to_string(expr)]` — single expression delegation Enums support per-variant attributes (defaulting to variant name) or a single top-level attribute.
This fixes a bug introduced in d77eb04 where installCompressedModuleFactories would skip installing factories for an entire group of module IDs if any ID in the group already had a factory registered. Test Plan: build https://github.com/vercel/workflow/tree/main/workbench/nextjs-turbopack
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )