Replies: 1 comment 1 reply
-
I wouldn't want an aspect that was automatically applied. That could be wasteful for everyone who does not have this problem. But, what if you built new rule which took a list of sources (like Of course, the next set of questions will be if it can rename C++ libraries too. And how we will express the semantics of C++ naming for different OS types. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've ported a handful of projects from Maven to Bazel, and one thing that almost always gets in the way is Bazel's opinion that the output from every
java_library
has alib
prefix. When it comes time to produce an RPM containing the Bazel-built libraries, I have to addrenames = {"//package:label": "label.jar"}
entries to all of mypkg_files
targets.With that, what if
pkg_files
implicitly applied an aspect to itssrcs
and was able to deriverenames
from a tag?Consider a
java_library
that we want to deploy as/opt/vendor/lib/foo-1.2.3.jar
:Handwavy semantics:
deploy_name
replaces the basename of the artifact, so that rules_pkg'sprefix
,strip_prefix
, etc. work as usual.tags = ["rules_pkg.deploy_name=..."]
).java_binary
has 2 implicit artifacts, a jar and a launcher), then perhaps we can support mappings where the LHS corresponds to whatever's in DefaultInfo.files:tags = ["deploy_name=codename.jar=publicname.jar;codename=publicname-launcher"]
; ortags = ["deploy_name=codename.jar=publicname.jar", "deploy_name=codename=publicname-launcher"]
pkg_files.renames
overrides the names obtained from the aspect and can be used to resolve conflicts.WDYT?
Beta Was this translation helpful? Give feedback.
All reactions