google / flogger

A Fluent Logging API for Java
Apache License 2.0
1.45k stars 123 forks source link

[Bazel CI] Error No repository visible as '@google_bazel_common' from main repository. #387

Open sgowroji opened 4 weeks ago

sgowroji commented 4 weeks ago

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4089#0191a183-1b36-4309-90c3-da14321b5668

Platform: Ubuntu

Logs:

ERROR: Skipping '//...': error loading package under directory '': error loading package 'tools': Unable to find package for @@[unknown repo 'google_bazel_common' requested from @@]//tools/javadoc:javadoc.bzl: The repository '@@[unknown repo 'google_bazel_common' requested from @@]' could not be resolved: No repository visible as '@google_bazel_common' from main repository.
ERROR: error loading package under directory '': error loading package 'tools': Unable to find package for @@[unknown repo 'google_bazel_common' requested from @@]//tools/javadoc:javadoc.bzl: The repository '@@[unknown repo 'google_bazel_common' requested from @@]' could not be resolved: No repository visible as '@google_bazel_common' from main repository.
ERROR: Build did NOT complete successfully
FAILED: 
FAILED: 
Error: The command exited with status 1
error: The plugin docker command hook exited with status 1

Culprit: https://github.com/bazelbuild/bazel/commit/5881c38c54416add9faec35b7731954f4baf12d8

Steps:

 git clone https://github.com/google/flogger
git reset a08edf0832ad58d3babd54720f4a8ae2018ed109  --hard
export USE_BAZEL_VERSION=ed8ed01cf3c86485dbd1d756b6e891daad892358
bazel build //... 

CC Greenteam @mai93

meteorcloudy commented 2 weeks ago

@cpovirk Can you please take a look? WORKSPACE will be disabled by default in Bazel 8. See https://github.com/bazelbuild/bazel/issues/23023

chaoren commented 4 days ago

Looks like we have to transitively migrate our entire dependency chain of bazel repos.

meteorcloudy commented 3 days ago

Indeed, and I would recommend replacing google_bazel_common with rules_jvm_external for fetching java dependencies. Judging from the WORKSPACE file, it should be straight forward.

And you can still use repository rules in MODULE.bazel via use_repo_rule