witty-crayon-22786
08/01/2019, 10:47 PMSo in my use case I want to yield a new type ( a collection of requests). The consumer will also need to get a Platform from somewhere therefore that rule will have multiple params but I will only be yielding one from above in the graph. Will that work?
yield Get(ExecuteProcessResult, ExecuteProcessRequest, ..)
, there is an intrinsic (mentioned a bunch of places, including here: https://github.com/pantsbuild/pants/blob/ed2100dd05b83835a6a89aa1e1115d6dc86c81f8/src/rust/engine/src/tasks.rs#L131-L166) that implements that actual nodeearly-needle-54791
08/01/2019, 10:50 PMwitty-crayon-22786
08/01/2019, 10:50 PMearly-needle-54791
08/01/2019, 10:50 PMwitty-crayon-22786
08/01/2019, 10:51 PM@rule
to provide that new type given an ExecuteProcessRequest
early-needle-54791
08/01/2019, 10:53 PMwitty-crayon-22786
08/01/2019, 10:54 PMearly-needle-54791
08/01/2019, 10:58 PMwitty-crayon-22786
08/01/2019, 10:58 PMearly-needle-54791
08/01/2019, 11:02 PMIf you think of this like overloading: if you have a rule that can convert from BasicProcessRequest to AdvancedProcessRequest, then a caller could yield either of those as input with one underlying intrinsic that consumes an AdvancedProcessRequestMakes sense. I was thinking about it in the other direction…adding an AdvancedProcessRequest that will be yielded from some rules. Then adding an intermediate rule that extracts the correct basic requests from it and gives them to the engine.
witty-crayon-22786
08/01/2019, 11:03 PM@rules
that do though (and take multiple arguments)early-needle-54791
08/01/2019, 11:11 PMwitty-crayon-22786
08/01/2019, 11:14 PM