Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move lockfile ffi boundary (#4629)
### Description In order to avoid Go holding onto memory that's been allocated by Rust we parse the lockfile each time we need to make a lockfile call. This worked fine for the npm implementation as we just needed parse the JSON and it was usable, but Berry requires a lot more work/allocations that makes this strategy unfeasible. A quick sketch of the changes in this PR: - Moves the traversal of the lockfile to be the final step of building the package graph - We now calculate all of the closures of all workspaces at once - Rust FFI now takes the package manager string to select the lockfile implementation. This is a quick prefactor to prepare for hooking up the berry lockfile Reviewer notes: - Each commit can be reviewed on it's own, the first commit ended up getting reverted down the stack so it can be skipped. ### Testing Instructions Existing unit tests/integration tests. Manual verification of correct pruning behavior for the npm and pnpm monorepos created by `create-turbo@latest`
- Loading branch information
1 parent
34a0740
commit 1c8d3aa
Showing
16 changed files
with
811 additions
and
251 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
Oops, something went wrong.