3 ms·
Bazel also allows to pull dependencies from different sources via Bzlmod. 1. define dependency like bazel_dep(name = "protobuf", version = "3.19.0") 2. define
by ManBeardPc 2y ago
Bazel also allows to pull dependencies from different sources via Bzlmod.
1. define dependency like bazel_dep(name = "protobuf", version = "3.19.0")
2. define repositories where to look for it
A repository is just a file structure like /modules/$MODULE/$VERSION + some info about the module. Can be on a HTTP server or just on your local file system.
https://bazel.build/external/overview#bzlmod https://bazel.build/external/overview#bzlmod
I hope more tools adopt something similar. Or maybe a single package manager for everything, so we can finally build cross-language software without having to debug why tool A can't find stuff from B.
- fire_lake 2y agoBazel mod requires a registry of packages in a git repo, so it’s quite centralized.
- ManBeardPc 2y agoFrom the documentation: https://bazel.build/external/registry https://bazel.build/external/registry > Bzlmod discovers dependencies by requesting their information from Bazel registries: databases of Bazel modules. Currently, Bzlmod only supports index registries — local directories or static HTTP servers following a specific format. It just uses the Bazel Central Registry (BCR) by default. You can specify your own via the --registry flag and then it uses them instead. It is possible to specify multiple registries at the same time, so you can mix the official, company internal and on your local filesystem at the same time.