IAP GITLAB

Skip to content

Move third party dependencies into git submodules

Remy Prechelt requested to merge rprechelt-git-submodules into master

This MR moves LCov, Catch2, Eigen, and Pythia into shallow git submodules (as opposed to storing the sources directly in the main trunk). This has several advantages:

  1. As the number of third party dependencies we have grows, and we accumulate newer versions of the same dependencies, the size of our repo history (and correspondingly, the clone time) grows if the sources are stored in the C8 repo. By moving these dependencies into submodules that are shallow-cloned, we can avoid many of these issues. We don't inflate our repo size and updating to new versions of our deps is an immediate one-line git checkout command (and only adds a few bytes to the history!)
  2. Using submodules also makes our dependencies referentially transparent - it is immediately clear what exact commit of the dependency we are using and that the dependency is unaltered. (For example, despite phys/units being in the ThirdParty directory, we are actually using a patched version of the library - which was not clear to me, a newcomer to C8, without inspecting the git log). A one-line git command in any of the submodules gives the exact commit in use and whether any changes have been made.

Comments requested! Perhaps this isn't the direction that we want to take (so treat this as a discussion starter).

Tagging the PROPOSAL MR (!169 (closed)) since PROPOSAL could also be included as a git submodule.

Edited by Remy Prechelt

Merge request reports