-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
What version of Turborepo are you using?
1.4.0
What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Mac
Describe the Bug
The peer dependencies are not considered part of the dependency graph. This issue has roots in #813 where they are ignored while creating the graph because of some dependency cycle issues mentioned in the PR.
Expected Behavior
Construct dependency graph including peer dependencies. Peer dependencies are one of the complementary tools which are used in monorepos, and simply ignoring them doesn't seem a good solution.
To Reproduce
- Suppose the following monorepo structure:
/app
/some-app
/packages
/dependent-a
/dependent-b
/c
-
Suppose that
dependent-a
anddependent-b
hasc
as peer dependency, andsome-app
has all packages (dependent-a
,dependent-b
andc
) as dependency. -
Suppose
turbo.json
looks like this:
{
"$schema": "https://turborepo.org/schema.json",
"pipeline": {
"build": {
"dependsOn": ["^build"]
}
}
}
- When you run
turbo run build
onsome-app
(using--filter=some-app
), it triggers build for all of the packages concurrently, completely unable to buildc
first and clearly causing issues.
I think this is a common scenario for plugin based apps, as the plugins may include other plugins as peer dependency (and not a regular dependency).
janober, michaelyali, tayjohno, Iku-turso and en-raimichaelyali and shuta13
Metadata
Metadata
Assignees
Labels
No labels