-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
#[turbo_tasks::value(transparent)]: Generate docs & fail on invalid callsites #8087
Conversation
Most `#[turbo_tasks::value(transparent)]` types leave their inner value as private. I think this okay, but because rustdoc hides private fields by default, it makes it hard to understand at a glance the contained value, without scrolling down to the `impl` of `VcValueType`. This auto-generates documentation for these types.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Ignored Deployments
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
🟢 Turbopack Benchmark CI successful 🟢Thanks |
✅ This change can build |
|
…no-op vercel/next.js#65336 fixes the issues surfaced in next.js.
124c6fd
to
d988775
Compare
Yeah, I noticed that too. Good that you fixed that. |
…allsites (vercel#8087) ### Description Most `#[turbo_tasks::value(transparent)]` types leave their inner value as private. I think this okay, but because rustdoc hides private fields by default, it makes it hard to understand at a glance the contained value, without scrolling down to the `impl` of `VcValueType`. This PR generates documentation for these.  <details> <summary>Also checked that it works if there's an existing doc comment, extending rather than replacing the existing documentation.</summary>  </details> **Alternative:** We could fail if the field is non-`pub`, and update the callsites. Let me know if this is preferred. The contained fields are *basically* public anyways, as they can be accessed via `Vc`'s APIs. While modifying this code, I realized that we don't generate an error if `#[turbo_tasks::value(transparent)]` would be a no-op. The second commit in this PR adds an error and updates the callsites. This also exposed some issues in the next.js repository, which are fixed in vercel/next.js#65337 . ### Testing Instructions <!-- Give a quick description of steps to test your changes. --> Closes PACK-3038
…allsites (vercel/turborepo#8087) ### Description Most `#[turbo_tasks::value(transparent)]` types leave their inner value as private. I think this okay, but because rustdoc hides private fields by default, it makes it hard to understand at a glance the contained value, without scrolling down to the `impl` of `VcValueType`. This PR generates documentation for these.  <details> <summary>Also checked that it works if there's an existing doc comment, extending rather than replacing the existing documentation.</summary>  </details> **Alternative:** We could fail if the field is non-`pub`, and update the callsites. Let me know if this is preferred. The contained fields are *basically* public anyways, as they can be accessed via `Vc`'s APIs. While modifying this code, I realized that we don't generate an error if `#[turbo_tasks::value(transparent)]` would be a no-op. The second commit in this PR adds an error and updates the callsites. This also exposed some issues in the next.js repository, which are fixed in #65337 . ### Testing Instructions <!-- Give a quick description of steps to test your changes. --> Closes PACK-3038
…allsites (vercel/turborepo#8087) ### Description Most `#[turbo_tasks::value(transparent)]` types leave their inner value as private. I think this okay, but because rustdoc hides private fields by default, it makes it hard to understand at a glance the contained value, without scrolling down to the `impl` of `VcValueType`. This PR generates documentation for these.  <details> <summary>Also checked that it works if there's an existing doc comment, extending rather than replacing the existing documentation.</summary>  </details> **Alternative:** We could fail if the field is non-`pub`, and update the callsites. Let me know if this is preferred. The contained fields are *basically* public anyways, as they can be accessed via `Vc`'s APIs. While modifying this code, I realized that we don't generate an error if `#[turbo_tasks::value(transparent)]` would be a no-op. The second commit in this PR adds an error and updates the callsites. This also exposed some issues in the next.js repository, which are fixed in #65337 . ### Testing Instructions <!-- Give a quick description of steps to test your changes. --> Closes PACK-3038
…allsites (vercel/turborepo#8087) ### Description Most `#[turbo_tasks::value(transparent)]` types leave their inner value as private. I think this okay, but because rustdoc hides private fields by default, it makes it hard to understand at a glance the contained value, without scrolling down to the `impl` of `VcValueType`. This PR generates documentation for these.  <details> <summary>Also checked that it works if there's an existing doc comment, extending rather than replacing the existing documentation.</summary>  </details> **Alternative:** We could fail if the field is non-`pub`, and update the callsites. Let me know if this is preferred. The contained fields are *basically* public anyways, as they can be accessed via `Vc`'s APIs. While modifying this code, I realized that we don't generate an error if `#[turbo_tasks::value(transparent)]` would be a no-op. The second commit in this PR adds an error and updates the callsites. This also exposed some issues in the next.js repository, which are fixed in #65337 . ### Testing Instructions <!-- Give a quick description of steps to test your changes. --> Closes PACK-3038
…allsites (vercel/turborepo#8087) ### Description Most `#[turbo_tasks::value(transparent)]` types leave their inner value as private. I think this okay, but because rustdoc hides private fields by default, it makes it hard to understand at a glance the contained value, without scrolling down to the `impl` of `VcValueType`. This PR generates documentation for these.  <details> <summary>Also checked that it works if there's an existing doc comment, extending rather than replacing the existing documentation.</summary>  </details> **Alternative:** We could fail if the field is non-`pub`, and update the callsites. Let me know if this is preferred. The contained fields are *basically* public anyways, as they can be accessed via `Vc`'s APIs. While modifying this code, I realized that we don't generate an error if `#[turbo_tasks::value(transparent)]` would be a no-op. The second commit in this PR adds an error and updates the callsites. This also exposed some issues in the next.js repository, which are fixed in #65337 . ### Testing Instructions <!-- Give a quick description of steps to test your changes. --> Closes PACK-3038
Description
Most
#[turbo_tasks::value(transparent)]
types leave their inner value as private. I think this okay, but because rustdoc hides private fields by default, it makes it hard to understand at a glance the contained value, without scrolling down to theimpl
ofVcValueType
. This PR generates documentation for these.Also checked that it works if there's an existing doc comment, extending rather than replacing the existing documentation.
Alternative: We could fail if the field is non-
pub
, and update the callsites. Let me know if this is preferred. The contained fields are basically public anyways, as they can be accessed viaVc
's APIs.While modifying this code, I realized that we don't generate an error if
#[turbo_tasks::value(transparent)]
would be a no-op. The second commit in this PR adds an error and updates the callsites. This also exposed some issues in the next.js repository, which are fixed in vercel/next.js#65336 .Testing Instructions
Closes PACK-3038