Skip to content

Commit

Permalink
chore: don't add migration tag if Starlark implementation is enabled
Browse files Browse the repository at this point in the history
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 bazelbuild#1361
  • Loading branch information
rickeylev committed Sep 26, 2024
1 parent 2d34f6c commit e79f1ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion python/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,10 @@ bzl_library(
visibility = [
"//:__subpackages__",
],
deps = ["@bazel_skylib//lib:types"],
deps = [
"@bazel_skylib//lib:types",
"@rules_python_internal//:rules_python_config_bzl",
],
)

bzl_library(
Expand Down
4 changes: 3 additions & 1 deletion python/private/util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""Functionality shared by multiple pieces of code."""

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

def copy_propagating_kwargs(from_kwargs, into_kwargs = None):
"""Copies args that must be compatible between two targets with a dependency relationship.
Expand Down Expand Up @@ -60,7 +61,8 @@ def add_migration_tag(attrs):
Returns:
The same `attrs` object, but modified.
"""
add_tag(attrs, _MIGRATION_TAG)
if not config.enable_pystar:
add_tag(attrs, _MIGRATION_TAG)
return attrs

def add_tag(attrs, tag):
Expand Down

0 comments on commit e79f1ee

Please sign in to comment.