-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[turbopack] Implement resolution for local Vcs (#68472)
*This is a migrated PR. This was in the turbo repository before the next.js merge.* **Migrated From:** vercel/turborepo#8826 ### Description Builds on the minimal implementation of local Vcs in #68469 At some point, we need to return local Vcs or pass them to another function as an argument. However, local Vcs are only valid within the context of the current task. The solution is that we need to convert local `Vc`s to non-local `Vc`s, and the easiest way to do that is to `.resolve()` it! This PR creates the new non-local cell on the current task, re-using the SharedReference the was used for the local cell, along with it's type id information. `RawVc` lacks information about the compile-time type `T`. Even `Vc` may know the real type of `T` if the `Vc` has been downcast to `Vc<Box<dyn ...>>`. To solve for this, we perform a lookup of the `VcCellMode::raw_cell` method using the type id (I added `raw_cell` in #68467). ### Testing Instructions ``` cargo nextest r -p turbo-tasks -p turbo-tasks-memory ```
- Loading branch information
1 parent
c29f5a8
commit 38ec68d
Showing
9 changed files
with
169 additions
and
41 deletions.
There are no files selected for viewing
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 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 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 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 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 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 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
Oops, something went wrong.