Live data from Hacker News

Dependencies should be fetched directly from VCS

arp242.net

11–20 of 46 posts

Re: Dependencies should be fetched directly from VCS

#11

There’s no perfect solution here. Publishing to a separate registry can survive a Git repo rename, migration or deletion. Locking into a Git host seems undesirable. By separating VCS and registry they can offer different feature sets. There’s also nothing stopping someone from publishing to multiple registries.

FWIW, Go provides a mechanism to abstract the import source, so you can use a vanity domain under your control that resolves to your host of choice.

Re: Dependencies should be fetched directly from VCS

#12
post #5

Maybe everyone else is too young to remember left-pad, but in the wake of left-pad everyone learned that one of the primary selling points of dedicated dependency repositories is that they can refuse to support "unpublishing" a dependency, which is not a guarantee that Github (or any other popular forge) makes.

> Maybe everyone else is too young to remember left-pad

It wasn't that long ago...

Re: Dependencies should be fetched directly from VCS

#13
People keep replying seeming to miss what makes Go's solution so good. I think it deserves more attention.

In many cases I think it's impossible to avoid the pain that comes with decentralization without defeating the point. It's challenging because certain things are hard to do decentralized so it's easier to just give up and rely on central authorities and components.

When you install Go, it does just that, to some approximation; it will try to fetch from the module proxy first and fall back after that fails. But what makes Go different and more interesting is that you can just turn that off with no consequence. As long as all of the Git hosts are up, you can still use Go just fine with no proxy. I'm pretty sure Nix builds do this by default with Go so I believe most dependencies are usually online. That means the proxy approach and the decentralized approach are both fully redundant with eachother, while allowing the decentralized VCS hosts to remain the source of truth.

Go also separately has the sumdb to enforce immutability, so you can know that when you go grab a specific package that the tag name corresponds to one and only one exact source code. This is also optional, and even without it you get the benefit of local sum checking via your own cache and go.sum files in source checkouts. But having this be separate is great because it also means you could use another third party module proxy or a third party sumdb, or use just the sumdb and no proxy. It gives you many options to not have to rely on a single party while still getting some of the benefits of centralization.

Systems like this are rare. Many systems try very hard to have the cake and eat it too, but it usually fails somewhere. For me Go's approach works, and that is worth some attention.

Re: Dependencies should be fetched directly from VCS

#15
Not sure this is the right solution for 2 reasons:

First, I'm uncomfortable with making a package creator's VCS provider part of the language's module infrastructure.

Second, not all files under version control necessarily belong in a tarball, and not all files in a tarball necessarily need to be under version control.

However, the point that there should be an easy way to track changes in your dependencies is well taken. One possible approach would be that publishing a packge boils down to importing the files that normally would go in your tarball into a community-controlled VCS.

Re: Dependencies should be fetched directly from VCS

#16
post #5

Maybe everyone else is too young to remember left-pad, but in the wake of left-pad everyone learned that one of the primary selling points of dedicated dependency repositories is that they can refuse to support "unpublishing" a dependency, which is not a guarantee that Github (or any other popular forge) makes.

> Maybe everyone else is too young to remember left-pad It wasn't that long ago...

Ten years as of March 22...

Re: Dependencies should be fetched directly from VCS

#17
post #10

Not sure relying on a bunch of various VCS to stay online is necessarily a great approach either. I think go is also a little more amenable to source library distribution since there's a pretty broad pure go ecosystem. For interpreted languages, a lot of performance sensitive stuff tends to be offloaded to arbitrary compiled languages so you end up needing a bunch of different toolchains to get everything working. A…

2nd paragraph of blogpost:

> A hash of all files is checked against known hashes on sum.golang.org to prevent tags from being replaced, and it uses a proxy to prevent repos from being left-pad’d.

there is no need for 3rd party hosts to stay online. It's the best combination of de-centralized and centralized approaches.

Re pre-buiild packages: Python makes a difference between source and binary wheels. This approach is obviously for source wheels only.

Re: Dependencies should be fetched directly from VCS

#18
post #5

Maybe everyone else is too young to remember left-pad, but in the wake of left-pad everyone learned that one of the primary selling points of dedicated dependency repositories is that they can refuse to support "unpublishing" a dependency, which is not a guarantee that Github (or any other popular forge) makes.

There's no such thing as refusing to unpublish, not if you want to avoid prison time.

Package contains child porn, what now?

Re: Dependencies should be fetched directly from VCS

#19
IIRC Go had to deal with a bunch of issue related to their initial source based package management system. The URL imports remain, but I believe fetches are served through the pkg.go.dev proxy now.

Andrew Nesbitt has a good write [0] up on why using Git as a database is a bad idea

[0] https://nesbitt.io/2025/12/24/package-managers-keep-using-gi...

Re: Dependencies should be fetched directly from VCS

#20
post #15

Not sure this is the right solution for 2 reasons: First, I'm uncomfortable with making a package creator's VCS provider part of the language's module infrastructure. Second, not all files under version control necessarily belong in a tarball, and not all files in a tarball necessarily need to be under version control. However, the point that there should be an easy way to track changes in your dependencies is well t…

> First, I'm uncomfortable with making a package creator's VCS provider part of the language's module infrastructure.

Why can't you store a (possibly shallow) clone of the repository in the "package" registry?

> Second, not all files under version control necessarily belong in a tarball

How likely is it that files under version control but "not belonging in a tarball" (not needed to compile the current version) take so much space to justify making a tarball? At least if you make a shallow clone.

> not all files in a tarball necessarily need to be under version control

Which wouldn't (besides huge files that can be handled with git-lfs and similar)?

If you have configure in mind, let's not do it please.

The risks introduced by including them vastly overcome their convenience, in my opinion.

And maybe let's move towards getting rid of autotools

Post reply on HN