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

hundreds-father-404

02/06/2020, 12:54 AM
We’re going to start requesting
ProvenancedBuildFileAddresses
in a couple goals like
fmt
,
lint
, and
test
(so that they can look at the filesystem specs and only run on the specified files, rather than the whole target)
ProvenancedBuildFileAddresses
is incredibly wordy. Any opposition to renaming to
ProvenancedAddresses
and
ProvenancedAddress
? This is the definition:
Copy code
@dataclass(frozen=True)
class ProvenancedAddress:
  """A BuildFileAddress along with the cmd-line spec it was generated from."""
  build_file_address: BuildFileAddress
  provenance: Spec
h

hundreds-breakfast-49010

02/06/2020, 1:52 AM
I think this is a good idea
h

hundreds-father-404

02/06/2020, 1:53 AM
Cool, thanks. And should the field be
address: BuildFileAddress
or stay
build_file_address: BuildFileAddress
? Before MyPy, I’d always say the more verbose. Now, it just feels wordy and repetitive
h

hundreds-breakfast-49010

02/06/2020, 1:57 AM
yeah with the type anno I think it's fine to be less wordy
👍 1
h

hundreds-father-404

02/06/2020, 2:06 AM
a

aloof-angle-91616

02/06/2020, 3:45 PM
i personally have never understood the wording
Provenanced
and would suggest another name unless there's a reference i'm missing
h

hundreds-father-404

02/06/2020, 3:48 PM
It’s an old word for “origin”. I’ve been trying to think of a better name to express that. Maybe
AddressWithOrigin
? I don’t love having
with
in the name
OriginedAddress
seems off
AddressAndOrigin
? Slightly better than
AddressWithOrigin
imo
c

clean-wolf-14674

02/06/2020, 5:43 PM
Onboard with
AddressAndOrigin
-
Provenance
is a bit too much
h

hundreds-father-404

02/06/2020, 5:45 PM
@gentle-wolf-58752 proposed
AddressWithOriginSpec
. Thoughts? Imo, very clear. Possibly wordier than I’d like
Hm, I think
AddressWithOrigin
. It’s clear from the fields that origin is a
Spec
and that’s more of an implementation detail than anything
with
better expresses the relationship than
and
. Really, this is an
Address
with some extra information about how that address first got resolved
a

aloof-angle-91616

02/06/2020, 5:50 PM
^ i like the above reasoning!
❤️ 1