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: "comments are out of order" error on code that doesn't have a go: comment directive. #22309

Closed
aphistic opened this issue Oct 17, 2017 · 2 comments
Assignees

Comments

@aphistic
Copy link

@aphistic aphistic commented Oct 17, 2017

What version of Go are you using (go version)?

go version devel +58cf881c1c Tue Oct 17 17:00:15 2017 +0000 linux/amd64
(go tip on Travis CI)

Does this issue reproduce with the latest release?

It's currently happening on the version of go tip running on Travis CI

What operating system and processor architecture are you using (go env)?

Ubuntu 14.04.5 LTS on x86_64 (running on Travis CI)

What did you do?

I just made an update to a library of mine that I have building on Travis CI against go tip and it just failed with the following error:

2017/10/17 18:03:48 comments are out of order. /home/travis/gopath/src/github.com/aphistic/gomol/attrs.go:147:1 was before -.

The file it's mentioning hasn't changed in 2 months and I can't decipher what the error actually means in this context. The build itself is at https://travis-ci.org/aphistic/gomol/jobs/289149613#L544. The code in question is at https://github.com/aphistic/gomol/blob/fallback-logger/attrs.go#L147.

I already commented on the PR that seems to have committed the code I'm running into: https://go-review.googlesource.com/c/go/+/69630

What did you expect to see?

A successful coverage run.

What did you see instead?

The error mentioned above.

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 17, 2017

Change https://golang.org/cl/71351 mentions this issue: cmd/cover: don't try to attach directives to synthetic decls

@kramvan1
Copy link

@kramvan1 kramvan1 commented Oct 17, 2017

+1 having this same issue

@gopherbot gopherbot closed this in 94e3a30 Oct 17, 2017
@golang golang locked and limited conversation to collaborators Oct 17, 2018
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
4 participants
You can’t perform that action at this time.