turbo gets stuck on Linux, works just fine on MacOS #10736
-
SummaryRunning Since I'm suspecting I'm doing something wrong, I'll ask here first before trying to open an actual bug report. Turbo version: 2.5.4 We have a monorepo: All the projects under There are of course no cyclic dependencies. All our {
"scripts": {
"build-dependencies": "PACKAGE_NAME=$(npm pkg get name | jq -r 'to_entries[0].value') && turbo run build --filter \"$PACKAGE_NAME^...\"",
"prebuild": "npm run build-dependencies",
"build": "the actual build command",
"pretest": "npm run build-dependencies",
"test": "the actual test command"
}
}The Since all the So what we see, especially when the cache is relatively empty or we made changes to most shared packages, is that we get nested turbo runs. And we're wondering if that is the root cause of our problem. Our reasons for having this structure:
So my question is: are we doing this correctly with that Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
After some experimenting, I managed to fix it as follows. In my turbo.json, I now have: "tasks": {
"build:turbo": {
"dependsOn": ["^build:turbo"]
},
"build-dependencies:turbo": {
"dependsOn": ["^build:turbo"]
}
}and in my "scripts": {
"build": "PACKAGE_NAME=$(npm pkg get name | jq -r 'to_entries[0].value') && turbo run build:turbo --filter=\"$PACKAGE_NAME\"",
"build-dependencies": "PACKAGE_NAME=$(npm pkg get name | jq -r 'to_entries[0].value') && turbo run build-dependencies:turbo --filter=\"$PACKAGE_NAME\"",
"build-dependencies:turbo": "echo \"turbo already builds dependencies\"",
"build:turbo": "tsc",
"pretest": "npm run build-dependencies",
"test": "my actual test command"
}So now when I run:
This seems to sole the deadlock, so the assumption it was caused by nested I'm gonna leave the discussion open for now in case somebody drops by to tell me my solution is way too complicated, and there exist far easier solutions to achieve this. |
Beta Was this translation helpful? Give feedback.
After some experimenting, I managed to fix it as follows.
In my turbo.json, I now have:
and in my
package.jsonfiles, I use