-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/go: symbolic links not dropped from repo #27093
Comments
Per #24057 (comment), I think this is working as intended. |
@dsnet Thanks a lot for that link - I hadn't seen that. Given that's a deliberate decision, I'm fine with it (very happy actually), but I do think that somewhere you should at least get some error or warning that your symbolic link has been silently turned into a plain file. |
Can you please give an example? Symbolic links are supposed to be silently elided from the underlying version control repo. It sounds like one of the converters is including them in the archive incorrectly. |
See this repo: |
Good candidate for backport once we fix it. Probably git archive is putting symlinks into the zip and I didn't realize that was a thing that would need to be filtered out. |
Change https://golang.org/cl/153819 mentions this issue: |
@gopherbot, please backport to Go 1.11: incorrect module contents produce incorrect |
Backport issue(s) opened: #29191 (for 1.11). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
In Go 1.11.4 a bug was fixed related to checksum calculation. As a result, some packages might end up with a different checksum from this version. The solution is upgrading, cleaning the mod cache and recalculating the go.sum file. See golang/go#27093
In Go 1.11.4 a bug was fixed related to checksum calculation. As a result, some packages might end up with a different checksum from this version. The solution is upgrading, cleaning the mod cache and recalculating the go.sum file. See golang/go#27093
A checksum in the go.sum file of go-dockerclient was corrupt because of golang/go#27093. Update to go-dockerclient 1.3.6. This fixes: go: downloading github.com/docker/docker v0.7.3-0.20180827131323-0c5f8d2b9b23 verifying github.com/docker/docker@v0.7.3-0.20180827131323-0c5f8d2b9b23: checksum mismatch downloaded: h1:mJtkfC9RUrUWHMk0cFDNhVoc9U3k2FRAzEZ+5pqSIHo= go.sum: h1:Zl/9mUfPbYbnv895OXx9WfxPjwqSZHohuZzVcjJ5QPQ= Thanks to Daniel Rossbach for reporting the issue.
A checksum in the go.sum file of go-dockerclient was corrupt because of golang/go#27093. Update to go-dockerclient 1.3.6. This fixes: go: downloading github.com/docker/docker v0.7.3-0.20180827131323-0c5f8d2b9b23 verifying github.com/docker/docker@v0.7.3-0.20180827131323-0c5f8d2b9b23: checksum mismatch downloaded: h1:mJtkfC9RUrUWHMk0cFDNhVoc9U3k2FRAzEZ+5pqSIHo= go.sum: h1:Zl/9mUfPbYbnv895OXx9WfxPjwqSZHohuZzVcjJ5QPQ= Thanks to Daniel Rossbach for reporting the issue.
The zip unarchiving used by
cmd/go/internal/modfetch
does not respectsymbolic links or file modes. This means that if there's a test directory that
contains symlinks or executable files (e.g. shell scripts) and there are
tests that rely on those properties, they will fail when the module is
a dependency and tests are run on it (for example with
go test all
).Currently a symbolic link is treated as a plain file - it is unarchived as a normal
file with the symbolic link as its contents, which seems wrong even if we
decide not to support symlinks in modules. Similarly, the module
content hash check will treat a symbolic link identically to a regular file.
The text was updated successfully, but these errors were encountered: