witty-crayon-22786
08/24/2022, 5:05 PMoutput = await Get(Output, {input1: Input1, input2: Input2})
Get
inputs must always be hash/eq-able.hundreds-father-404
08/24/2022, 5:09 PMawait Get(Output, {input1: Input})
await Get(Output, {})
I think it's strongly worth considering converging around a single syntax for Get
. The rule API is already hard to learn: having several different ways of using a core abstraction adds to the confusionwitty-crayon-22786
08/24/2022, 5:10 PMhundreds-father-404
08/24/2022, 5:15 PMawait Get(Output)
, which I like
Would 1-param stay the same as before, with the 2 vs 3 arg variants?witty-crayon-22786
08/24/2022, 5:16 PMGet(Output)
.fast-nail-55400
08/24/2022, 5:44 PMdict
-ed to it?bitter-ability-32190
08/24/2022, 8:25 PMinput1
be a string?witty-crayon-22786
08/24/2022, 8:25 PMbitter-ability-32190
08/24/2022, 8:26 PM{instance: type}
?witty-crayon-22786
08/24/2022, 8:26 PMbitter-ability-32190
08/24/2022, 8:27 PMwitty-crayon-22786
08/24/2022, 8:27 PMbitter-ability-32190
08/24/2022, 8:28 PMGet(X, Y(..))
to Get(X, {Y(...): Y})
witty-crayon-22786
08/24/2022, 8:29 PMhundreds-father-404
08/24/2022, 8:32 PMbitter-ability-32190
08/24/2022, 8:32 PMwitty-crayon-22786
08/24/2022, 8:32 PMbitter-ability-32190
08/24/2022, 8:33 PMhundreds-father-404
08/24/2022, 8:34 PM: Input1
type, which is the type ID. the key can be a variablewitty-crayon-22786
08/24/2022, 8:34 PMbitter-ability-32190
08/24/2022, 8:37 PM**
) and whose values are types.
All that said, I love the creativity and the idea. I'll wait for the PR to see how creative we have to get 🙂witty-crayon-22786
08/24/2022, 8:38 PMbitter-ability-32190
08/24/2022, 8:47 PMwitty-crayon-22786
08/24/2022, 9:11 PM@rule
invokes (transitively), and in the computation of environment variables and options that it consumes (again, transitively), but not in its signaturebitter-ability-32190
08/24/2022, 9:12 PMwitty-crayon-22786
08/24/2022, 9:13 PMGet
is type driven is that it does not represent positional arguments to a particular rule: rather, the transitive inputs necessary to compute an output type`Param`s are eventually used as positional args to `Rule`s, but it’s important to note that the `Param`s in ainstance’s identity/memoization-key will not always become the positional arguments to that `Rule`: in many cases, aRule
will be used by a `Rule`’s transitive dependencies in order to produce an output value that becomes either a positional argument to theParam
as it starts, or the result of aRule
while a coroutineGet
runs.Rule
@rule
API is shaped the way it’s shaped