News for hackers. Stuff that matters.
Re:Go Run by _ache_ on Wednesday February 21, 2024 @06:00PM (#39460832)
What happens when the dependency are updated and not compatible anymore ?
Re:Go Run by teejays on Wednesday February 21, 2024 @06:11PM (#39460955)
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?
Re:Go Run by vaughnegut on Wednesday February 21, 2024 @06:07PM (#39460912)
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.
Re:Go Run by mseepgood on Wednesday February 21, 2024 @06:05PM (#39460885)
A Go module specifies the exact versions of its dependencies. These versions do not change unless the author explicitly updates them.