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
Uh oh!
There was an error while loading. Please reload this page.
-
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_libraryhas alibprefix. 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_filestargets.With that, what if
pkg_filesimplicitly applied an aspect to itssrcsand was able to deriverenamesfrom a tag?Consider a
java_librarythat we want to deploy as/opt/vendor/lib/foo-1.2.3.jar:Handwavy semantics:
deploy_namereplaces the basename of the artifact, so that rules_pkg'sprefix,strip_prefix, etc. work as usual.tags = ["rules_pkg.deploy_name=..."]).java_binaryhas 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.renamesoverrides the names obtained from the aspect and can be used to resolve conflicts.WDYT?
Beta Was this translation helpful? Give feedback.
All reactions