-
Notifications
You must be signed in to change notification settings - Fork 1k
Panic on dep ensure #367
Comments
Thanks for the bug report! It looks like this is probably basically the same issue as #351. |
(Closing this as a dup of #351) |
I am still getting a panic when Here is an updated stack trace:
Also this patch makes the issue go away: diff --git a/internal/gps/pkgtree/pkgtree.go b/internal/gps/pkgtree/pkgtree.go
index 2713290..74c597f 100644
--- a/internal/gps/pkgtree/pkgtree.go
+++ b/internal/gps/pkgtree/pkgtree.go
@@ -627,6 +627,11 @@ func wmToReach(workmap map[string]wm, backprop bool) (ReachMap, map[string]*Prob
// an empty path here.
fromErr := errmap[from]
+ if fromErr == nil {
+ fromErr = &ProblemImportError{
+ Err: fmt.Errorf("unknown error for %q", from),
+ }
+ }
err := &ProblemImportError{
Err: fromErr.Err,
Cause: make([]string, 0, len(path)+len(fromErr.Cause)+1), I don't get a panic anymore and somehow the |
Right, we could do that. And I suppose we should, in the short term, just so we don't have the panic here. (So, maybe go ahead with a PR 😄 ) My hesitation to move on it has been because it's not supposed to be possible for that algorithm to have bad data in this way. Actually sitting down and identifying the full set of conditions under which this case occur is the proper fix - but unfortunately, that takes time and focus, and I haven't had much to spare of that recently 😦 |
Yeah, I am not suggesting this is a fix, which is why I didn't submit a PR. (I can submit a PR if you think its worth it). My intent was to add more information to the issue but I suppose it would be more helpful to have commented on the linked issue. |
Ah, gotcha 👍 Yes, please do submit a PR with that temporary fix. If you could include a |
I get this panic when running
dep ensure
with any options or packages listed.The
fromErr
is nil which is causing the panic.I added this debug log statement
Here is the output of the log statement (addded some manual formatting).
The text was updated successfully, but these errors were encountered: