Hacker News new | past | comments | ask | show | jobs | submit login

What happens when the dependency are updated and not compatible anymore ?



Dependencies won’t update themselves since they are locked to their versions. If the developer manually triggers an update, and the dependencies aren’t compatible, either the code wouldn’t compile or it’s behave weird. In both cases, what’s the advantage of separating out the fetch-dependencies part?


That's why you have a go.mod file that specifies the dependencies for you. Just run go mod tidy and it generates/updates it for you. You get these reproducible builds for free this way.


A Go module specifies the exact versions of its dependencies. These versions do not change unless the author explicitly updates them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: