Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A Param should never be directly used to satisfy a Get (pantsbuild#9890)
### Problem As described in pantsbuild#9878, we observed a case where a `Param` was being used to direct satisfy a `Get`. But this runs afoul of an invariant that has been in place for a while now that the "provided" `Param` (ie the "input" to the `Get`) must be consumed by the subgraph below the `Get`. The reasoning behind this invariant is that when a user uses a `Get`, the intent is always for the input `Param` to be used in that computation. And that holds in this case. ### Solution Extract `RuleGraph` building into a separate module, and then add two tests of cyclic behavior: one that was already passing, and another that described the situation in pantsbuild#9878, and which was failing. Finally, enforce the invariant for `Params` (as it was already being applied to `WithDeps` entries: ie, `@rules`) to fix the test. ### Result Fixes pantsbuild#9878.
- Loading branch information