Open jdai8 opened 3 years ago
One solution might be to still generate the "overriden" target (:com_google_inject_extensions_guice_multibindings
in this case):
jvm_import(
name = "com_facebook_nifty_nifty_core",
jars = [...],
srcjar = "...",
deps = [
":io_airlift_log",
":io_airlift_units",
":com_google_code_findbugs_annotations",
":com_google_inject_extensions_guice_multibindings",
":io_netty_netty",
":com_google_guava_guava",
":javax_inject_javax_inject",
":com_google_inject_guice",
],
tags = ["maven_coordinates=com.facebook.nifty:nifty-core:0.23.0"],
)
And take advantage of this existing alias:
alias(
name = "com_google_inject_extensions_guice_multibindings",
actual = "@maven//:com_google_inject_guice",
visibility = ["//visibility:public"],)
Guice multibindings was added to Guice core in 4.2. Our repo only uses Guice 4.2+, so we'd like to point multibindings to guice:
For dependencies which depend on both guice and guice multibindings, for example nifty-core, this results in a duplicate dependency in the generated rule:
which fails with an error that looks like: