Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Compatibility with symbolic macros #488

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion py/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ resolutions = _resolutions

def _py_binary_or_test(name, rule, srcs, main, deps = [], resolutions = {}, **kwargs):
# Compatibility with rules_python, see docs in py_executable.bzl
main_target = "_{}.find_main".format(name)
main_target = "{}.find_main".format(name)
determine_main(
name = main_target,
target_name = name,
Expand Down
4 changes: 2 additions & 2 deletions py/private/py_image_layer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ awk < $< 'BEGIN {
""" % (mtree_begin_blocks, root, ifs, name)

native.genrule(
name = "_{}_manifests".format(name),
name = "{}_manifests".format(name),
srcs = [name + ".manifest"],
outs = [
"{}.{}.manifest.spec".format(name, group_name)
Expand Down Expand Up @@ -146,7 +146,7 @@ def py_image_layer(name, binary, root = "/", layer_groups = {}, compress = "gzip
# Finally create layers using the tar rule
srcs = []
for group_name in group_names:
tar_target = "_{}_{}".format(name, group_name)
tar_target = "{}_{}".format(name, group_name)
tar(
name = tar_target,
srcs = [binary],
Expand Down
4 changes: 2 additions & 2 deletions py/tests/py_image_layer/asserts.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_file")

# buildifier: disable=function-docstring
def assert_tar_listing(name, actual, expected):
actual_listing = "_{}_listing".format(name)
actual_listing = "{}_listing".format(name)
native.genrule(
name = actual_listing,
srcs = actual,
Expand All @@ -18,4 +18,4 @@ def assert_tar_listing(name, actual, expected):
out_file = expected,
testonly = True,
tags = ["skip-on-bazel6"],
)
)
Loading