Skip to content

Commit

Permalink
fixup! fix: allow disabling exec_tools toolchain from looking up an i…
Browse files Browse the repository at this point in the history
…nterpreter
  • Loading branch information
rickeylev committed Sep 6, 2024
1 parent e6873ce commit b79b9bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions python/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ bzl_library(
srcs = ["py_exec_tools_toolchain.bzl"],
deps = [
":py_exec_tools_info_bzl",
":sentinel_bzl",
":toolchain_types_bzl",
"//python/private/common:providers_bzl",
"@bazel_skylib//lib:paths",
Expand Down
6 changes: 5 additions & 1 deletion python/private/sentinel.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ Label attributes with defaults cannot accept None, otherwise they fall
back to using the default. A sentinel allows detecting an intended None value.
"""

SentinelInfo = provider()
SentinelInfo = provider(
doc = "Indicates this was the sentinel target.",
fields = [],
)

def _sentinel_impl(ctx):
_ = ctx # @unused
return [SentinelInfo()]

sentinel = rule(implementation = _sentinel_impl)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

load("@rules_testing//lib:analysis_test.bzl", "analysis_test")
load("@rules_testing//lib:test_suite.bzl", "test_suite")
load("//python/private:py_exec_tools_toolchain.bzl", "py_exec_tools_toolchain")
load("//python/private:py_exec_tools_toolchain.bzl", "py_exec_tools_toolchain") # buildifier: disable=bzl-visibility

_tests = []

Expand Down

0 comments on commit b79b9bb

Please sign in to comment.