From 7678143016da13a2f9e3ff61dcb11723f46bd520 Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Tue, 31 Mar 2020 08:12:44 -0700 Subject: [PATCH] [capturedb] don't fail on unparseable buck output Summary: Sometimes buck emits a timestamp, leading to a crash > External Error: Failed to parse `buck targets --show-output ...` line of output: > 2020-03-30 20:03:51 Reviewed By: dulmarod Differential Revision: D20766438 fbshipit-source-id: 47cc00150 --- infer/src/integration/CaptureCompilationDatabase.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infer/src/integration/CaptureCompilationDatabase.ml b/infer/src/integration/CaptureCompilationDatabase.ml index f8aebbbfe..6e974a29f 100644 --- a/infer/src/integration/CaptureCompilationDatabase.ml +++ b/infer/src/integration/CaptureCompilationDatabase.ml @@ -109,8 +109,9 @@ let get_compilation_database_files_buck db_deps ~prog ~args = | [_; filename] -> `Raw filename :: compilation_database_files | _ -> - L.(die ExternalError) - "Failed to parse `buck targets --show-output ...` line of output:@\n%s" line + L.internal_error + "Failed to parse `buck targets --show-output ...` line of output:@\n%s" line ; + compilation_database_files in List.fold ~f:scan_output ~init:[] lines in