Hacker News new | ask | show | jobs
by thefounder 2500 days ago
I like Go more. The git/hg/svn/bz repository is the "package". No custom (and central) "registry"
5 comments

It's worth noting that Go is getting its own registry system soon, the Go Module Index [1].

[1] https://blog.golang.org/modules2019

You can use modules without a registry. It remains to be seen how many prefer a centralised registry
There was a Go dependency that got deleted (repo removed) and screwed everyone else’s project up, so I’m not sure this is perfect either.
Which won't stop it happening with a package manager either.

Even immutable repos are going to have fun with DMCAs.

npm hosted the packages so acted like a cache, the same didn’t happen when people deleted repos
What happened when the npm owner decided to remove some packages? Why would you trust one npm owner than the package author? Can't you just cache the package if you need cache?
> What happened when the npm owner decided to remove some packages?

They can’t, at least not older packages, I believe they need to contact NPM if they wish to unpublish packages. https://docs.npmjs.com/cli/unpublish

I mean when Registry owner (i.e joyent or node org) removes your package for various reasons. Not to mention that private packages are a pain(i.e you need to spin up your own registry)
It helps that Go’s “distributable package” is the source code itself rather than a binary artifact.
Same with npm at least with git.
This is not unique to Go, every language I work with can use dependencies in this way.
I guess you don't work with many languages
How about java projects? How can I add a dependency to a project I’m building without it being published to a maven repo, for instance?
> How about java projects? How can I add a dependency to a project I’m building without it being published to a maven repo, for instance?

You can use Gradle, which supports source repositories, instead of Maven:

https://blog.gradle.org/introducing-source-dependencies