Hacker News new | ask | show | jobs
by canadev 2679 days ago
Modules in 1.11 have some rough edges. Internally we have written a merge driver which is imperfect for handling version conflicts, and a couple of my coworkers keep having to delete $GOPATH/pkg . I was hoping these would be addressed in this release but it doesn't look like they are.
2 comments

The module cache in Go 1.11 can sometimes cause various errors, primarily if there were previously network issues or multiple go commands executing in parallel, where the workaround would then be to delete GOPATH/pkg (or run 'go clean -modcache'). I would guess your coworkers were seeing some variation of that.

If so, that is addressed for Go 1.12:

https://github.com/golang/go/issues/26794

We definitely weren't deliberately executing commands in parallel and I think it's pretty rare that we have network issues.
I've had 2 coworkers who use different IDEs report that apparently their IDE is running `go` commands in parallel, because they'll get the corrupted module caches.
We had some odd issues when sharing a mod file accross 2 main methods that reached slightly different parts of the API. Each would rewrite the mod file automatically in their own way.

I understand that your mod file is always up to date when this happens, but imo you should be able to use them like ivy files for example. (Using the readonly flag unfortunately does not work either).