Description
I have installed all the prerequisite tools mentioned in the Quick Start. Then I downloaded the latest Vanir and go to the Vanir directory. But I can't build the detector_runner correctly.
user@dev-machine:~/workspace/AOSP/sources/Android/vanir$ bazel build //:detector_runner
ERROR: Error computing the main repository mapping: error loading package 'external': Both --enable_bzlmod and --enable_workspace are disabled, but one of them must be enabled to fetch external dependencies.
Computing main repo mapping:
Then I checked .bazelrc and found '--enable_bzlmod' is False by default. I tried to change this it True but I got more errors when trying to build detector_runner. So how to build detector_runner? Any comments will be appreciated.
user@dev-machine:~/workspace/AOSP/sources/Android/vanir$ bazel build //:detector_runner
Starting local Bazel server and connecting to it...
WARNING: --enable_bzlmod is set, but no MODULE.bazel file was found at the workspace root. Bazel will create an empty MODULE.bazel file. Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. For more details, please refer to bazelbuild/bazel#18958.
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_android' found. This will result in a failure if there's a reference to those rules or symbols.
WARNING: Target pattern parsing failed.
ERROR: Skipping '//:detector_runner': error loading package '': Unable to find package for @@[unknown repo 'vanir_deps' requested from @@]//:requirements.bzl: The repository '@@[unknown repo 'vanir_deps' requested from @@]' could not be resolved: No repository visible as '@vanir_deps' 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: error loading package '': Unable to find package for @@[unknown repo 'vanir_deps' requested from @@]//:requirements.bzl: The repository '@@[unknown repo 'vanir_deps' requested from @@]' could not be resolved: No repository visible as '@vanir_deps' 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.
INFO: Elapsed time: 9.092s
INFO: 0 processes.
ERROR: Build did NOT complete successfully