-
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
fix equal checks for cells and output #8721
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
|
@@ -43,7 +43,7 @@ pub trait GenerateSourceMap { | |||
/// The distinction between the source map spec's [sourcemap::Index] and our | |||
/// [SourceMap::Sectioned] is whether the sections are represented with Vcs | |||
/// pointers. | |||
#[turbo_tasks::value(shared)] | |||
#[turbo_tasks::value(shared, cell = "new")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cell = "new"
changes the behavior of .cell()
to no longer perform an ==
check and just always override the cell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we determine which cells should always be overridden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you don't want cells to ever match using equality? Which I imagine should be never unless you've got another bug (e.g. inconsistent cell creation order?).
I agree this seems weird and like we're masking bigger problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you don't want cells to ever match using equality?
- some types have very expensive equal checks and are very unlikely to be equal (e. g. the parsed AST or the SourceMap)
- some types don't have a equality defined
- some types define equality in a way that it never matches
But in general you want to check equality for early stop bubbling invaliations...
🟢 Turbopack Benchmark CI successful 🟢Thanks |
if let OutputContent::Link(old_target) = &self.content { | ||
if *old_target == target { | ||
// unchanged | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can early return when returning the same value again.
Previously this notified all dependent tasks, which is unnecessary.
✅ This change can build |
|
@@ -43,7 +43,7 @@ pub trait GenerateSourceMap { | |||
/// The distinction between the source map spec's [sourcemap::Index] and our | |||
/// [SourceMap::Sectioned] is whether the sections are represented with Vcs | |||
/// pointers. | |||
#[turbo_tasks::value(shared)] | |||
#[turbo_tasks::value(shared, cell = "new")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you don't want cells to ever match using equality? Which I imagine should be never unless you've got another bug (e.g. inconsistent cell creation order?).
I agree this seems weird and like we're masking bigger problems.
* vercel/turborepo#8721 <!-- Tobias Koppers - fix equal checks for cells and output --> * vercel/turborepo#8671 <!-- Tobias Koppers - add unloading of tasks to GC --> * vercel/turborepo#8749 <!-- Tobias Koppers - fix unloading stateful check --> * vercel/turborepo#8750 <!-- Tobias Koppers - upgrade deps to avoid conflict with next.js -->
### Description * Check for equal Vc on returning a value * Avoid PartialEq checks for values that are never equal ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
### Description * Check for equal Vc on returning a value * Avoid PartialEq checks for values that are never equal ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
### Description * Check for equal Vc on returning a value * Avoid PartialEq checks for values that are never equal ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
### Description * Check for equal Vc on returning a value * Avoid PartialEq checks for values that are never equal ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
* vercel/turborepo#8721 <!-- Tobias Koppers - fix equal checks for cells and output --> * vercel/turborepo#8671 <!-- Tobias Koppers - add unloading of tasks to GC --> * vercel/turborepo#8749 <!-- Tobias Koppers - fix unloading stateful check --> * vercel/turborepo#8750 <!-- Tobias Koppers - upgrade deps to avoid conflict with next.js -->
Description
Testing Instructions