Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: wrong import stack in error message #17648

Open
rsc opened this issue Oct 28, 2016 · 4 comments
Open

cmd/go: wrong import stack in error message #17648

rsc opened this issue Oct 28, 2016 · 4 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Oct 28, 2016

This is not true:

$ go get -u rsc.io/github/issue
package rsc.io/github/issue
    imports 9fans.net/go/acme
    imports 9fans.net/go/plan9
    imports 9fans.net/go/plan9/client
    imports 9fans.net/go/draw
    imports 9fans.net/go/draw/drawfcall
    imports github.com/google/go-github/github
    imports github.com/google/go-querystring/query
    imports golang.org/x/net/context: exit status 1
... error about x/net checkout being in a bad state ...

It looks like imports are being pushed on the import stack and not being popped correctly. rsc.io/github/issue imports github.com/google/go-github/github directly. 9fans.net/go/draw/drawfcall does not.

@rsc rsc added this to the Go1.8 milestone Oct 28, 2016
@rsc rsc added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 28, 2016
@rsc rsc modified the milestones: Go1.9, Go1.8 Nov 11, 2016
@odeke-em
Copy link
Member

odeke-em commented Jul 6, 2017

Hello @rsc, any new thoughts on this issue?

Currently on tip at b5240da, I get back

$ go get -u rsc.io/github/issue
# rsc.io/github/issue
../go/src/rsc.io/github/issue/acme.go:279:33: not enough arguments in call to client.Issues.Edit
	have (string, string, int, *github.IssueRequest)
	want ("context".Context, string, string, int, *github.IssueRequest)
../go/src/rsc.io/github/issue/edit.go:152:40: not enough arguments in call to client.Issues.Create
	have (string, string, *github.IssueRequest)
	want ("context".Context, string, string, *github.IssueRequest)
../go/src/rsc.io/github/issue/edit.go:181:43: not enough arguments in call to client.Issues.CreateComment
	have (string, string, int, *github.IssueComment)
	want ("context".Context, string, string, int, *github.IssueComment)
../go/src/rsc.io/github/issue/edit.go:193:34: not enough arguments in call to client.Issues.Edit
	have (string, string, int, *github.IssueRequest)
	want ("context".Context, string, string, int, *github.IssueRequest)
../go/src/rsc.io/github/issue/edit.go:202:46: not enough arguments in call to client.Issues.AddLabelsToIssue
	have (string, string, int, []string)
	want ("context".Context, string, string, int, []string)
../go/src/rsc.io/github/issue/edit.go:216:47: not enough arguments in call to client.Issues.RemoveLabelForIssue
	have (string, string, int, string)
	want ("context".Context, string, string, int, string)
../go/src/rsc.io/github/issue/edit.go:465:13: client.Rate undefined (type *github.Client has no field or method Rate)
../go/src/rsc.io/github/issue/edit.go:466:20: client.Rate undefined (type *github.Client has no field or method Rate)
../go/src/rsc.io/github/issue/edit.go:472:26: client.RateLimit undefined (type *github.Client has no field or method RateLimit)
../go/src/rsc.io/github/issue/issue.go:347:36: not enough arguments in call to client.Issues.Get
	have (string, string, int)
	want ("context".Context, string, string, int)
../go/src/rsc.io/github/issue/issue.go:347:36: too many errors

which is very noisy with errors, to help me reproduce your issue properly.

@rsc rsc modified the milestones: Go1.10, Go1.9 Jul 6, 2017
@rsc
Copy link
Contributor Author

rsc commented Jul 6, 2017

Not important / too easy to introduce new bugs for Go 1.9. Moving to Go 1.10.

@odeke-em, I got as far as you did a while back and made it halfway through updating rsc.io/github/issue but then stopped. Haven't gotten back to it. Thanks for looking though.

@rsc rsc modified the milestones: Go1.10, Go1.11 Dec 1, 2017
@gopherbot gopherbot modified the milestones: Go1.11, Unplanned May 23, 2018
@bcmills
Copy link
Contributor

bcmills commented Jan 22, 2019

Is this still an issue? (And if so, is it an issue in module mode?)

If we do #29758, it seems like the handling of the import stack may change anyway.

@agnivade
Copy link
Contributor

agnivade commented Feb 22, 2019

With 1.12beta1, the error is same as what @odeke-em posted in GOPATH mode. In module mode, there is just a series of finding,downloading,extracting messages before the error. There is no import stack.

GOPATH mode

$go1.12beta1 get -u rsc.io/github/issue
# rsc.io/github/issue
rsc.io/github/issue/acme.go:279:33: not enough arguments in call to client.Issues.Edit
	have (string, string, int, *github.IssueRequest)
	want (context.Context, string, string, int, *github.IssueRequest)
