-
Notifications
You must be signed in to change notification settings - Fork 179
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
Provide pkg_mklink, pkg_filegroup #293
Conversation
Latest change modifies the This seemed to be a reasonable compromise between intrusiveness and clarity, but I'm willing to entertain other options, like embedding the origins directly in the mapping providers (e.g. |
8437f46
to
a040ba5
Compare
This change provides the last two pieces of the basic package creation puzzle: a symbolic link provisioning rule (`pkg_mklink`) and a simple package grouping rule (`pkg_filegroup`). As compared to the original rules in `pkg/experimental/pkg_filegroup.bzl`: - `pkg_mklink` (formerly `pkg_mklinks`) now operates on a single source-destination pair. This is to ease integration of a planned feature where you will be able to make symbolic links to targets named by a label. The mechanics of this particular feature are not fleshed out at this time, but the current feeling is that these will be resolved as a part of the `pkg_filegroup` rule. To create multiple links, you can use a list comprehension in a BUILD file with minimal loss of clarity. - `pkg_filegroup` is now an example of a "Grouping Rule", which allows for common groups of packaged files to be associated under a common name and prefix. These are intended to be inputs to packaging rules (`pkg_rpm`, `pkg_tar`, etc.). Tests are included for all of the above.
This allows packaging rules to identify where there mapping inputs came from and allows for improved diagnostics.
a040ba5
to
36717b2
Compare
@aiuto Ping. Is there anything else you'd like to see done as a part of this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like the origin should be in the info, rather than as a tuple, but I'm willing to face that choice after we try to use it for some more complex things. I'm not worried about backwards compatibility of these providers while we are pre 1.0, because only you and I should be using them.
This change provides the last two pieces of the basic package creation puzzle: a
symbolic link provisioning rule (
pkg_mklink
) and a simple package groupingrule (
pkg_filegroup
).As compared to the original rules in
pkg/experimental/pkg_filegroup.bzl
:pkg_mklink
(formerlypkg_mklinks
) now operates on a singlesource-destination pair. This is to ease integration of a planned feature
where you will be able to make symbolic links to targets named by a label.
The mechanics of this particular feature are not fleshed out at this time, but
the current feeling is that these will be resolved as a part of the
pkg_filegroup
rule.To create multiple links, you can use a list comprehension in a BUILD
file with minimal loss of clarity.
pkg_filegroup
is now an example of a "Grouping Rule", which allows for commongroups of packaged files to be associated under a common name and prefix. These
are intended to be inputs to packaging rules (
pkg_rpm
,pkg_tar
, etc.).Tests are included for all of the above.