-
-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Attempt to) Deprecate/Remove BuildFileAddress #6657
Comments
To clarify, what is the alternative? Should we be using |
Yea, I think so. And then the (very rare) cases that actually need to know precisely which BUILD file something came from can ask for an |
Eric-Arellano
added a commit
that referenced
this issue
Feb 6, 2020
Several `@goal_rule`s will soon start requesting `ProvenancedBuildFileAddresses`, rather than `BuildFileAddresses`, so that they may preserve the original `FilesystemSpec` to be more precise in what files they run over. (For example, `./pants fmt foo.py` only formatting `foo.py` rather than its whole owning target.). So, this type is going to start showing up in a lot of places. We rename `ProvenancedBuildFileAddress` to `AddressWithOrigin` because: 1) Generally, we want to stop using `BuildFileAddress` per #6657. So, the name should not mention `BuildFile`. 2) While `provenance` is a valid technical term, it is unfamiliar for even many native English speakers (including myself - I had to look it up). Generally, we should avoid using inaccessible words when there is a better alternative. In contrast, `origin` is familiar to most English speakers. 3) Conceptually, this type refers to an `Address` that is _augmented with_ additional information from where that `Address` first comes from. `AddressWithOrigin` makes clear that the `WithOrigin` part is some extra information being preserved.
Eric-Arellano
added a commit
that referenced
this issue
Feb 7, 2020
Per #6657, there is little reason for `BuildFileAddress` to exist anymore. It is a clunky API, such as being verbose and subclassing `Address`. This allows us to start using `Addresses` instead of `BuildFileAddresses` in most goals. There are still some awkward parts, like `HydratedTarget.address` being a `BuildFileAddress`, but those will be cleaned up in followup PRs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BuildFileAddress is (likely) only a remnant of now-removed code from the previous BuildFile parsing infrastructure. We should attempt to deprecate it and remove all usages.
"Actual" usages would currently all be using
BuildFileAddress.rel_path
, since thebuild_file
field is no longer populated. So:The text was updated successfully, but these errors were encountered: