Hacker News new | ask | show | jobs
by 60secz 1449 days ago
In every respect, versioned libraries are far superior to submodules.

Every time I've encountered submodules in any work projects, I've personally replaced them with auto-incremented semver libraries (usually jars) and received copious thanks for it.

2 comments

When I see this done, it ends up causing headaches as well. You now have to deal with a second authentication flow that is usually a lot more opaque. I work in games with less technical people such as artists. Bootstrapping their workspace is an effort. "Setup your maven credentials" might as well be ancient latin.

Submodules aren't ideal but I do prefer that you can pull down everything you need in a one liner instead of multi-stage pull, build, auth, download, build etc.

So I wouldn't say its better in every respect.

In most aspects submodules are far superior to bad versioning. I understand the Amazon workflow, but never found a company were it worked properly.

In my current job, which uses semver and conan and not submodules, submodules would have solved most of the problems. But unfortunately they are all git newbies (switching from svn just lately), so you cannot throw submodules at them yet.