Skip to content

Commit d005df8

Browse files
authored
Add external_deps.has_facts (#147)
Mostly useful for adjusting tests. In the extension itself, `hasattr(module_ctx, 'facts')` works just as well.
1 parent f4c730b commit d005df8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

features.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ _external_deps = struct(
112112
# https://github.com/bazelbuild/bazel/commit/2ce32e70485ab807e5188efcb696927ec6606a3e
113113
# https://github.com/bazelbuild/bazel/commit/4edfe3276c127f73145018f4973cc422da61f05d
114114
repo_rules_relativize_symlinks = ge_same_major("9.0.1") or ge("10.0.0-pre.20260322.2"),
115+
# Whether facts are supported
116+
#
117+
# Only use this when a module_ctx is not available.
118+
# Otherwise use `hasattr(module_ctx, "facts")`
119+
# https://github.com/bazelbuild/bazel/commit/0b3c45f46d144d07fd4d562f55069bba0cd49a09
120+
has_facts = ge("8.5.0"),
115121
)
116122

117123
_flags = struct(

0 commit comments

Comments
 (0)