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

MODULE.bazel.lock update failure when bumping Stardoc dep from 0.7.0 to 0.7.1 #257

Open
calebzulawski opened this issue Oct 23, 2024 · 5 comments · May be fixed by #258
Open

MODULE.bazel.lock update failure when bumping Stardoc dep from 0.7.0 to 0.7.1 #257

calebzulawski opened this issue Oct 23, 2024 · 5 comments · May be fixed by #258
Assignees

Comments

@calebzulawski
Copy link

I am upgrading stardoc from 0.7.0 to 0.7.1 and get the following warning when updating MODULE.bazel.lock:

$ bazel mod deps --lockfile_mode=update
WARNING: The module extension @@rules_jvm_external~//:extensions.bzl%maven produced an invalid lockfile entry because it referenced @@[unknown repo '' requested from @@rules_jvm_external~]. Please report this issue to its maintainers.

MODULE.bazel.lock ends up broken:

$ bazel mod deps --lockfile_mode=error
ERROR: MODULE.bazel.lock is no longer up-to-date because: The repo mappings of certain repos used by the extension 'ModuleExtensionId{bzlFileLabel=@@rules_jvm_external~//:extensions.bzl, extensionName=maven, isolationKey=Optional.empty}' have changed. Please run `bazel mod deps --lockfile_mode=update` to update your lockfile. Type 'bazel help mod' for syntax and help.

I am using Bazel 7.4.0. Thanks!

@tetromino
Copy link
Collaborator

I can reproduce the failure:

mkdir x
cd x
echo 'bazel_dep(name = "stardoc", version = "0.7.0")' > MODULE.bazel
USE_BAZEL_VERSION=7.4.0 bazelisk mod deps
sed -e 's/0.7.0/0.7.1/' -i MODULE.bazel
USE_BAZEL_VERSION=7.4.0 bazelisk mod deps --lockfile_mode=update
USE_BAZEL_VERSION=7.4.0 bazelisk mod deps --lockfile_mode=error

Result: mod deps --lockfile_mode=update prints WARNING: The module extension @@rules_jvm_external~//:extensions.bzl%maven produced an invalid lockfile entry because it referenced @@[unknown repo '' requested from @@rules_jvm_external~]. Please report this issue to its maintainers., and mod deps --lockfile_mode=error fails.

@Wyverald - any suggestions for what is happening here?

@tetromino tetromino changed the title Bzlmod failure with 0.7.1 MODULE.bazel.lock update failure when bumping Stardoc dep from 0.7.0 to 0.7.1 Oct 23, 2024
@tetromino
Copy link
Collaborator

This breakage appears only with Bazel 7.4.0 (reproducer works fine in Bazel 7.3.2)

@fmeum
Copy link
Contributor

fmeum commented Oct 23, 2024

This is ultimately an issue in r_j_e that should be fixed by bazel-contrib/rules_jvm_external#1265. The warning comes from bazelbuild/bazel@8cee5f5. I recall that it didn't result in failures when I tried it on r_j_e a while back, but that may have changed in the meantime.

@calebzulawski
Copy link
Author

Thank you for looking into this! I'll hold off upgrading for now.

@chickenandpork
Copy link

chickenandpork commented Nov 7, 2024

I ran into this problem; I found that putting a redundant dependency in my MODULE.bazel fixed:

bazel_dep(name = "rules_jvm_external", version = "6.2")

I don't need rules_jvm_external directly, but by placing this dependency, it overrides the 6.1 in stardoc's MODULE.bazel file:

bazel_dep(name = "rules_jvm_external", version = "6.1")

Really, version 6.5 is available, but I found you really need to get off 6.1. Something with rules_jvm_external-6.1 fights with Bazel-7.4

If this release that mitigates is almost shipping, it's probably too late, but if you're stuck, claiming an unnecessary direct dependency unblocked me.

chickenandpork added a commit to chickenandpork/rules_synology that referenced this issue Nov 7, 2024
chickenandpork added a commit to chickenandpork/rules_synology that referenced this issue Nov 7, 2024
chickenandpork added a commit to chickenandpork/rules_synology that referenced this issue Nov 7, 2024
* fix: include startable/ctp_stop to show the SPK is startable

* fix: mitigate bazelbuild/stardoc#257
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants