Improve pkg_tar warning message.
Put the label of the target in the warning message. Without it, it's
hard to figure out which target one should fix.
@@ -193,7 +193,8 @@ def pkg_tar(**kwargs):
if "srcs" not in kwargs:
if "files" in kwargs:
if not hasattr(kwargs["files"], "items"):
- print("pkg_tar: you provided a non dictionary to the `files` attribute. " +
+ label = "%s//%s:%s" % (REPOSITORY_NAME, PACKAGE_NAME, kwargs["name"])
+ print("%s: you provided a non dictionary to the pkg_tar `files` attribute. " % (label,) +
"This attribute was renamed to `srcs`. " +
"Consider renaming it in your BUILD file.")
kwargs["srcs"] = kwargs.pop("files")
