re: <https://github.com/pantsbuild/pants/pull/1079...
# development
h
re: https://github.com/pantsbuild/pants/pull/10797 , why do have a distinction between
Key
and
Value
to begin with?
h
Stu was DMing me this today, and realized it shouldn’t have been DM hehe The difference is that a
Key
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__
👍 1
h
I"m thinking about stu's reply on that issue now. I see his point about
PathGlobs
being a potentially large type (although maybe not that potentially large, before it's parsed)
👍 1
I do think it makes sense that
Snapshot
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
and this is orthogonal to his point about how
DIsplay
for
Key
should actually be Python
__repr__
even if that results in a long string
h
although maybe not that potentially large,
Maybe, although definitely minimizing FFI is valuable. Performance is the raison d’être for Pants.
h
it also might make sense to rename
Key
to make that distinction clearer, or at least document it with a docstring; I didn't know that until now
👍 1
but that's yet another orthogonal problem
w
Value
 corresponds to a positional arg to a rule or the output value of an 
await Get
, iiuc, and only needs 
__eq__
^ fixed the above. the input to a
Get
is a
Key
, because it becomes a
Param
… the output of a
Get
is a
Value
👍 1