Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> No need for pom.xml, requirements.txt, cmake.txt, or any other kind of dependency configuration. It just works.

...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.



> ...until the project decides to switch to another hosting provider

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.


Or they create a github organisation (which might be even worse because the old repo probably still exists but could be stale)


Go already supports an indirection layer, commonly known as vanity URLs. It works by making a request to a domain owned by the project and parsing a meta tag in the response that points to the actual repository location. Of course, the problem is that few projects bother to set this up.


Go also provides a replace directive in the go.mod file [0].

[0] https://go.dev/ref/mod#go-mod-file-replace


> It's better to have an indirection layer to map the project name to the project location, like most other languages do.

Who takes care of the indirection layer when the upstream decides to switch to another hosting provider?


The upstream who manages their name::location mapping?


Please refrain from using the awkward question mark, it's condescending and rude.

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




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: