Skip to content

Commit e79f1ee

Browse files
committed
chore: don't add migration tag if Starlark implementation is enabled
This avoids the tag being added when it doesn't need to be, which can look confusing to users without context about what it means. Work towards bazel-contrib#1361
1 parent 2d34f6c commit e79f1ee

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

python/private/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,10 @@ bzl_library(
386386
visibility = [
387387
"//:__subpackages__",
388388
],
389-
deps = ["@bazel_skylib//lib:types"],
389+
deps = [
390+
"@bazel_skylib//lib:types",
391+
"@rules_python_internal//:rules_python_config_bzl",
392+
],
390393
)
391394

392395
bzl_library(

python/private/util.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"""Functionality shared by multiple pieces of code."""
1616

1717
load("@bazel_skylib//lib:types.bzl", "types")
18+
load("@rules_python_internal//:rules_python_config.bzl", "config")
1819

1920
def copy_propagating_kwargs(from_kwargs, into_kwargs = None):
2021
"""Copies args that must be compatible between two targets with a dependency relationship.
@@ -60,7 +61,8 @@ def add_migration_tag(attrs):
6061
Returns:
6162
The same `attrs` object, but modified.
6263
"""
63-
add_tag(attrs, _MIGRATION_TAG)
64+
if not config.enable_pystar:
65+
add_tag(attrs, _MIGRATION_TAG)
6466
return attrs
6567

6668
def add_tag(attrs, tag):

0 commit comments

Comments
 (0)