39
submitted 2 days ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 7 points 2 days ago

Just to jump in here, git submodules and similar are a terrible design pattern that needs killed, not expanded. Create a library properly and stop cutting corners that will bite you in the ass.

Three seperate companies wanting to do it the lazy, wrong way doesn't suddenly make it a good idea.

[-] [email protected] 4 points 2 days ago* (last edited 1 day ago)

Libraries are not always a suitable solution. You just haven't worked on the same projects I have and you can't imagine all the things submodules are used for.

On top of that, I can't force all third party projects to turn their repos into nice easily installable packages. Especially if they're using a language that doesn't have a package manager.

[-] [email protected] 1 points 1 day ago

I think the point the user was making is that, if it isn’t already distributed as a library, you can just fork it and deploy it as a library artifact to your company’s internal artifact repository. You shouldn’t be pulling an external project as a submodule, that’s just coupling yourself way way too tightly to external code. So you turn that code internal and into a library.

[-] [email protected] 1 points 1 day ago

You shouldn’t be pulling an external project as a submodule, that’s just coupling yourself way way too tightly to external code.

You're no more tightly coupled than if you zip that repo up, and put it on an internal server. It's the exact same code you've just changed the distribution method.

And my whole point is that wouldn't be necessary if Git had a version of submodules that worked properly!

You guys seriously lack imagination.

[-] [email protected] 0 points 11 hours ago

I mean you are more tightly coupled. It’s way more likely that someone is going to pull the git submodule (especially if you’re doing this with multiple projects) than the someone updating the version of the library inadvertently. This applies even more if you’ve created the library and deployed it to your own artifactory yourself.

load more comments (1 replies)
this post was submitted on 04 Jul 2025
39 points (88.2% liked)

Programming

21400 readers
45 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS