r/cpp • • Sep 14 '23

Which package manager are you using?

It's 2023 and you should be using a package manager. Which one?

Sep 17 '23
466 conan
625 vcpkg
29 spack
82 CPM
1730 No package manager :(
248 Other (please specify)
38 Upvotes

187 comments sorted by

View all comments

83

u/Artikash Sep 14 '23

Does git submodule count as a package manager?

9

u/target-san Sep 14 '23

Nope. Try some nontrivial task like merging two branches, each changing one submodule's commit to its own

4

u/Jonny_H Sep 15 '23

Wouldn't you have exactly the same if merging branches that both changed a package manager version lock to different values? You just gotta choose which you want (if either) on merge.

2

u/target-san Sep 15 '23

The problem isn't in choosing specific version. The problem lies in imposing that specific version. With PM's lockfile, you just choose file contents. With submodule you'll need to bang your head against uncooperative git index directly. Last time I tried to resolve submodule conflict I simply failed bc even after editing index rebaser complained about tree conflict, yet showing none in status or diff.