From 32be0a67e29e78f0dd4ca38167062a2511fd02eb Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Fri, 29 Aug 2014 14:46:35 -0700 Subject: [PATCH] feat(bin/linja): make deps when there are missing ones --- bin/linja | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/bin/linja b/bin/linja index 199095493b..394a240c89 100755 --- a/bin/linja +++ b/bin/linja @@ -100,7 +100,8 @@ def check_required_packages(): def make_deps(lean_file, dlean_file, olean_file): with open(dlean_file, "w") as f: deps = [] - output = subprocess.check_output([g_lean_path, "--deps", lean_file]) + proc = subprocess.Popen([g_lean_path, "--deps", lean_file], stdout=subprocess.PIPE, stderr=None) + output = proc.communicate()[0] print >> f, olean_file + ": \\" for olean_file in output.strip().split("\n"): deps.append(olean_file) @@ -194,14 +195,12 @@ def handle_failure_for_flycheck(out, target): if line.startswith("FAILED:"): for lean_file in g_lean_files: lean = lean_file['lean'] - if lean in line: - print "WOW: This one failed", lean + if lean in line and lean != target: failed.add(lean) for failed_file in failed: - if target != failed_file: - print "FLYCHECK_BEGIN ERROR" - print "%s:1:0: error: failed to compile %s" % (target, failed_file) - print "FLYCHECK_END" + print "FLYCHECK_BEGIN ERROR" + print "%s:1:0: error: failed to compile %s" % (target, failed_file) + print "FLYCHECK_END" def call_ninja(directory, args): targets = [] @@ -215,8 +214,7 @@ def call_ninja(directory, args): proc_out = subprocess.PIPE proc_err = subprocess.PIPE - proc = subprocess.Popen([g_ninja_path] + targets + ["-C", directory, "-k 29"], stdout=proc_out, stderr=proc_err) - # proc = subprocess.Popen([g_ninja_path] + targets + ["-C", directory]) + proc = subprocess.Popen([g_ninja_path] + targets + ["-C", directory], stdout=proc_out, stderr=proc_err) proc.wait() if args.flycheck: