News for hackers. Stuff that matters.
Re:Go’s major versioning sucks – From a fanboy by tsimionescu on Saturday March 05, 2022 @02:16AM (#30565194)
> The whole point of having full version path in each file is to allow gradual upgrade to a new major version/a completely different package. Listen to Russ Cox go over this many times.

That only works if v2 of the library is crazy enough to keep all of the v1 apis around as well. Otherwise, when I switch version the old import path stops working.

> gofmt -w -r '"github.com/logrusorgru/aurora" -> "github.com/logrusorgru/aurora/v3"' ./

Cool. Does that also cleanup git history so that I don't have to look at hundreds of files which needlessly got changed?

Re:Go’s major versioning sucks – From a fanboy by oxplot on Saturday March 05, 2022 @04:53AM (#30566065)
> That only works if v2 of the library is crazy enough to keep all of the v1 apis around as well. Otherwise, when I switch version the old import path stops working.

Gradual upgrade, as in you can update a single file to use the next major version. Not sure what you’re on about.

> hundreds of files which needlessly got changed

If you have hundreds of files and upgrading to a new major version all at once, you’re creating the exact risk that Go is trying to mitigate.