You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.lock files in the go modules cache are a frequent source of issues for us. Take the following common use case for example: when running go in a Docker container that has had dependencies installed into it as part of building the Docker image, these dependencies are naturally owned by root with 755 permissions.
However, when running go build in the container, naturally, the user is no longer root at this time, and one sees frequent issues in the form of:
../cmd/app/main.go:6:2: open /go/pkg/mod/cache/download/github.com/<user>/<repo>/@v/v1.9.0.lock: permission denied
because the root-owned file is obviously not writable to the user.
I was very surprised to see there was no documentation of this type of file available anywhere. I would like to suggest that, for example this page would explain the purpose and functioning of these files, to provide insight into errors such as these, so they can be resolved. Alternatively, I would also welcome a suggested workflow change, to make these files no longer a problem, such that they can stay implementation details that can be disregarded by the user.
The text was updated successfully, but these errors were encountered: