-
-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: sources
are checked before running deps
#1494
Comments
I have the exactly same problem, seens whether a task is up to date is determined before any tasks executes, if its determined after dependency tasks finishs, the problem would be solved. |
The purpose of sources is to prevent unnecessary work, a strategy which would be impossible is deps were always run. Could you rearrange your taskfile this way?
|
Deps would not run always - they have their own sources (different than the main task). I can rearrange my taskfile as you showed (actually I already did something similar), but I created the ticket because I believe the current behavior is very unintuitive - I spent quite some time debugging it and was very surprised when I finally realized what is going on. |
You are right. From the code it seems that the deps are run first, then the sources are fingerprinted (glob expanded and then checksum'ed), after which the task runs. If you run |
OK, the problem is actually caused by the The rest of the mechanism is actually working as you expect. |
Ah, interesting, I did not think about the for! So it is indeed a bug? |
It could be fixed by compiling the task a second time, if the sources had changed (which is the case here). The maintainers might have a better idea though ... |
This task file has a corrected For/Cmd for testing.
|
Hello,
firstly thanks for making such a great tool!
I believe I found a bug where
sources
are checked beforedeps
complete:The
preprocess_sources
task generates sources forcompile_sources
. But this is the output that I get:What I believe is happening is:
compile_sources
is calledcompile_sources
checks it'ssources
, generates checksum3.1
preprocess_sources
generates.cc
files inbuild/
compile_sources
does not generate.o
files inbuild/
, becausebuild/
was empty whensources
were checkedExpected behavior:
compile_sources
is called2.1
preprocess_sources
generates.cc
files inbuild/
compile_sources
checks it'ssources
, generates checksumcompile_sources
generates.o
files fromsources
inbuild/
The text was updated successfully, but these errors were encountered: