From 4146e93cd85bbd176411abcc8d1c9918e180d4bb Mon Sep 17 00:00:00 2001 From: Simon Toens Date: Thu, 29 Feb 2024 04:01:34 +0900 Subject: [PATCH] Tweak failed parsing logic (#173) --- crawl/bazel.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crawl/bazel.py b/crawl/bazel.py index 509a656..8e2aaef 100644 --- a/crawl/bazel.py +++ b/crawl/bazel.py @@ -202,13 +202,14 @@ def _parse_pinned(mvn_install_name, pinned_file_path, verbose=False): direct_dep_coords_wo_vers = direct_deps_json.get(coord_wo_vers, []) dep.directs = _get_direct_deps(direct_dep_coords_wo_vers, coord_wo_vers_to_dep, mvn_install_name, - verbose, False) - if len(dep.directs): + verbose, fail_on_missing=False) + if len(dep.directs) == 0: # something failed. rerun but this time with more logging # and mark it to blow up when it hits the failure dep.directs = _get_direct_deps(direct_dep_coords_wo_vers, - coord_wo_vers_to_dep, mvn_install_name, - True, True) + coord_wo_vers_to_dep, + mvn_install_name, verbose=True, + fail_on_missing=True) return coord_wo_vers_to_dep.values()