pubref / rules_kotlin

Bazel rules for Kotlin
Other
159 stars 20 forks source link

Non standard external repositories break other rules -- cannot be overridden. #39

Closed hsyed closed 6 years ago

hsyed commented 7 years ago

Our workspace has most of the non dagger, non Kotlin transitive chain already defined. Calling the Kotlin_repositories macro breaks our build and adding omit params does not help. The external repositories defined by this library do not contain //jar packages.

hsyed commented 7 years ago

@pcj If you have some time could you look into this one, this one blocks us from using Kotlin.

I've submitted a PR for a first pass on the Bazel IJ plugin.

pcj commented 7 years ago

Sorry for delay... I'm confused though. Which specific dependencies are we talking about that cannot be omitted by kotlin_repositories? Each one appears to be guarded by an omit_.

hsyed commented 6 years ago

Slightly hazy on the details now. I think this repo does not follow standard bazel external repo jar targeting -- specifically the dependencies from here do not have a //jar target. So if I don't ommit my workspace cannot reach the //jar's as the external name collides and this problem exists in the other direction as well.

hsyed commented 6 years ago

@pcj

here is an example: this is one of build files from this repo. It cannot pick up the guava jar from my workspace because it does not end with //jar.

java_library(
    name = "program",
    srcs = ["CommandLineProgram.java"],
    visibility = ["//visibility:public"],
    deps = ["@com_google_guava"], 
)
hsyed commented 6 years ago

@pcj so upon further investigation it was findbugs and error prone. All the other dependencies are named slightly differently from the maven naming scheme so they don't cause a problem. The pr fixes the problem for me and with it I don't need to use any omits anymore.

pcj commented 6 years ago

Closed by #42