-
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
x/vgo: ziphash mismatch between different platform #26229
Comments
Needless to say, that's not supposed to happen. On my Mac I get the same hash you do on Linux. Windows is the difference. We're using a bare Git repo and 'git archive', which I assumed never even wrote the individual files to disk, so I thought I wouldn't have to worry about line endings. (I'm assuming its line endings, but who knows?) Can you please attach %GOPATH%\src\mod\cache\download\github.com\cjtoolkit\validate@v\v1.1.0.zip from your Windows system to this issue? Thanks. |
Here is the attachment, as requested! I open up a *.go file from the archive in sublime on linux and windows, I can confirm that the line ending is different. |
I got a potential fix here, replace the command
with
This should enforce the unix line ending, on any platform. UpdateOn windows, in powershell I executed those commands
Deleted the mod folder, than ran I can confirm, the line ending was causing the issue. |
@CJ-Jackson, thanks very much for identifying the right git flags. I'll apply that fix. |
Change https://golang.org/cl/122480 mentions this issue: |
@rsc You're welcome! |
What version of Go are you using (
go version
)?version 1.10.3
vgo (6cd5a417451d8ee907692eded07ef1b6b53825b1)
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Windows
Linux
What did you do?
Run
vgo mod -sync
What did you expect to see?
ziphash to be consistent across different platform (e.g. Windows and Linux)
What did you see instead?
ziphash is not consistent between different platform.
Windows (github.com/cjtoolkit/validate@v1.1.0)
Linux (github.com/cjtoolkit/validate@v1.1.0)
Causes verification to fail while working with different platform.
The text was updated successfully, but these errors were encountered: