by cesarb · 2y ago · 0 comments
...until the project decides to switch to another hosting provider. Which has happened more than once in the past; it used to be common to host projects in Sourceforge, for a while Google Code was common, now many projects are on GitHub, and it won't surprise me at all when another forge becomes the popular one. Individually, projects might switch between being self-hosted (in their own domain name) and hosted on a shared forge (using the forge's domain name).
IMO, it's a bad design. It forces the project's repository's location to become the project's official "name", that is, it mixes up location and naming. It's better to have an indirection layer to map the project name to the project location, like most other languages do.
Or decides their github username looks better with an upper case letter (https://github.com/sirupsen/logrus/issues/570). Or for people who use their real name as their github name, updating their username after marriage, divorce, gender transition or whatever.
Who takes care of the indirection layer when the upstream decides to switch to another hosting provider?
What do you do if they fail to update their name::location mapping, and the language doesn't provide a way to do it yourself?
At least in Go, when that happens we can just add a `replace` statement in the go.mod file:
replace example.com/foo/bar v2.35.0 => example.org/baz/bar/v2 master