Bazel
The Bazel package manager.
Description
This package manager does not only resolve Bazel dependency tree, it has also the ability to resolve Conan
dependencies and integrate them in the aforementioned tree. The Conan dependencies are created by the Conan package
manager and are filtered according to the list of Conan dependencies reported by Bazel.
Consequently, the Conan dependency in Bazel is not reported as a project, even if its definition file lies alongside
Bazel's ones. It iś rather reported as a package.
Please note that the conan project must use the BazelDeps and the BazelToolchain generators and must support
Conan 2.x.
Configuration
Example
Use the following syntax to configure this plugin globally as part of config.yml:
ort:
analyzer:
packageManagers:
Bazel:
options:
bazelVersion: <OPTIONAL_STRING>
conanLockfileName: "conan.lock"
useConan2: false
bazelDependenciesOnly: false
Use the following syntax to configure this plugin in a repository's .ort.yml:
analyzer:
package_managers:
Bazel:
options:
bazelVersion: <OPTIONAL_STRING>
conanLockfileName: "conan.lock"
useConan2: false
bazelDependenciesOnly: false
If the plugin is configured in both locations, the configurations are merged, with options from .ort.yml taking precedence over those from config.yml.
Options
bazelVersion
The optional Bazel version to use. If unset, Bazelisk tries to auto-detect the version, and eventually falls back to [BAZEL_FALLBACK_VERSION].
conanLockfileName
The default name of the lockfile for the Conan package manager.
useConan2
Use Conan2 when fetching Conan packages, otherwise use Conan 1.
bazelDependenciesOnly
Only scan Bazel dependencies and skip reporting Conan packages in the dependency tree.