https://pantsbuild.org/ logo
#development
Title
# development
c

curved-television-6568

06/19/2022, 8:09 AM
Rule graph question 🧵 about input Params..
I’ve come across this a few times now, and think it would be nice if it would work, but it seems like it doesn’t (or I’m doing it wrong). Example scenario:
Copy code
rule_a(T1, T2) -> T3
rule_b(T1) -> T2
rule_x() :: Get(T3, T1)
That is, I would like the engine to use
T1
to use
rule_b
to get the
T2
param for
rule_a
.
This seems to work though, but requires another level of indirection:
Copy code
rule_a(T1) -> T2
rule_b(T2, T3) -> T4
rule_c(T1) -> T3
rule_x() :: Get(T4, T1)
(This is the pattern for Process -> ProcessResult btw)
Here, the engine seems to be aware of
T1
in order to use
rule_c
to get the
T3
for
rule_b
.
w

witty-crayon-22786

06/21/2022, 6:39 PM
ah, yea… this is unfortunately a restriction that i needed to put in place to make solve time manageable last time i was refactoring that code: https://github.com/pantsbuild/pants/blob/main/src/rust/engine/rule_graph/README.md#constraints … the
param_consumption
one in particular. my hope is that https://github.com/pantsbuild/pants/issues/11269 will allow us to remove that one
👀 1