google / google/bazel-common

Document how workspace rules should interface with pom_file

Open
#15 6 comments 0 reactions 0 assignees View on GitHub
enhancement P4
Dominant language
Starlark
Stars
91
Forks
45
Avg merge
14m
Merged PRs (30d)
7

Description

My skylark's pretty rusty after a year on the outside, but if I'm following correctly:

The `pom_file` rule crawls the targets' dependencies, using the `maven_coordinates=[XXX]` tag to identify things that came from maven & can/should be included in `{generated_bzl_deps}`

That works fine for the deps coming from here since `workspace_defs.bzl` is turning maven artifact strings into `java_import_external` rules w/ that tag added.

But anything defined as a native [maven_jar](https://docs.bazel.build/versions/master/be/workspace.html#maven_jar) is missed; it's got that artifactid directly on it, but not as that particular tag. And despite [the claim here](https://docs.bazel.build/versions/master/be/common-definitions.html#common.tags) that all rules support `tags`, `maven_jar` doesn't appear to support them, so I can't even just tack it on.

I'm using [bazel-deps](https://github.com/johnynek/bazel-deps) to generate all the rules, so it looks like I could potentially hack _that_ to stick the tags on the `java_library` rules it tosses under `third_party`, but it _feels_ like if I knew what I was doing, it shouldn't be too bad to automagically get that off the underlying `maven_jar` rule.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.