-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Description
Copying a file generated by an output group is not supported, requiring custom rules or workarounds.
Could you consider adding an optional argument output_group to copy_file?
For example, this is our local copy_file implementation:
def _copy_file_impl(name, src, out, output_group, visibility):
_filegroup = "{}-filegroup".format(name)
native.filegroup(
name = _filegroup,
srcs = [src],
output_group = output_group,
)
native.genrule(
name = name,
cmd = "cp $< $@",
srcs = [_filegroup],
outs = [out],
visibility = visibility,
)
copy_file = macro(
implementation = _copy_file_impl,
attrs = {
"src": attr.label(
mandatory = True,
configurable = False,
),
"out": attr.label(
mandatory = True,
configurable = False,
),
"output_group": attr.string(
mandatory = True,
configurable = False,
),
},
)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels