Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow for workplace descriptors without a protocol (#4755)
### Description Fixes the issue found by @quinnturner in [#2891](#2791 (comment)). Crux of the issue was we were being too restrictive when tracking dependency protocols to properly infer them for later construction. We now allow for at most two descriptors in the protocol resolver: one without a protocol and one with a protocol. Another change was no longer adding all descriptors for a workspace and instead only including descriptors that come from other workspaces. ### Testing Instructions New testing fixture contains a lockfile where one workspace depends on another via `*` and the other depends on it via `workspace:*`.
- Loading branch information
1 parent
d4cb88f
commit 2db09b7
Showing
3 changed files
with
113 additions
and
8 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
crates/turborepo-lockfiles/fixtures/berry-protocol-collision.lock
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This file is generated by running "yarn install" inside your project. | ||
# Manual changes might be lost - proceed with caution! | ||
|
||
__metadata: | ||
version: 6 | ||
|
||
"a@workspace:packages/a": | ||
version: 0.0.0-use.local | ||
resolution: "a@workspace:packages/a" | ||
dependencies: | ||
c: "*" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"b@workspace:packages/b": | ||
version: 0.0.0-use.local | ||
resolution: "b@workspace:packages/b" | ||
dependencies: | ||
c: "workspace:*" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"c@*, c@workspace:*, c@workspace:packages/c": | ||
version: 0.0.0-use.local | ||
resolution: "c@workspace:packages/c" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"prune-edge@workspace:.": | ||
version: 0.0.0-use.local | ||
resolution: "prune-edge@workspace:." | ||
languageName: unknown | ||
linkType: soft |
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