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/cover: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.Count #10408

Closed
dvyukov opened this issue Apr 10, 2015 · 1 comment
Closed

cmd/cover: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.Count #10408

dvyukov opened this issue Apr 10, 2015 · 1 comment
Assignees
Milestone

Comments

@dvyukov
Copy link
Member

@dvyukov dvyukov commented Apr 10, 2015

$ go test -run=none -coverpkg=std index/suffixarray

fails with:

_testmain.go:2037: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.Count
_testmain.go:2037: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.Pos
_testmain.go:2037: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.NumStmt
@dvyukov dvyukov added this to the Go1.5 milestone Apr 10, 2015
@robpike
Copy link
Contributor

@robpike robpike commented Apr 13, 2015

A much faster version:

go test -coverpkg unsafe reflect

The problem is that code like this is generated in testmain.go:

coverRegisterFile("unsafe/unsafe.go", _cover143.GoCover_700.Count[:], _cover143.GoCover_700.Pos[:], _cover143.GoCover_700.NumStmt[:])

Something needs to tell go test that there is no unsafe package being built even if we ask for it.

@robpike robpike closed this in eba38fd Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.