Properly handle header file sorting in public_header.py #19

Closed
opened 2024-04-09 08:33:38 +00:00 by Patrick Vogler · 3 comments

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.

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.
Patrick Vogler self-assigned this 2024-04-09 08:33:38 +00:00
Gregor Weiss was assigned by Patrick Vogler 2024-04-09 08:33:38 +00:00
Patrick Vogler added this to the Interfaces project 2024-04-09 08:33:38 +00:00
Author
Owner

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.

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.
Patrick Vogler removed their assignment 2024-04-09 10:20:26 +00:00
Gregor Weiss was unassigned by Patrick Vogler 2024-04-09 10:20:26 +00:00
Gregor Weiss self-assigned this 2024-04-12 08:36:10 +00:00
Gregor Weiss added reference fix-public-header-creation 2024-04-12 10:20:53 +00:00
Collaborator

The fix sets a hardcoded header_files list based on the logical order of coding and appends header files that can be found with os.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.

The fix sets a hardcoded `header_files` list based on the logical order of coding and appends header files that can be found with `os.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.
Gregor Weiss changed title from Properly handly header file sorting in public_header.py to Properly handle header file sorting in public_header.py 2024-04-12 10:44:53 +00:00
Collaborator

pull request #27

pull request #27
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TOPIO/BigWhoop#19
No description provided.