Migrate code for the flag --incompatible_disable_depset_items (#232)

This commit is contained in:
Laurent Le Brun 2020-02-03 16:45:44 +01:00 committed by GitHub
parent e583e822a0
commit 1c5ed0706a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ StarlarkLibraryInfo = provider(
) )
def _bzl_library_impl(ctx): def _bzl_library_impl(ctx):
deps_files = [depset(x.files, order = "postorder") for x in ctx.attr.deps] deps_files = [x.files for x in ctx.attr.deps]
all_files = depset(ctx.files.srcs, order = "postorder", transitive = deps_files) all_files = depset(ctx.files.srcs, order = "postorder", transitive = deps_files)
return [ return [
# All dependent files should be listed in both `files` and in `runfiles`; # All dependent files should be listed in both `files` and in `runfiles`;

View File

@ -30,7 +30,7 @@ def _impl_rule(ctx, is_windows):
copy_bash(ctx, ctx.file.src, out) copy_bash(ctx, ctx.file.src, out)
return DefaultInfo( return DefaultInfo(
executable = out, executable = out,
files = depset(items = [out]), files = depset([out]),
runfiles = ctx.runfiles( runfiles = ctx.runfiles(
files = [out], files = [out],
collect_data = True, collect_data = True,

View File

@ -54,7 +54,7 @@ def _impl(ctx):
input_manifests = tool_input_mfs, input_manifests = tool_input_mfs,
) )
return DefaultInfo( return DefaultInfo(
files = depset(items = ctx.outputs.outs), files = depset(ctx.outputs.outs),
runfiles = ctx.runfiles(files = ctx.outputs.outs), runfiles = ctx.runfiles(files = ctx.outputs.outs),
) )