How to skip target including dependencies? #1273
Unanswered
Danielku15
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to get Nuke skipping dependent targets if they are not needed for execution? It seems
OnlyWhenStatic
(with or withoutWhenSkipped
) has no effect on the dependent targets.I followed the docs of the Conditional Execution with Static Conditions and have a setup comparable to this:
When I run
build.cmd CompileTests
I correctly get:But when I run
build.cmd Compile
I get:I want also
PrepareForBuild
to be skipped because no target requires it. Is this possible with Nuke? Of course I could move the logic into own methods an call the custom sequence, but then I lose all the features of Nuke like collapsible logs, time measurement etc. I want to avoid that.I found the discussion around calling targets manually which would also solve my case. But there was no real solution there which solves my task. #119
In my real setup I cache some build outputs using GitHub actions and I want to dynamically check if I can use those cached files. There are cases where I use the cached files and don't compile and cases where I decide recompilation is needed.
Beta Was this translation helpful? Give feedback.
All reactions