Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
internal/gps: fix case mismatch error with multiple dependers
Browse files Browse the repository at this point in the history
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/[email protected]" 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.
  • Loading branch information
glasser committed Oct 2, 2017
1 parent ac1a162 commit 94e05f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/gps/solve_failures.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 94e05f1

Please sign in to comment.