hundreds-breakfast-49010
09/17/2020, 1:11 AMKey
and Value
to begin with?hundreds-father-404
09/17/2020, 1:15 AMKey
corresponds to a “Param”, meaning it must have hash and eq. A Value
corresponds to a positional arg to a rule or an await Get
, iiuc, and only needs __eq__
hundreds-breakfast-49010
09/17/2020, 1:19 AMPathGlobs
being a potentially large type (although maybe not that potentially large, before it's parsed)hundreds-breakfast-49010
09/17/2020, 1:20 AMSnapshot
should include some inner type that's more specific than `Key`; one that makes it clear that the python object contianed within has already been parsed and guaranteed to actually be a PathGlobs
hundreds-breakfast-49010
09/17/2020, 1:21 AMDIsplay
for Key
should actually be Python __repr__
even if that results in a long stringhundreds-father-404
09/17/2020, 1:21 AMalthough maybe not that potentially large,Maybe, although definitely minimizing FFI is valuable. Performance is the raison d’être for Pants.
hundreds-breakfast-49010
09/17/2020, 1:22 AMKey
to make that distinction clearer, or at least document it with a docstring; I didn't know that until nowhundreds-breakfast-49010
09/17/2020, 1:22 AMwitty-crayon-22786
09/17/2020, 7:02 PMA^ fixed the above. the input to acorresponds to a positional arg to a rule or the output value of anValue
, iiuc, and only needsawait Get
__eq__
Get
is a Key
, because it becomes a Param
… the output of a Get
is a Value