rules_jvm_external
rules_jvm_external copied to clipboard
`generate_compat_repositories` is incompatible with `strict_visibility`
strict_visibility
works by adding //visibility:private
to transitive jar targets, so they can only be used by other jars and not other targets. generate_compat_repositories
generates compatability repos for all jars regardless if they are transitive or not, and depend on the transitive dependencies. The compat repos don't satisfy the //visibilty:private
strict visibility, and strict_visibility_value
isn't practical to be set to cover all the compat repos as a workaround.
This means that the use of compat repos, which repos like https://github.com/grpc/grpc-java require, come with the loss of strict visibility benefits.
I suspect this could be resolved by filtering the transitive dependencies from the compat repo generation in the same manner they are filtered for visibility.