rsc.io/github/issue/edit.go:152:40: not enough arguments in call to client.Issues.Create
	have (string, string, *github.IssueRequest)
	want (context.Context, string, string, *github.IssueRequest)
rsc.io/github/issue/edit.go:181:43: not enough arguments in call to client.Issues.CreateComment
	have (string, string, int, *github.IssueComment)
	want (context.Context, string, string, int, *github.IssueComment)
rsc.io/github/issue/edit.go:193:34: not enough arguments in call to client.Issues.Edit
	have (string, string, int, *github.IssueRequest)
	want (context.Context, string, string, int, *github.IssueRequest)
rsc.io/github/issue/edit.go:202:46: not enough arguments in call to client.Issues.AddLabelsToIssue
	have (string, string, int, []string)
	want (context.Context, string, string, int, []string)
rsc.io/github/issue/edit.go:216:47: not enough arguments in call to client.Issues.RemoveLabelForIssue
	have (string, string, int, string)
	want (context.Context, string, string, int, string)
rsc.io/github/issue/edit.go:465:13: client.Rate undefined (type *github.Client has no field or method Rate)
rsc.io/github/issue/edit.go:466:20: client.Rate undefined (type *github.Client has no field or method Rate)
rsc.io/github/issue/edit.go:472:26: client.RateLimit undefined (type *github.Client has no field or method RateLimit)
rsc.io/github/issue/issue.go:347:36: not enough arguments in call to client.Issues.Get
	have (string, string, int)
	want (context.Context, string, string, int)
rsc.io/github/issue/issue.go:347:36: too many errors

Module mode

-/tmp/tmp.MkRYwvn340$GO111MODULE=on go1.12beta1 get -u rsc.io/github/issue
go: finding rsc.io/github/issue latest
go: finding rsc.io/github latest
go: downloading rsc.io/github v0.0.0-20170131141737-e9436d94846e
go: extracting rsc.io/github v0.0.0-20170131141737-e9436d94846e
go: finding golang.org/x/oauth2 latest
go: finding github.com/google/go-github/github latest
go: finding 9fans.net/go/acme latest
go: finding 9fans.net/go/draw latest
go: downloading golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9
go: extracting golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9
go: finding 9fans.net/go latest
go: downloading 9fans.net/go v0.0.0-20181112161441-237454027057
go: extracting 9fans.net/go v0.0.0-20181112161441-237454027057
go: finding github.com/google/go-github v17.0.0+incompatible
go: downloading github.com/google/go-github v17.0.0+incompatible
go: extracting github.com/google/go-github v17.0.0+incompatible
go: finding golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
go: finding golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
go: finding google.golang.org/appengine v1.4.0
go: finding cloud.google.com/go v0.34.0
go: finding golang.org/x/net v0.0.0-20180724234803-3673e40ba225
go: finding github.com/golang/protobuf v1.2.0
go: finding golang.org/x/text v0.3.0
go: downloading golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
go: extracting golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
go: finding github.com/google/go-querystring/query latest
go: finding github.com/google/go-querystring v1.0.0
go: downloading github.com/google/go-querystring v1.0.0
go: extracting github.com/google/go-querystring v1.0.0
# rsc.io/github/issue
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/acme.go:279:33: not enough arguments in call to client.Issues.Edit
	have (string, string, int, *github.IssueRequest)
	want (context.Context, string, string, int, *github.IssueRequest)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/edit.go:152:40: not enough arguments in call to client.Issues.Create
	have (string, string, *github.IssueRequest)
	want (context.Context, string, string, *github.IssueRequest)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/edit.go:181:43: not enough arguments in call to client.Issues.CreateComment
	have (string, string, int, *github.IssueComment)
	want (context.Context, string, string, int, *github.IssueComment)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/edit.go:193:34: not enough arguments in call to client.Issues.Edit
	have (string, string, int, *github.IssueRequest)
	want (context.Context, string, string, int, *github.IssueRequest)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/edit.go:202:46: not enough arguments in call to client.Issues.AddLabelsToIssue
	have (string, string, int, []string)
	want (context.Context, string, string, int, []string)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/edit.go:216:47: not enough arguments in call to client.Issues.RemoveLabelForIssue
	have (string, string, int, string)
	want (context.Context, string, string, int, string)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/edit.go:465:13: client.Rate undefined (type *github.Client has no field or method Rate)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/edit.go:466:20: client.Rate undefined (type *github.Client has no field or method Rate)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/edit.go:472:26: client.RateLimit undefined (type *github.Client has no field or method RateLimit)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/issue.go:347:36: not enough arguments in call to client.Issues.Get
	have (string, string, int)
	want (context.Context, string, string, int)
/home/agniva/play/go/pkg/mod/rsc.io/github@v0.0.0-20170131141737-e9436d94846e/issue/issue.go:347:36: too many errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants