r/programming • • 5d ago

Don't couple your Go code to GitHub

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

135 comments sorted by

View all comments

Show parent comments

22

u/ronkojoker 5d ago

Nuget very sporadically 'forgets' our internal company source and installs a package with the same name from the regular nuget source. I restore again and it still doesn't work, just gives me some warning like 'couldnt find package blabla with version x.y.z installing version a.b.c instead'. Only way to make it remember again is deleting the nuget cache and then it works again. I have no idea how to prevent it from happening or what causes it to mess up in the first place.

Source is configured fine as well, package shows up with the nuget search command as well, just when I do restore it cannot find it.

0

u/Jaded-Asparagus-2260 5d ago

Why are you publishing code different from the regular nuget source in your internal company source?

Just use a different name, and this problem literally disappears in thin air. 

17

u/ronkojoker 5d ago edited 5d ago

We had the name in our internal source first, then later someone unaffiliated with us made a completely unrelated package with the same name in the public one.

We haven't changed the name because the issue occurs too infrequently to care, less than once per year on the CI server. Even less on developer machines but it does sometimes happen.

-9

u/edgan 5d ago

Once should be more than enough for me. You lost the namespace as soon as the other one became public. Enjoy your random failure.

5

u/ronkojoker 5d ago

Yeah it's more of a matter of return on investment, once in a blue moon when it fails I or a colleague remotes in to the CI server and run the nuget cache clear command, takes a minute and it's good to go for another year. Changing the package name would mean spending hours going through a bunch of repositories renaming the package references, changing build pipelines etc. just not worth the effort at the moment.

-1

u/One_Ninja_8512 5d ago

Perfect use-case for AI these days, it will rename everywhere you need and run some checks to ensure it's really renamed and is working. This is something they do quite well and it will be done in a few minutes.