Properly handle header file sorting in public_header.py #19
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TOPIO/BigWhoop#19
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently the public_header.py script will iterate through the header files according to the output of the os and os.path functions (see line 94). This could lead to problems with the logical order of data types and function calls in the public header file. A logical structure for the iteration of the header files should be implemented to circumvent this problem.
We should define the logical order of all header files in the public_header.py script and check if that definition includes all header files that are present in the private folder. If the a file is missing the compilation process should print an error and gracefully quit so the developer is aware of the issue and rectify the problem.
The fix sets a hardcoded
header_files
list based on the logical order of coding and appends header files that can be found withos.listdir()
. Hence, it assumes that appended header files (i.e. the contained declarations) are at the end of the logical hierarchy.What do you mean by "If a file is missing, the compilation process should print an error ..."? Since the original problem occurred when
bwc.h
was included in other projects, this might be something to check in regression/unit tests.Properly handly header file sorting in public_header.pyto Properly handle header file sorting in public_header.pypull request #27