rules_license
rules_license copied to clipboard
Mechanism to exclude generating rules as target dependencies
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
- Apply
gather_licenses_info_and_write
aspect to apkg_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:
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.