Skip to content

Commit 58a2052

Browse files
authored
Use DefaultInfo directly (#958)
Required for compatibility with bazelbuild/bazel#20183
2 parents b69b392 + f28a472 commit 58a2052

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/mappings.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def _pkg_files_impl(ctx):
257257
# Do file renaming
258258
for rename_src, rename_dest in ctx.attr.renames.items():
259259
# rename_src.files is a depset
260-
rename_src_files = rename_src.files.to_list()
260+
rename_src_files = rename_src[DefaultInfo].files.to_list()
261261

262262
# Need to do a length check before proceeding. We cannot rename
263263
# multiple files simultaneously.

pkg/private/tar/tar.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def _pkg_tar_impl(ctx):
138138
# The files attribute is a map of labels to destinations. We can add them
139139
# directly to the content map.
140140
for target, f_dest_path in ctx.attr.files.items():
141-
target_files = target.files.to_list()
141+
target_files = target[DefaultInfo].files.to_list()
142142
if len(target_files) != 1:
143143
fail("Each input must describe exactly one file.", attr = "files")
144144
mapping_context.file_deps.append(depset([target_files[0]]))

0 commit comments

Comments
 (0)