Open salvalcantara opened 3 years ago
huh...
I don't think we've considered this case. Due to the _version
approach of scala jar publishing there could be two different jars which collide if you chop off the version information from the name.
I think a good fix would be to:
If we automatically disambiguate, we would change the output if we happen to add a dependency that causes a collision, but that could happen late in the life of a big repo, which would be a pain.
to rename, we could something like:
modules: [{"client": "client_java"}]
or something like that...I can coach you on what files need to change to get this done, but I probably can't get to this very soon personally. cc @ianoc who may or may not have any other thoughts on this.
Sounds good @johnynek ... I might be able to help if you point me on the right direction (don't promise anything, though).
So, the key things would be:
I hope that's a good starting point.
BTW: you might be able to make two PRs: the second one: error when there is a duplicate with a nice error, might be the easier of the two and would have helped you figure out (though not remedy) the issue.
There seems to be a bug caused by mixing Scala and Java dependencies. The tool seems to use the same target name for both, and thus produces duplicate targets (one for Scala and one for Java). In particular, I'm hitting this problem in a very simple Flink/Scala project where the dependencies look like this:
FYI, the full code is available here: https://github.com/salvalcantara/bazel-flink-scala.
When I try to build the project, I'm getting this error:
If you look at the dict lines that are reported as conflicting, you'll see the duplicate "vendor/org/apache/flink:flink_clients" target:
Maybe it's possible to customize the target templates to suffix targets with the language? Something like:
In any case, I would really appreciate having this issue addressed, might it be a bug or not.