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

simple + Go tip: Program.CreatePackage("unsafe") was not called #76

Closed
gyuho opened this issue Mar 21, 2017 · 5 comments
Closed

simple + Go tip: Program.CreatePackage("unsafe") was not called #76

gyuho opened this issue Mar 21, 2017 · 5 comments
Labels
duplicate invalid User error and other non-issues

Comments

@gyuho
Copy link

gyuho commented Mar 21, 2017

Hope this is not a duplicate issue.

panic: Package("runtime/cgo").Build(): unsatisfied import: Program.CreatePackage("unsafe") was not called
goroutine 2679 [running]:
honnef.co/go/tools/ssa.(*Package).build(0xc449b07e60)
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2300 +0x10f9
honnef.co/go/tools/ssa.(*Package).(honnef.co/go/tools/ssa.build)-fm()
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2260 +0x2a
sync.(*Once).Do(0xc449b07e8c, 0xc44a92bf98)
	/home/travis/.gimme/versions/go/src/sync/once.go:44 +0xbe
honnef.co/go/tools/ssa.(*Package).Build(0xc449b07e60)
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2260 +0x4c
honnef.co/go/tools/ssa.(*Program).Build.func1(0xc44a86c0c0, 0xc449b07e60)
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2244 +0x2b
created by honnef.co/go/tools/ssa.(*Program).Build
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2243 +0x118: No such file or directory
gosimple warning:
panic: Package("runtime/cgo").Build(): unsatisfied import: Program.CreatePackage("unsafe") was not called
goroutine 2679 [running]:
honnef.co/go/tools/ssa.(*Package).build(0xc449b07e60)
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2300 +0x10f9
honnef.co/go/tools/ssa.(*Package).(honnef.co/go/tools/ssa.build)-fm()
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2260 +0x2a
sync.(*Once).Do(0xc449b07e8c, 0xc44a92bf98)
	/home/travis/.gimme/versions/go/src/sync/once.go:44 +0xbe
honnef.co/go/tools/ssa.(*Package).Build(0xc449b07e60)
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2260 +0x4c
honnef.co/go/tools/ssa.(*Program).Build.func1(0xc44a86c0c0, 0xc449b07e60)
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2244 +0x2b
created by honnef.co/go/tools/ssa.(*Program).Build
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2243 +0x118
Checking unused...
unused checking failed:
panic: Package("runtime/cgo").Build(): unsatisfied import: Program.CreatePackage("unsafe") was not called
goroutine 2455 [running]:
honnef.co/go/tools/ssa.(*Package).build(0xc435d23140)
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2300 +0x10f9
honnef.co/go/tools/ssa.(*Package).(honnef.co/go/tools/ssa.build)-fm()
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2260 +0x2a
sync.(*Once).Do(0xc435d2316c, 0xc431447f98)
	/home/travis/.gimme/versions/go/src/sync/once.go:44 +0xbe
honnef.co/go/tools/ssa.(*Package).Build(0xc435d23140)
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2260 +0x4c
honnef.co/go/tools/ssa.(*Program).Build.func1(0xc4292218c0, 0xc435d23140)
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2244 +0x2b
created by honnef.co/go/tools/ssa.(*Program).Build
	/home/travis/gopath/src/honnef.co/go/tools/ssa/builder.go:2243 +0x118

Full logs can be found at https://travis-ci.org/coreos/etcd/jobs/213502335#L604.

Thanks!

@mvdan
Copy link
Contributor

mvdan commented Mar 21, 2017

What version of go-tools is this on?

@gyuho
Copy link
Author

gyuho commented Mar 21, 2017

@dominikh
Copy link
Owner

IIRC this is caused by an outdated copy of x/tools/go/loader.

@mvdan
Copy link
Contributor

mvdan commented Mar 21, 2017

@gyuho try adding -u in those lines

gyuho added a commit to gyuho/etcd that referenced this issue Mar 21, 2017
See dominikh/go-tools#76 (comment).

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
@gyuho
Copy link
Author

gyuho commented Mar 21, 2017

Worked. Thanks @mvdan and @dominikh !

@gyuho gyuho closed this as completed Mar 21, 2017
@dominikh dominikh added the invalid User error and other non-issues label Mar 21, 2017
@dominikh dominikh marked this as a duplicate of #132 Jul 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate invalid User error and other non-issues
Projects
None yet
Development

No branches or pull requests

3 participants