Shouldn't an out-of-date dependency trigger an otherwise up-to-date task? #669
-
Hi everyone, First of all, thanks for the great tool! I just noticed that when a dependency is out-of-date, that doesn't necessarily trigger the target task. The scenario that I have is that of a target task (T) that generates some files and requires a file generated by another task (A). The way I tried to implement that was by listing the task (A) as a dependency of (T) and also listing sources and generates for the task (T). I expected that if task (A) is out-of-date, that will trigger task (T) as well, but that isn't the case. I assume that I can list the file generated by task (A) in the sources of (T), and that will fix the issue, but I am curious why this isn't implied, given that (A) is a dependency of (T). What is a scenario for which the current approach is desired? Here is a minimal reproducible example that uses
and here is the output that I get:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 14 replies
-
I forgot to mention that I would work on a PR if allowing for such behavior (other by default or through an option) is something others find useful. |
Beta Was this translation helpful? Give feedback.
-
Hi @ConX, thanks for reaching out (and @ghostsquad for the good inputs). Regarding this question:
I think this web app example, although a very basic example, explains what I had in mind when I initially implemented this feature: In this case It never come to my mind that someone would want to trigger a run when a dependency change in a scenario where you wouldn't add the generated files of the dependencies as the task source. Seems that I was wrong, because with DevOps/Infra stuff you not always deal with files. Also, in the beginning All that said my thoughts are:
|
Beta Was this translation helpful? Give feedback.
-
Hi together! I have a similar use case. I have several Dockerimages that depend on each other. I have a small workaround for it. I added the checksum file ( |
Beta Was this translation helpful? Give feedback.
Hi @ConX, thanks for reaching out (and @ghostsquad for the good inputs).
Regarding this question:
I think this web app example, although a very basic example, explains what I had in mind when I initially implemented this feature:
In this case
js
andcss
are dependencies ofassets
, which is a dependency ofbuild
. If you look at thesources
of each task, you'll see it'll automatically work as you expect, because each task has as a source the generated files of its dependencies.It never come to my mind that someone would want to tri…