-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix wildcard typo in scopes docs #193
Merged
jaredpalmer
merged 1 commit into
vercel:main
from
KarelVerschraegen:fix-wild-card-wildcard-typo
Dec 11, 2021
Merged
Fix wildcard typo in scopes docs #193
jaredpalmer
merged 1 commit into
vercel:main
from
KarelVerschraegen:fix-wild-card-wildcard-typo
Dec 11, 2021
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
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/vercel/turbo-site/yosw6YXhvXGt5wAG1XoSTts48tT1 |
sokra
pushed a commit
that referenced
this pull request
Oct 25, 2022
This PR builds our own `Debug`-like derive-macro machinery for formatting structs, relying on `std::fmt::Formatter` for the actual formatting. ### Usage A new `ValueDebug` trait is automatically implemented for all `#[turbo_tasks::value]`s, which has a single `.dbg()` method which resolves to a debug representation that can then be printed to the screen. `#[turbo_tasks::value_trait]` also implement the `.dbg()` method directly. ```rust dbg!(any_vc.dbg().await?); ``` If you have a `#[turbo_tasks::value]` struct with a field that doesn't implement `Debug`, you'll want to declare that field as `#[debug_ignore]`. For instance: ```rust #[turbo_tasks::value(ContentSource, serialization: none, eq: manual, cell: new, into: new)] pub struct TurboTasksSource { #[debug_ignore] #[trace_ignore] pub turbo_tasks: Arc<TurboTasks<MemoryBackend>>, } ``` ### Why not use `Debug` directly? We can't use `Debug` because our values are resolved asynchronously and can nest `Vc`s arbitrarily. I tried using `futures::executor::block_on` to resolve them synchronously in a `Debug` implementation but that causes deadlocks.
jridgewell
pushed a commit
to vercel/next.js
that referenced
this pull request
Mar 10, 2023
This PR builds our own `Debug`-like derive-macro machinery for formatting structs, relying on `std::fmt::Formatter` for the actual formatting. ### Usage A new `ValueDebug` trait is automatically implemented for all `#[turbo_tasks::value]`s, which has a single `.dbg()` method which resolves to a debug representation that can then be printed to the screen. `#[turbo_tasks::value_trait]` also implement the `.dbg()` method directly. ```rust dbg!(any_vc.dbg().await?); ``` If you have a `#[turbo_tasks::value]` struct with a field that doesn't implement `Debug`, you'll want to declare that field as `#[debug_ignore]`. For instance: ```rust #[turbo_tasks::value(ContentSource, serialization: none, eq: manual, cell: new, into: new)] pub struct TurboTasksSource { #[debug_ignore] #[trace_ignore] pub turbo_tasks: Arc<TurboTasks<MemoryBackend>>, } ``` ### Why not use `Debug` directly? We can't use `Debug` because our values are resolved asynchronously and can nest `Vc`s arbitrarily. I tried using `futures::executor::block_on` to resolve them synchronously in a `Debug` implementation but that causes deadlocks.
sokra
pushed a commit
to vercel/next.js
that referenced
this pull request
Mar 13, 2023
This PR builds our own `Debug`-like derive-macro machinery for formatting structs, relying on `std::fmt::Formatter` for the actual formatting. ### Usage A new `ValueDebug` trait is automatically implemented for all `#[turbo_tasks::value]`s, which has a single `.dbg()` method which resolves to a debug representation that can then be printed to the screen. `#[turbo_tasks::value_trait]` also implement the `.dbg()` method directly. ```rust dbg!(any_vc.dbg().await?); ``` If you have a `#[turbo_tasks::value]` struct with a field that doesn't implement `Debug`, you'll want to declare that field as `#[debug_ignore]`. For instance: ```rust #[turbo_tasks::value(ContentSource, serialization: none, eq: manual, cell: new, into: new)] pub struct TurboTasksSource { #[debug_ignore] #[trace_ignore] pub turbo_tasks: Arc<TurboTasks<MemoryBackend>>, } ``` ### Why not use `Debug` directly? We can't use `Debug` because our values are resolved asynchronously and can nest `Vc`s arbitrarily. I tried using `futures::executor::block_on` to resolve them synchronously in a `Debug` implementation but that causes deadlocks.
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
According to Wikipedia, Microsoft and NextJS,
wildcard
is the correct writing.(Sorry for all the typo PR's 🙈 )