Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tool to move headers under include/bout and fix #includes #2568

Merged
merged 10 commits into from
Feb 3, 2023

Conversation

ZedThree
Copy link
Member

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 ZedThree added this to the BOUT-5.0 milestone Jul 29, 2022
@bendudson bendudson mentioned this pull request Jan 7, 2023
38 tasks
@ZedThree ZedThree changed the base branch from next to v5.0.0-rc February 1, 2023 16:42
@bendudson
Copy link
Contributor

Trouble running ./bin/bout-v5-header-upgrader.py here: The regex doesn't seem to match most #include lines that need changing. This is on a Mac, will try under Linux...

@bendudson bendudson marked this pull request as ready for review February 2, 2023 16:31
@ZedThree
Copy link
Member Author

ZedThree commented Feb 2, 2023

Turns out there's a few other files that need the paths updating. Fix incoming.

@bendudson bendudson merged commit 9f58c92 into v5.0.0-rc Feb 3, 2023
@bendudson bendudson deleted the update-headers branch February 3, 2023 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants