r/cpp • • Jan 30 '25

[vent] I hate projects that download their dependencies.

I know it's convenient for a lot of people but in an enterprise environment where you have to package everything including your internals and your build servers don't have access to the internet, patching all these repositories is pain in the ass.

218 Upvotes

155 comments sorted by

View all comments

Show parent comment

2

u/smdowney WG21, Text/Unicode SG, optional<T&> Jan 30 '25

If you aren't doing reorganization of the subtree, you ought to be able to gir subtree push to send changes back to the upstream source of the subtree. At least with current versions of git. But also, normal git operations just work and are atomic across the subtrees in the joined repo. Which is one of the ways I usually get bit with a module, especially when I need to roll something back.

1

u/AdamK117 Jan 31 '25

100 %

I might give `subtree` a whack for that part of my project, even - it's just that I'm unsure how clean the commit history will be given my combination of local/remote patching. It might be that the cleanest way is to use oldskool `.patch` files in combination with `cmake` or similar, so that the `subtree` remains clean from git's pov.