BOUT-dev icon indicating copy to clipboard operation
BOUT-dev copied to clipboard

Add tool to move headers under `include/bout` and fix `#include`s

Open ZedThree opened this issue 3 years ago • 0 comments

Replaces similar bash tool, but tries to preserve history by first moving headers into a single commit, then adding compatibility shim headers (that issue a #warning and #include the new location) in a second commit. Also when updating #includes, it prints a diff of the changes, to allow the user to review before applying (just in case something goes wrong!).

Should be essentially last PR into 5.0 to avoid massive conflicts.

To apply, run in two steps:

  1. ./bin/bout-v5-header-upgrader.py --files $(find . -type f -name "*.[hc]xx") to make sure all the #includes point to the new location
  2. ./bin/bout-v5-header-upgrader.py --move-deprecated-headers to do the actual moving

The first command can then be used to fix user code and models. The second command should only need to be run once, ever.

ZedThree avatar Jul 29 '22 08:07 ZedThree