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

Closed
robertlestak opened this issue Feb 22, 2018 · 1 comment
Closed

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

robertlestak opened this issue Feb 22, 2018 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@robertlestak
Copy link

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?

yes

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

darwin/amd64

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/github.com/[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 The path to resolution is known, but the work has not been done. label Apr 2, 2018
@gopherbot
Copy link

Change https://golang.org/cl/104935 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.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants