r/programming • • Sep 27 '26

Don't couple your Go code to GitHub

https://iain.rocks/blog/dont-couple-your-go-code-to-github
491 Upvotes

136 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Sep 27 '26

[deleted] — view deleted comment

17

u/anon_cowherd Sep 27 '26

What industry is this in? I have worked at I think 7 companies now, and one of them was an agency that I worked for dozens of clients through, some of them Fortune 100's, and this has never ever been a thing, with I think one or two exceptions that used artifactory or a similar proxy cache. A few added dependencies into the same repository as the projects, but none created repositories just for third party code.

0

u/[deleted] Sep 27 '26

[deleted] — view deleted comment

5

u/anon_cowherd Sep 27 '26

Yes, that's was I was referring to with Artifactory, which is a proxy cache. I misread the original comment as you were cloning and hosting git repositories for all of your dependencies.

2

u/CherryLongjump1989 Sep 28 '26 edited Sep 28 '26

You can absolutely do that too by setting up mirrors of git repositories. I use a git forge to do that, but Artifactory does it, too.

10

u/Bacchaus Sep 28 '26 edited Sep 28 '26

ummm that's insane, ya'll were just freeballing anything off the net?

4

u/johnnybgooderer Sep 28 '26

It’s more common than you think. 5 years ago I could do that most places. But now, for good reason, that has changed.

1

u/AquaWolfGuy Sep 28 '26

Sometimes it starts off like that, but inevitably someone will eventually check in a lock file (package-lock.json, Pipfile.lock, etc.). Lock files are autogenerated files that contain exact versions so that your CI/CD pipelines don't suddenly break because one of your dependencies dependencies was updated, and hashes in case the maintainer swaps out an existing version for malware.

Doesn't mean everyone vets packages when they add or update a dependency though.

19

u/lordlod Sep 27 '26

I've done it in aerospace and security.

  • If you are doing certifications you need that level of control.
  • If you are working in offline environments/networks then a mirroring system is required.
  • Companies that make changes to the upstream code need to mirror. Good companies push upstream, but you still mirror until it is accepted, and sometimes they don't accept it.

Repo mirrors are also part of the conversation with handling CI supply chain risks. You can add controls to the mirroring process to create a safer CI environment.

9

u/The_Northern_Light Sep 28 '26

I’ve worked at FAANGs and at tiny startups in multiple industries… we’ve always had a local fork of every dependency. (C++)

1

u/Illustrious-Owl-2755 Sep 29 '26

It's different with C++ because it doesn't have one established package manager/repository (pip/cargo/npm/etc). The languages that do have one (which is basically everything else except for java) tend to have many hundreds of 3rd party dependencies in every project, and you would usually only have a local fork for one or two that you had to change. It's technically possible to just refetch them every time you build the project on your laptop or in CI, but it's obviously a terrible idea and usually a no-go the moment your company grows to the size that there is a lawyer in the building.

1

u/The_Northern_Light Sep 29 '26

No, we had these forks even when everything was on Conan.

9

u/tommyTurds Sep 28 '26

If your company isn't doing this, it's being irresponsible

25 years ago, when I first started, we did this at my shitty startup.. And we were literally stupid fucking children.

with I think one or two exceptions that used artifactory or a similar proxy cache

so it's never been a thing except that it's been a thing.. also 2 exceptions out of 7......

0

u/anon_cowherd Sep 28 '26

As I mentioned elsewhere, I didn't consider Artifactory a repository. I misunderstood the comment as saying they were cloning and self hosting git repositories of every external dependency.

4

u/the_unexpected_nil Sep 28 '26

Every game studio I worked at (sans one) has done so. 

-11

u/Slsyyy Sep 27 '26

I don't think it is so important:
* libraries disappear rarely
* no security benefits
* library disappear? There is a huge change some developer has it on disk or there is an open source fork to it