Skip to content
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

cannot load '@rules_jvm_external~5.2~maven~maven//:compat.bzl': no such file #910

Closed
vorburger opened this issue May 31, 2023 · 3 comments · Fixed by enola-dev/enola#223
Closed

Comments

@vorburger
Copy link
Contributor

enola-dev/enola#161 is a PR which upgrades Bazel from 6.1.2 to 6.2.0.

That upgrades causes the following build failure, which did not occur before the upgrade:

ERROR: Error computing the main repository mapping: cannot load '@rules_jvm_external~5.2~maven~maven//:compat.bzl': no such file

I looked into this a bit, and gather that this may or may not have something to do with #880 from @shs96c which was reviewed by @cheister which is mentioned on https://github.com/bazelbuild/rules_jvm_external/releases/tag/5.2?

I indeed cannot find a compat.bzl in this repo, but there are example referencing it, incl. https://github.com/bazelbuild/rules_jvm_external#repository-aliases (and there is a compat_repository.bzl (which doesn't seem to have moved in a while).

My WORKSPACE.bazel looks like the example on the README.

What am I missing?

@vorburger
Copy link
Contributor Author

@shs96c friendly ping - do you have any idea what could be causing this?

@vorburger
Copy link
Contributor Author

In the https://github.com/bazelbuild/rules_jvm_external/tree/master/examples/simple, the https://github.com/bazelbuild/rules_jvm_external#repository-aliases works as documented. So this problem is specific to my project (above).

I suspect that @maven//:compat.bzl isn't the same. When I "intentionally break" the working example, it fails as:

ERROR: Error computing the main repository mapping: cannot load '@@maven//:compat--BAD.bzl': no such file

where as in my project it fails as:

ERROR: Error computing the main repository mapping: cannot load '@@rules_jvm_external~5.3~maven~maven//:compat.bzl': no such file

I don't quite understand what defines the @maven repository.

In my project there is a bit of a mix of a maven_install(artifacts = IO_GRPC_GRPC_JAVA_ARTIFACTS, ... in my WORKSPACE.bazel as well as a maven.install(... in my MODULE.bazel.

@vorburger
Copy link
Contributor Author

I suspect that @maven//:compat.bzl isn't the same.
In my project there is a bit of a mix of (...)

That was it! enola-dev/enola#387 temporarily worked around this (ugly, but it works; I will look into a cleaner solution later), and enabled enola-dev/enola#388 and enola-dev/enola#389 and enola-dev/enola#161 and enola-dev/enola#390 (#NOK).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant