-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate targets when mixing Scala and Java dependencies #299
Comments
huh... I don't think we've considered this case. Due to the 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:
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:/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.
The text was updated successfully, but these errors were encountered: