Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
What do you mean, just use a huge mono repo for your entire billion dollar company, very good practice
-
Yup.
Read the fuckimg manual.
in short: you can graph the dependencies using the command line. Then you can grep across the project to find where you used the pkg you want removed. then remove it, and tidy the thing. -
@magicMirror
I tried that. go clean -i <path just as I use it in the file> dosent work. Maybe I'm just to stupid for this high level stuff. -
@ExtremNerd eh...
no?
you use "go mod graph" or "go mod why"
to understand why a lib is used. It will help you locate where the lib is used. Hint - it might be a another lib you are using. Then you refactor the problem code areas to remove the dependency. only when done, you run "go mod tidy" to update the go.mod file.
GL! -
@magicMirror
That was the best I could find.
Tanks for the hint, seems reasonable to look into the dependency usage.
My last take was to use the replace option on the cli. It's really hard to find useful information.
Thanks, I'll give it a shot. -
@ExtremNerd
Meh.
You can also use a replace directive in the go.mod, and watch the project break when you compile.
The info is on SO, and the official godocs - but.... you need to ask the right question to find it, as this topic is advanced.
Also - go libs with c-bindings, and runtime panic for 1.18 upgrade were lots'o'fun.
Related Rants
What the fuck is the "package management" of Golang.
It is impossible to delete a fucking dependency and why do I have to do that shit in the first place, I just want to use a fucking fork of my own. It's hilarious.
rant
idiotic
dependencies
golang