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

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

Closed
sgowroji opened this issue Sep 11, 2024 · 1 comment

Comments

@sgowroji
Copy link

sgowroji commented Sep 11, 2024

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

Platform: Windows

Logs:

ERROR: �[0mno 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: �[0mC:/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: �[0mC:/b/bk-windows-bhd0/bazel-org-repo-root/glog/bazel/example/BUILD.bazel:1:8: Analysis failed
ERROR: �[0mAnalysis of target '//bazel/example:main' failed; build aborted
ERROR: �[0mBuild did NOT complete successfully
FAILED:�[0m 
FAILED:�[0m 
Error: The command exited with status 1�[0m
error: exit status 1

Culprit: bazelbuild/bazel@5881c38

Note : This issue is due to bazelbuild/bazel#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

meteorcloudy added a commit to meteorcloudy/glog that referenced this issue Sep 13, 2024
With WORKSPACE being disabled at HEAD, all dependencies must be specified in MODULE.bazel

Fixing google#1127
@drigz
Copy link
Member

drigz commented Sep 14, 2024

Fixed by #1131.

@drigz drigz closed this as completed Sep 14, 2024
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

No branches or pull requests

2 participants