Skip to content

Commit 5d0b86a

Browse files
committed
Add reproducible metadata support for extension dependencies
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent 5283e57 commit 5d0b86a

File tree

2 files changed

+10
-208
lines changed

2 files changed

+10
-208
lines changed

MODULE.bazel.lock

Lines changed: 0 additions & 204 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel/extensions.bzl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@bazel_features//:features.bzl", "bazel_features")
1516
load("@proxy_wasm_rust_sdk//bazel/cargo/remote:crates.bzl", "crate_repositories")
1617

1718
def _crates_deps_impl(module_ctx):
@@ -20,10 +21,15 @@ def _crates_deps_impl(module_ctx):
2021
if not repo.is_dev_dep:
2122
deps.append(repo.repo)
2223

23-
return module_ctx.extension_metadata(
24-
root_module_direct_deps = deps,
25-
root_module_direct_dev_deps = [],
26-
)
24+
metadata_kwargs = {
25+
"root_module_direct_deps": deps,
26+
"root_module_direct_dev_deps": [],
27+
}
28+
29+
if bazel_features.external_deps.extension_metadata_has_reproducible:
30+
metadata_kwargs["reproducible"] = True
31+
32+
return module_ctx.extension_metadata(**metadata_kwargs)
2733

2834
crates_deps = module_extension(
2935
doc = "Dependencies for the Proxy-Wasm Rust SDK.",

0 commit comments

Comments
 (0)