encounter a issue that task caching not working anymore.
I have a simple task running just
echo 1
with sources
and generates
. and it's hash in .task/checksum/
doesn't change.
But it never consider up to date
and command always run.
I have same version task on debian and it's ok, but not working as expected on windows
Is this maybe a bug?8 Replies
Hi @trim21,
Can you provide an example Taskfile that reproduces the issue?
OK, I find reason. I have a glob defined in
generated
doesn't match any files.
so it always consider out of date
but the file it generated is platform-specific, any way I can workaround this?
of is this expected behavior or it's a bug?That's a by design behavior. If any of the entries do not have any files, Task will run. The idea is that if the generated file was deleted, it should be re-generated.
make sense
anyway I can workaround this? looks like I'll have to write 2 internal task for this?
Yeah, having separed tasks for Windows and others is probably the most obvious solution. You can use
platforms:
for that: https://taskfile.dev/usage/#platform-specific-tasks-and-commandsthanks
not an ideal solution althrough
just read the source and find that I can use
*.{so,pyd}
in this caseGitHub
go-zglob/zglob_test.go at 9c2404f90757d91cb185ec081bf8bce3a03c5980 ...
Contribute to mattn/go-zglob development by creating an account on GitHub.
thanks anyway