You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the include namespacing causes task to treat every task as a unique one when multiple Taskfiles include a shared task.
We also noticed that if we run a "task build" in service-a and then service-b that the .task/ checksum cache is not shared and so the library is built twice. The same applies for any order of builds, i.e. building the library then the services.
Ideally the includes form a directed acyclic graph (DAG) and task will run the dependencies in order and only once (when run:once is set), with the task's checksum cache being considered.
Is this something in scope for improvement in taskfile v3?
The text was updated successfully, but these errors were encountered:
@ReillyBrogan No, the DAG changes do not resolve this issue currently. This is because we are still merging into ast.Taskfile once the DAG reader is done reading files. This will eventually go away and resolve this issue. However, we can do something to fix it in the meantime.
See #1655 for details. Feedback on the PR would be appreciated from anyone interested in this issue.
I'm currently working in a mono-repo of sorts and each of our services/libraries has a Taskfile with a "build" task.
When a service depends on a library we use "includes" and "deps" to make sure the library is built before the service is built.
We also have a root Taskfile that includes all service Taskfiles and calls their build task in a deps array.
This works really well but we've found that when a library is referenced by multiple services it will be built multiple times by the root Taskfile.
We also found that the "sources" feature doesn't work for tasks shared between included Taskfiles.
Here's the dry run from the root Taskfile showing the library getting built twice:
and here's what a service Taskfile looks like
and the library Taskfile
It seems like the include namespacing causes
task
to treat every task as a unique one when multiple Taskfiles include a shared task.We also noticed that if we run a "task build" in service-a and then service-b that the
.task/
checksum cache is not shared and so the library is built twice. The same applies for any order of builds, i.e. building the library then the services.Ideally the includes form a directed acyclic graph (DAG) and
task
will run the dependencies in order and only once (when run:once is set), with the task's checksum cache being considered.Is this something in scope for improvement in taskfile v3?
The text was updated successfully, but these errors were encountered: