FEniCS / dolfinx

Next generation FEniCS problem solving environment
https://fenicsproject.org
GNU Lesser General Public License v3.0
731 stars 177 forks source link

Add basix, ffcx, ufl as git submodules #2418

Closed massimiliano-leoni closed 1 year ago

massimiliano-leoni commented 1 year ago

I was recently in the situation of having to revert my code to its status a few months ago and run it. That meant reverting the dolfinx repository too and basix, ffcx and ufl alongside with it. Since the APIs of these dependencies change quickly, it is sometimes tricky to identify which revision of each of them will work with a given revision of dolfinx. This could be easily fixed by adding these dependencies as git submodules to the dolfinx repository. This would automatically keep track of their current commit, for example, when a new commit is pushed to dolfinx/main. A user could then automagically checkout the correct revision for all dependencies simply by doing

git checkout <checksum>
git submodule update --init --recursive
jhale commented 1 year ago

Full disclosure, I'm not a big fan of submodules (clunky and non-intuitive).

Having said that, I still think this is unnecessary:

  1. The main branches (almost) always works together on any given date, as it is enforced by our Pull Request/CI system. You can use git to automatically checkout a version on a particular date, e.g.
git checkout `git rev-list -n 1 --before="2022-10-20 00:00" main`
  1. No one is stopping you from storing a set of working FEniCSx commits as submodules in your own repository.
garth-wells commented 1 year ago

I'm to close this because we've visited it before and decided that the complications outweighed any benefits.

We're making releases reasonably frequently now, and most users should use a release version.