bazel-contrib / rules_jvm_external

Bazel rules to resolve, fetch and export Maven artifacts
Apache License 2.0
336 stars 256 forks source link

Do not use or recommend `@//` labels with Bzlmod #1265

Closed fmeum closed 3 weeks ago

fmeum commented 1 month ago

With Bzlmod, only the root module can refer to its own repo via @//. Instead, modules should just use repo-relative labels to refer to themselves, which works even if they aren't the root module.

Avoids this warning with Bazel 8:

WARNING: The module extension @@rules_jvm_external+//:extensions.bzl%maven produced an invalid lockfile entry because it referenced @@[unknown repo '' requested from @@rules_jvm_external+]. Please report this issue to its maintainers.
mortenmj commented 1 week ago

This fixed https://github.com/bazel-contrib/rules_jvm_external/issues/1118