-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
What is the improvement or update you wish to see?
I've just run into an issue where the --affected
flag does not take a task’s inputs
into account, which I think could be made clearer in the documentation. In my case, a graphql schema in a parent directory should be taken into account for a codegen
task, as it is part of the task's inputs
, and therefore cause caches misses in all tasks that depend on it. When adding --affected
to my CI runs, I noticed that a change to the schema file doesn't cause the codegen
tasks to run, as it is not deemed to be affected by the change (nor are any tasks), and as a result CI passes even though a type error is subsequently introduced.
Looking more closely at the documentation, I see a mention of "packages with code changes", which could suggest that only changes within the packages, and not their inputs, are considered? If this is the case, I think the docs could be made a lot clearer on the point.
Is there any context that might help us understand?
I considered whether this should be a bug report or a documentation request, but given that the language is a little unclear, I decided on the latter.
Does the docs page already exist? Please link to it.
https://turbo.build/repo/docs/crafting-your-repository/constructing-ci#running-only-affected-tasks