From 889da91cd963e84071fd96980f1b1ace7dad2c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 6 Jun 2024 09:41:05 +0100 Subject: [PATCH] internal/mod/modload: remove debugging panic with sprintf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I introduced this code two days ago in https://cuelang.org/cl/1195701 and while developing, I had used Sprintf to inspect error values and panic to loudly surface when they happened in our test suite. Unfortunately, I forgot the panic and it made it past code review too. Signed-off-by: Daniel Martí Change-Id: I881d2e6ca2979470d7253b2bab0625644829975e Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195847 TryBot-Result: CUEcueckoo Reviewed-by: Rustam Abdullaev --- internal/mod/modload/tidy.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/mod/modload/tidy.go b/internal/mod/modload/tidy.go index 4c22250bac5..859dde83d24 100644 --- a/internal/mod/modload/tidy.go +++ b/internal/mod/modload/tidy.go @@ -181,8 +181,6 @@ func (ld *loader) resolveDependencies(ctx context.Context, rootPkgPaths []string if errors.As(err, &missingErr) { err = &ErrModuleNotTidy{Reason: fmt.Sprintf( "missing dependency providing package %s", missingErr.Path)} - } else { - panic(fmt.Sprintf("%#v\n", err) + ": " + err.Error()) } return nil, nil, err }