-
Notifications
You must be signed in to change notification settings - Fork 81
bzlmod: Add MODULE.bazel #490
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
base: main
Are you sure you want to change the base?
Conversation
MODULE.bazel
Outdated
| "dragonbox", | ||
| "fast_float", | ||
| "fp16", | ||
| "highway", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
highway is in BCR : https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/highway as well as fast_float : https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/fast_float
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to leave these dependencies in the V8 extension since that way there is a clear link they can be updated and/or added and/or removed together.
MODULE.bazel
Outdated
| version = "0.0.0", | ||
| ) | ||
|
|
||
| bazel_dep(name = "abseil-cpp", version = "20250814.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| bazel_dep(name = "abseil-cpp", version = "20250814.1") | |
| bazel_dep(name = "abseil-cpp", version = "20250814.1", repo_name = "com_google_absl") |
Can you sort bazel_deps by name, this help keeping it readable and bzlmod doesn"t rely on this order
MODULE.bazel
Outdated
| bazel_dep(name = "rules_fuzzing", version = "0.6.0") | ||
| bazel_dep(name = "googletest", version = "1.17.0.bcr.2", repo_name = "com_google_googletest") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably can flag them as dev_dependency, you can group them one line after the main bazel_deps group
| ) | ||
|
|
||
| # Configure and register the toolchain. | ||
| llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") | |
| llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True) |
See https://github.com/bazel-contrib/toolchains_llvm?tab=readme-ov-file#customizations
| emscripten_deps.config(version = "4.0.17") | ||
|
|
||
| archive_override( | ||
| module_name = "proxy-wasm-cpp-sdk", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The archive override is local and will need to be also done by dependent first one envoy.
proxy-wasm-cpp-sdk shall be published in BCR.
I wish proxy-wasm/proxy-wasm-cpp-sdk#190 was merged first then a first version can be manually published in the BCR and ready to be used here
bazel/extensions.bzl
Outdated
| direct_deps = _wasmtime_crate_repositories() | ||
| return ctx.extension_metadata( | ||
| reproducible = bazel_features.external_deps.extension_metadata_has_reproducible, | ||
| root_module_direct_deps = [dep.repo for dep in direct_deps], | ||
| root_module_direct_dev_deps = [], | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| direct_deps = _wasmtime_crate_repositories() | |
| return ctx.extension_metadata( | |
| reproducible = bazel_features.external_deps.extension_metadata_has_reproducible, | |
| root_module_direct_deps = [dep.repo for dep in direct_deps], | |
| root_module_direct_dev_deps = [], | |
| ) | |
| deps = [] | |
| for repo in _wasmtime_crate_repositories(): | |
| if not repo.is_dev_dep: | |
| deps.append(repo.repo) | |
| return module_ctx.extension_metadata( | |
| reproducible = bazel_features.external_deps.extension_metadata_has_reproducible, | |
| root_module_direct_deps = deps, | |
| root_module_direct_dev_deps = [], | |
| ) |
bazel/extensions.bzl
Outdated
| direct_deps = _wasmsign_crate_repositories() | ||
| return ctx.extension_metadata( | ||
| reproducible = bazel_features.external_deps.extension_metadata_has_reproducible, | ||
| root_module_direct_deps = [dep.repo for dep in direct_deps], | ||
| root_module_direct_dev_deps = [], | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| direct_deps = _wasmsign_crate_repositories() | |
| return ctx.extension_metadata( | |
| reproducible = bazel_features.external_deps.extension_metadata_has_reproducible, | |
| root_module_direct_deps = [dep.repo for dep in direct_deps], | |
| root_module_direct_dev_deps = [], | |
| ) | |
| deps = [] | |
| for repo in _wasmsign_crate_repositories(): | |
| if not repo.is_dev_dep: | |
| deps.append(repo.repo) | |
| return module_ctx.extension_metadata( | |
| reproducible = bazel_features.external_deps.extension_metadata_has_reproducible, | |
| root_module_direct_deps = deps, | |
| root_module_direct_dev_deps = [], | |
| ) |
Signed-off-by: Ryan Northey <[email protected]>
Fixes github.com/bazelbuild/bazel/issues/27582 Signed-off-by: Matt Leon <[email protected]>
Changes from 1e1ebdb: * Adds toolchain * Removes unneeded wasmtime crates imports * Adds wasmsign2-cli crates * Adds patch for rules_rust to avoid staticlib linking issue Notably, this change does not use V8 from BCR because V8's MODULE.bazel file is missing various deps (fp16, simdutf, fast_float, intel_ittapi, dragonbox). Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Not all deps need be reachable from the root workspace for bzlmod. Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Signed-off-by: Matt Leon <[email protected]>
Creating a draft PR to run CI on proxy-wasm-cpp-host with MODULE.bazel by default.