-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: internal error: overlapping blocks for func literals in switch cases #16540
Comments
@stevekuznetsov I believe the "#27640,#27764" means that the block begins at byte 27640 in the file and ends at byte 27764. So something like "head -c 27764 request.go | tail -c +27640" should print the block it's talking about. Can you try again with Go 1.7rc3? It's possible that this has already been fixed since 1.6.2. Thanks! |
I'm afraid I can't install $ head -c 27764 vendor/k8s.io/kubernetes/pkg/client/restclient/request.go | tail -c +27640 > debug.go // debug.go
case bytes.IndexFunc(body, func(r rune) bool { return r < 0x0a }) != -1:
glog.Infof("Response Body:\n%s", hex.Dump(body)) This corresponds with this snippet of the file. |
The sub-block identified is: $ head -c 27704 vendor/k8s.io/kubernetes/pkg/client/restclient/request.go | tail -c +27685 > debug.go // debug.go
{ return r < 0x0a } |
We have a similar issue in github.com/ethereum/go-ethereum/p2p. The statement that causes it also involves a function literal inside
It still happens with go 1.7rc3. |
A smaller and standalone reproduction: $ cat issue16540_test.go The two overlapping ranges are: |
CL https://golang.org/cl/32612 mentions this issue. |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
I ran the OpenShift Origin unit tests. Unfortunately this is fairly complicated, but can be achieved with:
$ git clone git@github.com:openshift/origin.git $ cd origin $ make build $ JUNIT_REPORT=true TEST_KUBE=true hack/test-go.sh
What did you expect to see?
A successful test run with no errors.
What did you see instead?
Full output to stdout and stderr
The file mentioned above can be seen here:
request.go
.I'm happy to do more digging but I'm not really sure what the
#27640
syntax means or what to look for in the source.The text was updated successfully, but these errors were encountered: