forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Package.Builder compose instead of inherit from TargetRegistrati…
…onEnvironment This gives the Builder more explicit control over its own API, at the cost of a bit of verbosity in accessing the environment as a field, and in enumerating the methods it chooses to re-export to its own clients. It also means that in the future, we can repeat the trick of factoring out a bunch of builder methods to a new base class, without having to worry about which base class supersedes the other in the hierarchy. - `Pakcage.Builder` now inherits directly from `StarlarkThreadContext`. - None of `TargetRegistrationEnvironment`'s members are protected, and only a few are package-private. The choice of which methods are public now (mostly) comes down to what API makes sense for `TargetRegistrationEnvironment`, without regard for what makes sense for `Package.Builder`'s clients. - In the builder, add `currentMacro()` convenience method. Work toward bazelbuild#19922. PiperOrigin-RevId: 678411561 Change-Id: I5e550fe5b582e1039fa304d42d37e882a856e742
- Loading branch information
1 parent
33a2bb7
commit 11c090f
Showing
2 changed files
with
130 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.