google / glog

C++ implementation of the Google logging module
http://google.github.io/glog/
BSD 3-Clause "New" or "Revised" License
7.1k stars 2.07k forks source link

[Bazel CI] Error loading external package: Both '--enable_bzlmod' and '--enable_workspace' are disabled #1127

Closed sgowroji closed 2 months ago

sgowroji commented 2 months ago

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4117#0191df49-7381-4044-85e6-1fba964f9196

Platform: Windows

Logs:

ERROR: no such package '@@[unknown repo 'platforms' requested from @@]//os': The repository '@@[unknown repo 'platforms' requested from @@]' could not be resolved: No repository visible as '@platforms' from main repository. Was the repository introduced in WORKSPACE? The WORKSPACE file is disabled by default in Bazel 8 (late 2024) and will be removed in Bazel 9 (late 2025), please migrate to Bzlmod. See https://bazel.build/external/migration.
ERROR: C:/b/bk-windows-bhd0/bazel-org-repo-root/glog/BUILD.bazel:15:9: no such package '@@[unknown repo 'platforms' requested from @@]//os': The repository '@@[unknown repo 'platforms' requested from @@]' could not be resolved: No repository visible as '@platforms' from main repository. Was the repository introduced in WORKSPACE? The WORKSPACE file is disabled by default in Bazel 8 (late 2024) and will be removed in Bazel 9 (late 2025), please migrate to Bzlmod. See https://bazel.build/external/migration. and referenced by '//:x64_windows-clang-cl'
ERROR: C:/b/bk-windows-bhd0/bazel-org-repo-root/glog/bazel/example/BUILD.bazel:1:8: Analysis failed
ERROR: Analysis of target '//bazel/example:main' failed; build aborted
ERROR: Build did NOT complete successfully
FAILED: 
FAILED: 
Error: The command exited with status 1
error: exit status 1

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

Note : This issue is due to https://github.com/bazelbuild/bazel/issues/23023. After --enable_workspace is flipped to false, users have to explicitly specify it where it's needed, or fully migrate to Bzlmod.

CC Greenteam @meteorcloudy

drigz commented 2 months ago

Fixed by #1131.