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

hundreds-father-404

05/19/2020, 6:09 AM
AddressWithBuild
?
AddressWithBuildPath
? The TODO from Benjy suggests ~ this design, which I think makes sense:
Copy code
@dataclass(frozen=True)
class AddressWithBuild
  address: Address
  build_path: str
Longer term, it’d be neat to store the line number on this. That’s been a long TODO for better error messages
👍 1
h

hundreds-breakfast-49010

05/19/2020, 5:43 PM
BuildAddress
strikes me as reasonable, but yeah I also kinda like
BuildFileAddress
. maybe we could temporarily rename the current version of the type so that the refactord version can keep the current name?
h

hundreds-father-404

05/19/2020, 5:51 PM
I realized I don’t think we can ever get rid of the original. It’s deeply embedded in V1 world and that’s a lot of wasted energy to update all those call sites, including a waste for plugin authors We need to use another name. I’m thinking
BuildAddress
because it allows us to add additional attributes like the lineno
h

happy-kitchen-89482

05/20/2020, 1:38 AM
AddressWithContext
?
👍 1
h

hundreds-father-404

05/20/2020, 1:59 AM
I like it. Allows us to add more fields over time
Maybe we even change Target to use it. Then it could do things like refer to the line number in error messages