rules_license icon indicating copy to clipboard operation
rules_license copied to clipboard

Mechanism to exclude generating rules as target dependencies

Open rtabassum opened this issue 1 year ago • 1 comments

The JSON output produced by gather_licenses_info_and_write includes unnexpected dependencies and licenses.

Actual Behavior

There should be a way to filter these targets out

Steps to Reproduce the Problem

  1. Apply gather_licenses_info_and_write aspect to a pkg_rpm() target like:
pkg_rpm(
    name = "xyz-rpm",
    srcs = [...]
    ...
)

, which transitively consumes some deps like postgresql, javax-mail etc. 2. The JSON output produces by the aspect reports @rules_pkg//pkg:make_rpm as a dependency target in addition to correctly identifying postgresql, javax-mail etc. There should be a way to filter out these targets as dependencies and their associated licenses.

Sample output can be found here: https://gist.github.com/rtabassum/b9de682c2939f7e0b882d86f8686ed12#file-xyz-licenses-json

Specifications

  • Version:
  • Platform:

rtabassum avatar Mar 08 '23 20:03 rtabassum

There are ways to filter out attributes by rule kind. But that should not matter in this case, as make_rpm is in the exec configuration, so it should be filtered. If it is not, that's a bug. I'll check it.

aiuto avatar Oct 17 '23 01:10 aiuto