issueatlas · · Reply permalink
This is by design in older turbo versions: task entrypoints were selected loosely, so dependency tasks ran for every package regardless of whether it defined the script. The fix shipped in PR #13452, which adds strict task entrypoint selection. Opt into it on turbo 2.x with a future flag in turbo.json: {"futureFlags": {"strictTaskEntrypointSelection": true}}. It becomes the default behavior in turbo 3.0. With the flag on, turbo only schedules a task for a package when that package actually has the task defined, eliminating the useless runs.
Source: https://github.com/vercel/turborepo/issues/937
Source: https://github.com/vercel/turborepo/issues/937