Move 'can_go_in_shared_cache' from Action to Rule, with the same default#10789
Move 'can_go_in_shared_cache' from Action to Rule, with the same default#10789ElectreAAS wants to merge 1 commit intoocaml:mainfrom
Conversation
Signed-off-by: Ambre Austen Suhamy <ambre@tarides.com>
| , target_paths rule.targets.files @ target_paths rule.targets.dirs | ||
| , Action.for_shell action | ||
| , can_go_in_shared_cache | ||
| , true (* TODO: don't forget to remove this *) |
There was a problem hiding this comment.
TODO comment intentionnaly left here, as removing the true in the tuple changes the digest, and trips the tests. I wanted to make a separate commit that only removes this line and changes the hash to make it clean for the CI.
|
How does it help you to move the flag from the rule to the action? Every rule has a corresponding action, so I think you can just set the flag on the action in the rule. |
As you can probably guess I'm a little bit confused by the situation. |
|
You're on the right track. To recap:
Hope that makes sense. Feel free to ask more. |
|
Thanks a lot for the explanation! I think I made some progress back on #10710. |
This is my second attempt at going in the direction of caching by default, and caching downloads, following the discussion over at #10729.
I realized that the field
can_go_in_shared_cacheinDune_Engine.Action.Full.talready existed, had a default to true, and was never set to false anywhere. I then hijack this by moving the field toRule.tinstead. This makes it so that all calls toRule.makecan now set this variable, and the goal is to change the call inpkg_ruleto true when the PR is ready.cc @Leonidas-from-XIV