Don't couple your Go code to GitHub
Thread
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
Don't couple your Go code to GitHub
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
prasadvara · · focus · HN ↗
SenHeng · · focus · HN ↗
One day, we’re all going back to vendoring dependencies.
otterley · · focus · HN ↗
metaltyphoon · · focus · HN ↗
otterley · · focus · HN ↗
thayne · · focus · HN ↗
It bloats your repo, both with the actual code, and the large diffs when you update it.
You have to manually track new versions, without something to tell you if new versions are available, or if your version has known security vulnerabilities.
If the dependency has it's own dependencies, you have to vendor those too recursively. And if multiple dependencies have the same transitive dependency, it is up to you to deduplicate them, and make sure you have a version compatible with all dependents.
Etc.
otterley · · focus · HN ↗
Recursive dependencies have the same issues whether you vend them or not.
Ensuring that diffs to updated dependencies remain within a vendor folder is trivial.
So, what’s left?
thayne · · focus · HN ↗
The biggest problem isn't (usually) disk space, or network bandwidth, it is that git operations slow down as the size of the repo grows. And it means that cloning or pulling the repo takes longer, which can be especially problematic for CI.
> Recursive dependencies have the same issues whether you vend them or not.
otterley · · focus · HN ↗
thayne · · focus · HN ↗
That sounds like it's inconvenient to me.
otterley · · focus · HN ↗
thayne · · focus · HN ↗
And both of those concerns can be addressed by using an internal/private registry that mirrors the packages you need.
But in any event, your original question was to elaborate on why vendoring is inconvenient. Whether or not the benefits are worth the inconvenience is a different question, to which IMHO the answer is "it depends". Sometimes it is, and sometimes it isn't.
otterley · · focus · HN ↗
How so? Whether a dependency is vendored or not, you still have to update it to integrate a security update to that dependency, don't you?
throwaway894345 · · focus · HN ↗
If I want to upgrade the disk on my MacBook Pro, I need to buy a new MacBook Pro with a larger disk. If I want to upgrade the disk on my work laptop, I’m SOL.
> Ensuring that diffs to updated dependencies remain within a vendor folder is trivial.
It’s not obvious to me how putting the dependencies in a vendor folder solves the diff problem. Does every code host allow you to hide diffs to certain directories?
And what’s the advantageous scenario for vendored dependencies? Is it just when the mod proxy and the upstream code host go down at the same time?
otterley · · focus · HN ↗
Is this an actual problem or are you just hypothesizing? MBPs today come with a minimum of 512 GB of storage. Even 5 years ago I think the minimum was 256 GB. Let’s talk about actual problems, shall we?
> And what’s the advantageous scenario for vendored dependencies? Is it just when the mod proxy and the upstream code host go down at the same time?
I’ll let you do this research. The use case has been well understood for decades. Ask your favorite LLM or consult some respected release engineering books.
throwaway894345 · · focus · HN ↗
Consider the possibility that the drive needs to accommodate more than just a single repository?
I have lots of software, entire language toolchains, AI models, Docker images, application volumes, VMs, etc.
And this isn’t a theoretical concern; I have to free up space every few months.
> This is a useful homework assignment. Ask your favorite LLM or consult some respected release engineering books. Also consult your local AppSec and infosec teams.
So there is no advantage scenario that you’re aware of?
otterley · · focus · HN ↗
throwaway894345 · · focus · HN ↗
collabs · · focus · HN ↗
I use dotnet and I never liked seeing dlls and binary files in my diffs. I would argue if we are adding vendor code to our projects, we should demand the FULL source code instead of dlls. Maybe it is already possible with things like x unit. I have never given it much thought... But then that vendoree code has to come from somewhere as well, right? I mean there is something to be said about provenance or something here?
Sorry if this feels like a stream of consciousness because it is ↔
otterley · · focus · HN ↗
someonebaggy · · focus · HN ↗
jeremyjh · · focus · HN ↗
The answer to the question of why THAT is the case - is not so easy to answer. The main benefit I can see with using lock files instead of vendoring is that it saves a lot of storage and diff history from entering your repository. So clones are much faster, backups smaller etc.
I think Go used to work this way (automated vendoring) but it’s the only language I can think of that ever did in terms of standard tooling. It would be instructive to learn why that changed.
stackedinserter · · focus · HN ↗
st3fan · · focus · HN ↗
throwaway894345 · · focus · HN ↗
deniska · · focus · HN ↗
mkj · · focus · HN ↗
Maybe at that point it won't be using git either, or maybe it will - who knows.
sleepybrett · · focus · HN ↗
JodieBenitez · · focus · HN ↗
andreashaerter · · focus · HN ↗
Here's mine: <a href="https://github.com/foundata/hugo-theme-govanity" rel="nofollow">https://github.com/foundata/hugo-theme-govanity (e.g. used at <a href="https://golang.foundata.com/" rel="nofollow">https://golang.foundata.com/ )
And yes I'm aware of the irony of hosting this on GitHub... still figuring out a good workflow for maintaining our OSS on Codeberg and GitHub in parallel fed from the internal forge. The dependency on our own domain is real but we favor it.
thih9 · · focus · HN ↗
I’d remove “go” from the above, i.e. I think same applies to other stacks.
Even using GitHub domain links in code comments gets problematic long term. Ie when a migration happens and those links start pointing nowhere.
handoflixue · · focus · HN ↗
Why can't you just search-and-replace? Presumably all of them refer to "GitHub.com" and not much else code will, so I'd think this was an exceptionally easy case.
Even easier for comments, since them being obsolete for a few hours during a migration doesn't exactly break anything.
gravypod · · focus · HN ↗
mort96 · · focus · HN ↗
It was horrible. A team of people spent weeks. Different projects depended on different versions of the same internal libraries, we had to create a branch for each depended-on commit and make a version of that commit with the new URLs. The expressed goal was to end up with a system that's "exactly the same" as the old, just on a new host. Changing which version of libraries projects depends on would introduce unnecessary risk.
And the result is a code base where bisects are broken and where it's impossible to build an old version of any of the code without a ton of work.
dmoy · · focus · HN ↗
This is one of the main motivations for using a monorepo with all third party dependencies imported all the way in, and only one version for everything.
Of course it causes a whole bunch of other problems and is kinda expensive to scale, so most places won't do it.
dlisboa · · focus · HN ↗
0cf8612b2e1e · · focus · HN ↗
Pick your poison. Each approach has some seriously negative trade offs in the extremes.
mort96 · · focus · HN ↗
oefrha · · focus · HN ↗
That makes no sense? As long as you’re using go modules, you can just host an internal go proxy for internal modules similar to proxy.golang.org to archive the old versions, and they won’t depend on the old git host.
sjbzbeiks · · focus · HN ↗
I say this because I’ve gone through a few of these, some with monorepos (the easiest, search and replace and you’re done), some not (yes the hardest but you can just vendor).
At least in the situations I’ve faced this was genuinely not horrible beyond just the organization itself being complicated about the solution.
mort96 · · focus · HN ↗
handoflixue · · focus · HN ↗
Clone Server A -> Server B. All code still refers to A.
Update code to refer to B
You can now EOL Server A, and B becomes the new canonical reference.
I think the key is simply that you can keep both A + B running during the migration, so you just need to be able to do a code freeze for the duration of the migration. And a single person can easily do this migration with a few python scripts and an hour.
Bonus points: code freeze guarantees your #2 - no changes to how the code works.
Of course, I'd assume that most complaints come from situations where this "secret trick" isn't viable
mort96 · · focus · HN ↗
handoflixue · · focus · HN ↗
[deleted] · · focus · HN ↗
[deleted]
mort96 · · focus · HN ↗
sjbzbeiks · · focus · HN ↗
gnaman · · focus · HN ↗
mort96 · · focus · HN ↗
dolmen · · focus · HN ↗
<a href="https://go.dev/doc/modules/major-version" rel="nofollow">https://go.dev/doc/modules/major-version
lelandbatey · · focus · HN ↗
The "module name is network path" is a convenient convention but not at all some "limitation" of the tooling.
mort96 · · focus · HN ↗
someonebaggy · · focus · HN ↗
mort96 · · focus · HN ↗
In Go, the package identifiers are literally URLs. Go's own tooling assumes that it can make an HTTP request to the URL and that the response will be HTML with particular tags which Go's tooling will parse and use to resolve a git repository which can be 'git clone'd. Leaving them as-is when you abandon the infrastructure they reference literally means leaving dead links in your source code.
someonebaggy · · focus · HN ↗
mort96 · · focus · HN ↗
someonebaggy · · focus · HN ↗
foldr · · focus · HN ↗
mort96 · · focus · HN ↗
foldr · · focus · HN ↗
mort96 · · focus · HN ↗
foldr · · focus · HN ↗
Any tool that automatically assumes that a URL in a Go module import is 'trusted' is just a broken tool.
mort96 · · focus · HN ↗
foldr · · focus · HN ↗
If you haven't added a replace directive to your go.mod, then you certainly haven't replaced all instances of the old URLs with updated ones.
someonebaggy · · focus · HN ↗
sleepybrett · · focus · HN ↗
mort96 · · focus · HN ↗
sleepybrett · · focus · HN ↗
quectophoton · · focus · HN ↗
Heads up for anyone who doesn't know: this only works at the "top level". Any replace directives in your dependencies will be ignored[1].
So for example if you have a dependency tree like [main -> thirdpartyframework -> golang.org/x/net/http2], and thirdpartyframework uses a vulnerable version of `golang.org/x/net/http2`, you can't just fix it by patching the thirdpartyframework repository with a replace directive; no, because that would be too convenient. Instead, the replace directive needs to be at the main module, where it doesn't make sense and is inconvenient.
Even though I like Go, it really seems like they don't care about anything other than monorepos. As soon as you need to work with forks, mirrors, or even just private modules[2][3], the tooling actively works against you. Also using your custom module proxy is a pain.
[1] See: <a href="https://go.dev/ref/mod#go-mod-file-replace:~:text=replace%20directives%20only" rel="nofollow">https://go.dev/ref/mod#go-mod-file-replace:~:text=replace%20...
[2]: If you've only used private modules hosted on GitHub you might not have noticed too much pain because the Go tooling has hardcoded behavior specifically for GitHub and a few mainstream forges. You don't find out about this until you try to self-host something like Forgejo on your own domain thinking it would Just Work(tm), but it doesn't, and now you're left wondering why tf it works with GitHub but not with your own forge instance.
[3]: I think there's no hardcoded code for SourceHut, so you might be able to experience the inconvenience by hosting private modules in there.
Joker_vD · · focus · HN ↗
Wait, what? If you decide, in your own application, to force all your dependencies to use a specific version of golang.org/x/net/http2, then obviously you'd want to be able to put this directive into your own application's source instead of going around patching 3rd-party repositories (that's just rude).
mbreese · · focus · HN ↗
Even in the case where it’s an internal only Lu array, it can be complicated to refactor a library name.
handoflixue · · focus · HN ↗
I did not realize it ran that deep - I'm used to distributing EXE files, not anything that would need to know internal dependencies like that.
mort96 · · focus · HN ↗
someonebaggy · · focus · HN ↗
someonebaggy · · focus · HN ↗
mort96 · · focus · HN ↗
But it's something you have to do as an active choice; the tooling will nudge you towards using URLs to your primary git host's web front-end. And it naturally doesn't work for libraries.
dolmen · · focus · HN ↗
Many tools will fail if you break this contract.
mort96 · · focus · HN ↗
dolmen · · focus · HN ↗
<a href="https://datatracker.ietf.org/doc/draft-davies-internal-tld/" rel="nofollow">https://datatracker.ietf.org/doc/draft-davies-internal-tld/
ljm · · focus · HN ↗
Everything else is fine. Generics, errors, whatever...
zahlman · · focus · HN ↗
Joker_vD · · focus · HN ↗
sleepybrett · · focus · HN ↗
throwawayffffas · · focus · HN ↗
I have seen too many cases of requirements on internal projects that prohibit devs from working because oops the vpn is down now or oops gitlab is under load and the pipeline for your dependency won't finish for the next hour.
bayindirh · · focus · HN ↗
It's not only an issue of availability or depending on circumstances you can't control, but a matter of reproducibility hence dependability.
I want to be able to compile critical software when a zombie apocalypse hits, and I have a growing discomfort about trusting outside parties for their availability and benevolence.
ljm · · focus · HN ↗
Even if you don't want to go as far as vendoring (which can get a bit out of hand with, say, NPM), a middle ground is using Artifactory or whatever as a proxy.
Then be more deliberate about when you update. AI may even help here where static analysis doesn't, because you might be able to use inference to see if a dep upgrade is even needed. Unless it has a severe vuln you probably don't need to track latest.
gumby · · focus · HN ↗
It could be a URN that used the DNS as a back end (though that’s a lot like a URL) so better would be something more abstract with multiple possible resolvers and a signature.
someonebaggy · · focus · HN ↗
skybrian · · focus · HN ↗
racingmars · · focus · HN ↗
People can delete projects from GitHub. Businesses whose priorities might change may not keep an old project set to public up on GitHub because they won't want people to continue contacting them for support, or they don't want to be responsible for updating security vulnerabilities for projects they are abandoning so they'd rather just pull it offline, etc.
Whether the library you're importing is hosted on GitHub or not, never assume it will be there tomorrow. *Always vendor your dependencies.*
skybrian · · focus · HN ↗
kbolino · · focus · HN ↗
bionsystem · · focus · HN ↗
0xbadcafebee · · focus · HN ↗
prasadvara · · focus · HN ↗
-- Curious how this avoids SBOM need?
0xbadcafebee · · focus · HN ↗
prasadvara · · focus · HN ↗
dewey · · focus · HN ↗
You can also just use "replace github.com/example/example => gitlab.com/example/example" in your go.mod file and everything will keep working. That seems like a very pre-mature optimization for something that doesn't really matter.
mort96 · · focus · HN ↗
cyberpunk · · focus · HN ↗
You know, normal development task, small amount of story points..
mort96 · · focus · HN ↗
For my thoughts about why it's not easy, see this comment: <a href="https://news.ycombinator.com/item?id=49870363">https://news.ycombinator.com/item?id=49870363
cyberpunk · · focus · HN ↗
mort96 · · focus · HN ↗
Now you want to move from github.com to git.example.org. You change libfoo, authservice and apiservice to use git.example.org/whatever/libfoo, that part is just tedious work. But the v1.2.0 tag and v1.3.0 tags of libfoo are old commits from before the move, so they still reference github.com! Now you need to branch off of the v1.2.0 and v1.3.0 tags of libfoo and do the same change there.
So we have only 3 repositories with only 2 dependencies and we already have to do the search/replace 5 times.
Imagine now that apiservice depends on authservice v2.3.7 just to include some type definitions. Authservice is currently on version 2.4.0 but the types haven't changed so apiservice hasn't been upgraded. Now you need to branch off of authservice v2.3.7 too and do the job there. Oh and authservice v2.3.7 depends on libfoo v1.2.5, so now you need to make a branch off of libfoo v1.2.5 with the search/replace.
3 repositories with a straightforward dependency relationship, 7 search/replace jobs.
The numbers get terrifying as you scale this up.
kelnos · · focus · HN ↗
jayd16 · · focus · HN ↗
quacker · · focus · HN ↗
The idea is: the package maintainer pushes a final version of the old package that is a shim, and which has a deprecation notice. The shim imports the new package, and forwards all calls to the new package (and I suppose type aliases and variable aliases as well). The shim includes `//go:fix inline` annotations on all exported symbols, so that when users run `go fix` it rewrites their code to use the new package, by inlining their usages of the old package (which is now simply a shim that references the new package).
Not perfect. There is still a bit of a discoverability problem. Not all tooling warns on deprecated packages/functions (go toolchain doesn't, but gopls and staticcheck do). And users need to know to run `go fix`. But the tooling is there.
1: <a href="https://go.dev/blog/inliner#example-renaming-ioutilreadfile" rel="nofollow">https://go.dev/blog/inliner#example-renaming-ioutilreadfile
Cthulhu_ · · focus · HN ↗
peesem · · focus · HN ↗
"replace example => github.com/example/example" at first, then change to "replace example => gitlab.com/example/example" or similar when there's a migration
(i don't use go, but i hope this is possible and i am confused if it's not)
furyofantares · · focus · HN ↗
awinter-py · · focus · HN ↗
mosselman · · focus · HN ↗
mort96 · · focus · HN ↗
gchamonlive · · focus · HN ↗
Alternatively, could we ourselves build an automatic mirror so there's a redundant supply provider that doesn't depend on a maintainer's choice of git forge
<a href="https://news.ycombinator.com/item?id=49434625">https://news.ycombinator.com/item?id=49434625
Mawr · · focus · HN ↗
gchamonlive · · focus · HN ↗
Meneth · · focus · HN ↗
someonebaggy · · focus · HN ↗
nizarmah · · focus · HN ↗
0xCMP · · focus · HN ↗
p4bl0 · · focus · HN ↗
[1] <a href="https://neil.fraser.name/news/2026/09/03/" rel="nofollow">https://neil.fraser.name/news/2026/09/03/
Groxx · · focus · HN ↗
throwaway894345 · · focus · HN ↗
How many mainstream languages have content addressed imports? I can’t think of any, so I assume I’m misunderstanding your meaning of the term because you seem to be suggesting that it is common and Go is the outlier for lacking it?
Groxx · · focus · HN ↗
Which keeps happening with stuff they rebuild from scratch - an excellent and somewhat unique first showing, far beyond what most first attempts manage, but followed by near-complete stagnation while issues that everyone familiar with the field predicted from miles away pile up.
vips7L · · focus · HN ↗
Groxx · · focus · HN ↗
Groxx · · focus · HN ↗
hnlmorg · · focus · HN ↗
You already can use SHA in go.mod in exactly the same way you would use a version string.
I don’t know about using multiple proxies in go mod though.
Groxx · · focus · HN ↗
ablob · · focus · HN ↗
If github is "taken down" you can't just resolve the whole domain differently, you need to only resolve the packages differently. If your "Golang domain" is taken down, it should be a lot easier to hotfix until something proper is implemented (the quickest and dirtiest would be a hostfile-entry).
alavilli · · focus · HN ↗
[dead]
cyh555 · · focus · HN ↗
hnarn · · focus · HN ↗
It is being retired because very few people use it. It kind of sucks but this is how domains work, it’s not real estate.
dolmen · · focus · HN ↗
Deepcopy [1] is a Go package that is still heavily used despite its creator has disappeared 9 years ago. At least GitHub is a stable and trusted host as a distribution point and communication point for users.
[1]: <a href="https://pkg.go.dev/github.com/mohae/deepcopy" rel="nofollow">https://pkg.go.dev/github.com/mohae/deepcopy
[deleted] · · focus · HN ↗
[deleted]
unscaled · · focus · HN ↗
Then the rest of the article explains why this is NOT a good feature in practice.
I don't think it's unworkable either, but this is one of these little thing that Go decided to do different and convinced its fans that this is a great idea and all the other languages where doing it wrong. After a couple of road bumps appeared, instead of admitting there are some advantages to having official package names, we're now told that everybody should just set up their own custom domain with an nginx server or a Go Vanity URLs forwarder to serve traffic for their GitHub-hosted packages.
12_throw_away · · focus · HN ↗
ambicapter · · focus · HN ↗
> It sounds like you are dealing with a really disappointing or frustrating situation right now. Did Dario cancel plans on you, or is there a bigger context to what's going on?If you want to vent or figure out what to do next, tell me a bit more about:Whether this is a frequent pattern with himHow long you've been waiting or planning thisWhat kind of relationship you have (friend, partner, etc.)
bigwhite · · focus · HN ↗
[dead]
serbuvlad · · focus · HN ↗
Not to be cynical about this but I fail to see how running sed s///g after a very rare event qualifies as a serious problem.
Now, sure, given that the solution is so simple, it's a nice recommendation, but still...
cyberax · · focus · HN ↗
However, Golang saves the hashes of all the modules in `go.sum` files, so we just need to add a way to do content-addressable fetches. This solves the issue of reproducibility for old builds. As long as you can find the module in some repository somewhere, you'll be able to build it.
The next step is supporting module _evolution_. We need a way to declare: "From this point onward, `github.com/company/someproject` is now `company.com/someproject`", so that all the references are to these packages are identical. This is possible on a per-package basis with `replace` directives, but this doesn't scale.
And this is not easy to solve in general (especially in the age of supply-chain attacks). If the initial project cooperates (or if Github can be convinced to help), perhaps at least a part of this can be solved by adding special "redirecting module" support to Go.
st3fan · · focus · HN ↗
It is bad advice to move your packages under your own domain. You will never be as good as Microsoft to keep paying for the domain. There are no guarantees in life but I do guarantee you that when you go out of business, that domain is the last thing you will think about.
epwr · · focus · HN ↗
If I own the domain, I'm likely to continue to owning it until I shut down my company. At which point, no one is likely to be running my code.
Possibly different if I was developing an open source library or something, but either way there's risk and need to be thoughtful of the risk versus impact.
someonebaggy · · focus · HN ↗
MadVikingGod · · focus · HN ↗
You now have many choices on how to proceed, but none of them will include A) being able to build old releases, or B) doing so without making changes to all dependencies.
One choice is go to the leaves, C in our example, and make a release on gitlab. Then go to B, and have B depend on the gitlab C. This is fine for rolling forward, but if you want to roll back you would have to rewrite all of C to use the gitlab url, and find all of the equivalent tags and repush all of them. Also tell your users that any binaries you've released now have new hashes. Then repeat this for every repo. It's not a small task.
drunken_thor · · focus · HN ↗
popcornricecake · · focus · HN ↗
hk1337 · · focus · HN ↗
throwaway894345 · · focus · HN ↗
okanat · · focus · HN ↗
> After spending years doing those FFI dances in both directions, I’ve reached the conclusion that the only good boundary with Go is a network boundary.
It looks like this extends into the package manager too. The only good boundary with Go programs is a socket. The only good boundary with the Go package manager (? if we can say it is one) is a domain and a DNS server (your own or somebody else's in the case of gopkg.in).
[^1]: <a href="https://fasterthanli.me/articles/lies-we-tell-ourselves-to-keep-using-golang#go-is-an-island" rel="nofollow">https://fasterthanli.me/articles/lies-we-tell-ourselves-to-k...
grumpy_coder · · focus · HN ↗
Compiling code shouldn't hit network by default.
okoddcat · · focus · HN ↗
verdverm · · focus · HN ↗
MVS + OCI is the gold standard imo
blackjpi · · focus · HN ↗
globular-toast · · focus · HN ↗
ArgumentMoney81 · · focus · HN ↗
[dead]
nirui · · focus · HN ↗
Unless of course, it's special domains such as .onion, which is generated in such way (cryptographic keys) no other people can easily obtain control even after the domain is no longer maintained.
If you really don't want to use GitHub, an alternative is just use .internal suffix (i.e. yourproject.internal/project) in combination with `replace` directives in go.mod.
nicce · · focus · HN ↗
The post is about commercial software. If enterprise’s domain is not credible enough, then there are bigger problems.
nirui · · focus · HN ↗
Well, I too dislikes their enterprise tune, "Changing is consistent, GitHub give you advantage (over other companies)" blahblahblah. Many developers I know are on GitHub because it was/is the place for individual developers to share code, not because the "company advantages".
HOWEVER, I can't ignore the fact that individual developers just can't pay enough to keep the machine running, so it's reasonable for GitHub to pivot towards commercial market. On the other side, GitHub is still benevolent enough to provide some enterprise-class service back to freetier users. This arrangement checks out for me so far.
I do self-host some of my projects too with Gitea. But I never dare to use my domain in my Go packages, due to long-term security concerns.
When I initialize my projects, I just use .internal domain, then if I decided to upload the project to GitHub, I'll change the URL to GitHub to make it more convenient to the users. Otherwise, manual download and `replace` directive like I suggested.
imhoguy · · focus · HN ↗
We should lean towards IPNS (Name Seever part of IPFS) or some distribited ledger.
lewo · · focus · HN ↗
This is something Nix and Guix are trying to achieve: by default, they fetch source code from the original endpoint, but if it doesn't respond anymore, they would query the Software Heritage archive [1].
Because go mod doesn't use SHA, it makes things a bit more complicated but Nix/Guix encountered the same issue and there are some mechanisms to workaround this issue.
[1] <a href="https://www.softwareheritage.org/2025/05/21/software-heritage-guix-deployment/" rel="nofollow">https://www.softwareheritage.org/2025/05/21/software-heritag...
silverwind · · focus · HN ↗
GnosiWorks · · focus · HN ↗
[dead]
tugback · · focus · HN ↗
pidgeon_lover · · focus · HN ↗
Leave the Go code or Linux distro to link-rot for a couple decades and all imports like this will be dead or serving malware, leaving the software unusable.
PunchyHamster · · focus · HN ↗
alexfortin · · focus · HN ↗
<a href="https://a.l3x.in/blog/vanity-go-import/" rel="nofollow">https://a.l3x.in/blog/vanity-go-import/
deanc · · focus · HN ↗
dirkc · · focus · HN ↗
motbus3 · · focus · HN ↗
shieldagent · · focus · HN ↗
farthest · · focus · HN ↗
rot256 · · focus · HN ↗
jerf · · focus · HN ↗
In this terminology, the article basically amounts to saying "This namespace can fail! The solution is, use another!"
But that doesn't get you anywhere, because the new namespace can fail too. In fact it is almost certain that it will fail sooner than "github.com's DNS and hosting" as a namespace.
There is no solution where you tie your software release to a namespace that can't fail because there is no namespace that can't fail. It doesn't matter if your favorite language uses DNS or has a centrally blessed repository or if it distributes a blessed list of package names with the language itself or anything else. The namespace can fail.
Therefore, the only thing you can really do is be resilient against failures, and in a lot of ways, the only practical solution to resilience is just to assume that if, in the future, someone has problems getting a package due to a namespace failure, they will not helplessly disintegrate into a puddle of tears while your code is lost forever, but that the future person will instead solve this perfectly solvable problem.
mfro · · focus · HN ↗
jerf · · focus · HN ↗
mfro · · focus · HN ↗
bloppe · · focus · HN ↗
dcreager · · focus · HN ↗
LoganDark · · focus · HN ↗
sanskritical · · focus · HN ↗
throwawayffffas · · focus · HN ↗
cjs_ac · · focus · HN ↗
bloppe · · focus · HN ↗
sleepybrett · · focus · HN ↗
throwawayffffas · · focus · HN ↗
> it will fail sooner than "github.com's DNS and hosting"
When it does fail you can fix it. When github fails all you can do is stare at their status page.
Cthulhu_ · · focus · HN ↗
pulkitbanta · · focus · HN ↗
abhirajabhi312 · · focus · HN ↗
"This namespace can fail! The solution is, use another!" while i agree with this but setting up different namespace just because you want to avoid vendor-lock , we need to think from maintainer's perspective as thi would introduces frictions and so are of the most open-source maintainers willing to take it or not?
maxdo · · focus · HN ↗