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

x/vgo: ignore blank lines in go.modverify #24027

robertlestak opened this issue Feb 22, 2018 · 1 comment

x/vgo: ignore blank lines in go.modverify #24027

robertlestak opened this issue Feb 22, 2018 · 1 comment


Copy link

@robertlestak robertlestak commented Feb 22, 2018

Please answer these questions before submitting your issue. Thanks!

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

go1.10 darwin/amd64

Does this issue reproduce with the latest release?


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


What did you do?

echo >go.modverify && vgo build

What did you expect to see?

Successful build, with package hashes in go.modverify.

What did you see instead?

vgo: malformed go.modverify:
/Users/[user]/go/src/[user]/[package]/go.modverify:1: wrong number of fields

Other Notes

On line 137 of vgo/vendor/cmd/go/internal/vgo/fetch.go, for len(data) > 0 { doesn't account for the fact that echo >go.modverify creates a single byte file while touch go.modverify creates a 0 byte file, yet the documentation at Reproducible, Verifiable, Verified Builds shows the echo >go.modverify usage.

While the short term solution would be to change the documentation to touch go.modverify, as evidenced by the usage in the documentation, the echo >[file] usage is common for creating a blank file, and if this is done, the byte length check will err out.

@gopherbot gopherbot added this to the vgo milestone Feb 22, 2018
@rsc rsc changed the title x/vgo: "wrong number of fields" error with blank go.modverify x/vgo: ignore blank lines in go.modverify Apr 2, 2018
@rsc rsc added the NeedsFix label Apr 2, 2018

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Apr 5, 2018

Change mentions this issue: x/vgo: ignore blank lines in go.modverify

@golang golang locked and limited conversation to collaborators Apr 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.