2 ms·
I’ve used submodules (a lot), in the past, but I hate them. I feel as if they are a “half-baked” solution. In order to be useful, they’d need to be much more t
by ChrisMarshallNY 4y ago
I’ve used submodules (a lot), in the past, but I hate them.
I feel as if they are a “half-baked” solution. In order to be useful, they’d need to be much more tightly integrated into Git. Instead, they are sort of “duct taped” to the outside.
But they are an ironclad way to ensure that you have an exact version of a foreign repo. It’s actually a pain stay at the head.
I like using package managers, but they can be quite dangerous, so I tend to write my own packages.
What was really cool, and possibly the only good thing that VSS ever did, was the ability to create “aggregate symbolic repos.” I think I remember how it worked (been a long time):
You could define a repo that was composed of “symlinks” to files from various other repos. Submitting a change into the repo would submit that change into the portion of the other repo.
Perforce had the concept of workspaces. I don’t think you could integrate other repos into them, but you could define a workspace to be a “mask” over your repo, so it would only integrate the files you want. That could be useful to me, as my testing code usually dwarfs my implementation code. Many of my packages[0] consist of a single Swift file, but the test harness might be an entire app.
[0] https://github.com/RiftValleySoftware https://github.com/RiftValleySoftware
- michaelmior 4y ago> I like using package managers, but they can be quite dangerous I'm curious to hear what you think is dangerous about package managers. I'm assuming you're referring to left-pad and similar situations.
- ChrisMarshallNY 4y agoIt's because it's possible to obfuscate the provenance of some packages. You can do the same thing with submodules, but it's more difficult. Like I said, I'm a control freak. Packages are fine, as long as they're mine.
- michaelmior 4y agoI'm curious what you mean about obfuscating provenance. Most package managers download the package from a specific source and will allow you to store the hash of that package in your repository.
- ChrisMarshallNY 4y agoThe whole deal with packages, is to make it really, really easy to discover and integrate them, without having to worry about where they came from, or who has had their fingers in the pie. It's [theoretically] possible to find out, but I have never met anyone that admits to vetting their dependencies in anything near complete fashion. Most look at "buzz" around the package, and at how many stars it has. That's wonderful. So is going out clubbing, and "getting to know" a whole bunch of different folks that you meet randomly. Both can have unfortunate side effects. It's entirely possible to do so safely, but Christian coffeehouses might not be your idea of a good time on Saturday night. But nothing is perfect, and a dedicated blackhat can leverage just about anything.