-
Notifications
You must be signed in to change notification settings - Fork 208
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
Bazel 6 compat issues #1158
Comments
I could be wrong but I think this is a WORKSPACE error and not a Bzlmod error. At least I'm yet to see this one from Bzlmod. Do you have an example workspace and module file that can be used to repro this? |
Yea! You should be able to see it here if you remove the declaration chunk from WORKSPACE.bzlmod and put the equivalent I was just about to try to fork the rules kotlin repo and use git override to see if I can do something about this locally, but please let me know if I've missed something in my set up |
This seems to be only a problem with my existing WORKSPACE.bzlmod, which I think is necessary since it loads in things that are non-bzlmod dependencies as a means to support incremental upgrades alongside bzlmod.. |
okay 1 more update on this, I don't actually think this is a general problem for Kotlin rules and WORKSPACE.bzlmod, I was able to load some other stuff through WORKSPACE.bzlmod okay. This problem came up with the content in that WORKSPACE.bzlmod file at that commit, which, all it was doing was trying to download things from Maven. I've moved those to So the current conclusion is that Kotlin rules error out with its deps when I try to download other maven deps in WORKSPACE.bzlmod? Weird edge case behaviour |
I'm not sure The current rule implementation does not special |
I'm in the middle of migrating a repo full of rules and macros from bazel 5 to 6, and I noticed that there are some problems pulling in
rules_kotlin
via bzlmodIf I just have the following:
I notice that the first error I get is this
I tried to include that as well manually
I get another similar error
I believe both of these are from the
rules_kotlin
repo.The behaviour can be observed here by running
bazel build //kotlin/...
However, I've found that the
WORKSPACE.bzlmod
works just fine, but I noticed that bazel 6 seems to have issues with non-module dependencies being used transitively.e.g. repo
A
uses the macros defined inB
, butB
usesrules_kotlin
throughWORKSPACE.bzlmod
instead ofMODULE.bazel
, thenA
will error with@rules_kotlin
not being defined in the context ofB
upon trying to execute the macro.I've verified that this doesn't seem to be a problem with module deps (tested with
rules_jvm_external
), which suggests incremental adoption isn't really an option for kotlin rules, forcing me pull it through bzlmod and leading me to the issue in description.The text was updated successfully, but these errors were encountered: