From 681e6f5a3d0af6c5c08cc5b27fe29807421ff20c Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 2 Oct 2017 12:29:57 -0700 Subject: [PATCH] internal/gps: fix case mismatch error with multiple dependers Previously, errors like the following could occur: v0.4.2: Could not introduce github.com/sirupsen/logrus due to a case-only variation: it depends on "github.com/Sirupsen/logrus", but "github.com/evalphobia/logrus_sentry@v0.4.2" was already established as the case variant for that project root by the following other dependers: (root) github.com/docker/docker@8510adf8c856d6f0871650216a0e1d7e6ece46ee This fix matches the correct behavior when there is only one depender earlier in the function. --- internal/gps/solve_failures.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/gps/solve_failures.go b/internal/gps/solve_failures.go index 6b4ca4762d..05daedd707 100644 --- a/internal/gps/solve_failures.go +++ b/internal/gps/solve_failures.go @@ -84,7 +84,7 @@ func (e *caseMismatchFailure) Error() string { var buf bytes.Buffer str := "Could not introduce %s due to a case-only variation: it depends on %q, but %q was already established as the case variant for that project root by the following other dependers:\n" - fmt.Fprintf(&buf, str, e.goal.dep.Ident.ProjectRoot, e.current, a2vs(e.goal.depender)) + fmt.Fprintf(&buf, str, a2vs(e.goal.depender), e.goal.dep.Ident.ProjectRoot, e.current) for _, c := range e.failsib { fmt.Fprintf(&buf, "\t%s\n", a2vs(c.depender))