Skip to content

Commit e03b63c

Browse files
authored
refactor: Add missing uses of DefaultInfo (bazel-contrib#2972)
Required for compatibility with bazelbuild/bazel#20183
1 parent fb2298a commit e03b63c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

python/private/common.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def create_py_info(
425425
else:
426426
# TODO(b/228692666): Remove this once non-PyInfo targets are no
427427
# longer supported in `deps`.
428-
files = target.files.to_list()
428+
files = target[DefaultInfo].files.to_list()
429429
for f in files:
430430
if f.extension == "py":
431431
py_info.transitive_sources.add(f)
@@ -449,7 +449,7 @@ def create_py_info(
449449
info = _get_py_info(target)
450450
py_info.merge_uses_shared_libraries(info.uses_shared_libraries)
451451
else:
452-
files = target.files.to_list()
452+
files = target[DefaultInfo].files.to_list()
453453
for f in files:
454454
py_info.merge_uses_shared_libraries(cc_helper.is_valid_shared_library_artifact(f))
455455
if py_info.get_uses_shared_libraries():

python/private/py_wheel.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def _py_wheel_impl(ctx):
480480
args.add("--no_compress")
481481

482482
for target, filename in ctx.attr.extra_distinfo_files.items():
483-
target_files = target.files.to_list()
483+
target_files = target[DefaultInfo].files.to_list()
484484
if len(target_files) != 1:
485485
fail(
486486
"Multi-file target listed in extra_distinfo_files %s",
@@ -493,7 +493,7 @@ def _py_wheel_impl(ctx):
493493
)
494494

495495
for target, filename in ctx.attr.data_files.items():
496-
target_files = target.files.to_list()
496+
target_files = target[DefaultInfo].files.to_list()
497497
if len(target_files) != 1:
498498
fail(
499499
"Multi-file target listed in data_files %s",

python/uv/private/uv_toolchain.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def _uv_toolchain_impl(ctx):
2424
uv = ctx.attr.uv
2525

2626
default_info = DefaultInfo(
27-
files = uv.files,
27+
files = uv[DefaultInfo].files,
2828
runfiles = uv[DefaultInfo].default_runfiles,
2929
)
3030
uv_toolchain_info = UvToolchainInfo(

sphinxdocs/private/sphinx.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def _sphinx_source_tree_impl(ctx):
386386
_relocate(orig_file)
387387

388388
for src_target, dest in ctx.attr.renamed_srcs.items():
389-
src_files = src_target.files.to_list()
389+
src_files = src_target[DefaultInfo].files.to_list()
390390
if len(src_files) != 1:
391391
fail("A single file must be specified to be renamed. Target {} " +
392392
"generate {} files: {}".format(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy