forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The package() function is now implemented by a @StarlarkMethod rather than an anonymous subclass of StarlarkCallable. The PackageArgument machinery is deleted. The convert-and-process approach is instead inlined into a series of if-elses for each argument (with the convert step using a helper to reduce repetition). The big if-else is factored out into an overridable method, so other implementations of package() can add their own parameters on top. The package() symbol is now registered on the ConfiguredRuleClassProvider like any other BUILD toplevel. Removed its special casing in BazelStarlarkEnvironment, and the ability to register PackageArguments with the CRCP. Fixed a copy-paste error where the "default_applicable_licenses" param would claim to be "default_package_metadata" for the purposes of error messages. PiperOrigin-RevId: 532911239 Change-Id: I957354e0a4e32f7922b510c5537f56c6aff72ab9
- Loading branch information
1 parent
517d4f1
commit 0511bb4
Showing
6 changed files
with
84 additions
and
306 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
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
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
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
57 changes: 0 additions & 57 deletions
57
src/main/java/com/google/devtools/build/lib/packages/PackageArgument.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.