Skip to content

Commit

Permalink
Mark non_module_deps extension as reproducible (#2639)
Browse files Browse the repository at this point in the history
  • Loading branch information
cerisier authored Jan 24, 2025
1 parent 7eca118 commit c5a3307
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module(
)

bazel_dep(name = "apple_support", version = "1.15.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "bazel_features", version = "1.9.0")
bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(name = "platforms", version = "0.0.9")
bazel_dep(name = "rules_cc", version = "0.0.10")
Expand Down
11 changes: 10 additions & 1 deletion apple/extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@

"""Definitions for bzlmod module extensions."""

load("@bazel_features//:features.bzl", "bazel_features")
load("//apple:repositories.bzl", "apple_rules_dependencies")

def _non_module_deps_impl(_):
def _non_module_deps_impl(module_ctx):
apple_rules_dependencies(include_bzlmod_ready_dependencies = False)

metadata_kwargs = {}
if bazel_features.external_deps.extension_metadata_has_reproducible:
metadata_kwargs["reproducible"] = True

return module_ctx.extension_metadata(
**metadata_kwargs
)

non_module_deps = module_extension(implementation = _non_module_deps_impl)

0 comments on commit c5a3307

Please sign in to comment.