![]() ![]() Git has been adding more config settings to try to make it less painful, such as submodule.recurse, but that slows down most git-command significantly and the truth is most repos don't actually need to recurse - they just need the top level. And they're still second-class citizens for git commands. They're better now than they were years ago, but yes they're still bad. If you need source code from a 3rd party library that you won't modify but you depend on, a submodule is a fine tool for the job. ![]() Use the correct tool for the job at hand. You would say something like, you're using the wrong tool, here's a saw. In the same way, you wouldn't tell people who use a hammer to cut a piece of wood in half that the hammer must be a terrible tool. If this suggestion here doesn't sound like your use case, then your probably using the wrong tool. For example, an embedded Linux distribution’s source tree would include every piece of software in the distribution with some local modifications a movie player might need to build against a specific, known-working version of a decompression library several independent programs might all share the same build scripts. > Large projects are often composed of smaller, self-contained modules. Git submodules is extremely helpful here, and if you look at the documentation this is what it sounds like it was created for: This basically implies either creating a package manager, or distributing binaries manually, or forcing users to find the correct versions manually and install them. So giving a blanket statement and saying that you should just ship library artifacts is a non starter in a language like C++. There is no such thing as package management in C++ (at least no unified standard that you can use with confidence with every library). > Please, if there is any dependency management in your chosen platform use it. > I know some programming ecosystems, such as C++ does not have a default way of handling libraries and dependencies, and in that case it might be good to look into submodules. being intentional about when you pull in changes this seems like a supply chain issue to me. ![]() And it's not clear to me whether their sync pattern is going to be OK for external third-party dependencies, unless you want to actually track their changes automatically vs. I don't know how common the submodule pattern is to compose a monorepo like they've demonstrated, not in an 'enterprise' setting they hint at future pricing for, anyway. I don't think it's a bad product, but I wonder what problems it actually solves. Personally, I'm not interested in this at all. It doesn't look like adding an X-module would be subject to code review. It's not clear what the auth story is around who can make these changes. ![]() There's a command-line client, but it's listed as unsupported on their website. X-modules require an extra application to manage the repo relationships. If you want to pin an external dependency, it's not clear that you can do that with an X-module (the screencast doesn't show it, I don't think). With X-modules, you are tracking a branch, not a revision. If you are looking at submodules to manage repo size, this solution is not for you. With X-modules, you have all the code in your repo, vs. This 'solves' the submodule problem by just copying everything, as far as I can tell. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |