Commit e8a48897 authored by Oksana Zhuravlova's avatar Oksana Zhuravlova Committed by Commit Bot

Fix mojo bindings generator error message printing

This change splits the print statement in the imports vs deps check
function into three separate ones, as well as prints the correct filename
instead of the first one in the list.

Change-Id: I81010efa46eeab37847d90df5574cdf34ff4b83f
Reviewed-on: https://chromium-review.googlesource.com/c/1316727
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#605444}
parent 6690d76f
...@@ -370,9 +370,11 @@ def _VerifyImportDeps(args, __): ...@@ -370,9 +370,11 @@ def _VerifyImportDeps(args, __):
args.gen_dir + "/", 1)[1] args.gen_dir + "/", 1)[1]
full_target_name = "//" + target_prefix_without_gen_dir.rsplit( full_target_name = "//" + target_prefix_without_gen_dir.rsplit(
"/", 1)[0] + ":" + target_name "/", 1)[0] + ":" + target_name
print ">>> File \n\t%s\nfrom target \n\t%s\nis missing dependencies " + \
"for the following imports:\n\t%s" % (args.filename[0], \ print ">>> File \"%s\"" % (filename)
full_target_name, list(mojom_imports.difference(sources))) print ">>> from target \"%s\"" % (full_target_name)
print ">>> is missing dependencies for the following imports:\n%s" % \
list(mojom_imports.difference(sources))
sys.exit(1) sys.exit(1)
source_filename, _ = os.path.splitext(rel_path.relative_path()) source_filename, _ = os.path.splitext(rel_path.relative_path())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment