From 198925d507765ee025ab711f56afc7653ea48654 Mon Sep 17 00:00:00 2001 From: Simon Toens Date: Wed, 28 Feb 2024 10:31:23 +0900 Subject: [PATCH] Tweak failed parsing logic --- 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()