You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the C++ include files in the RAPIDS codebase are not consistently ordered and grouped.
Inconsistent ordering makes it harder to maintain the codebase, to understand the dependencies,
and to automate changes.
Using clang-format to automate the ordering and grouping of include files will not only add
consistent style, but it will ease automation of changes. For example, We are undertaking a
refactoring of RMM that will replace rmm::mr::device_memory_resource* with rmm::device_async_resource-ref everywhere in RAPIDS (not just cuDF). This requires adding an
include to MANY files across multiple RAPIDS repos. Getting the location of this include correct
everywhere is very difficult without automatic grouping of headers.
I propose to use clang-format's IncludeCategories settings to automate the ordering and
grouping of include files in the C++ codebase consistently.
Proof-of-concept PRs have been created for RMM and cuDF:
…1349)
This uses the IncludeCategories settings in .clang-format to attempt to enforce our documented #include order in libcuspatial. For discussion, see rapidsai/cudf#15063. This PR uses a subset of the header grouping categories used in that PR.
Note that this also updates the pre-commit configuration to check and correct file copyright years. This comes from rapidsai/cudf#14917. @KyleFromNVIDIA can you confirm whether or not it's OK to do this? It seems to be working fine.
Closes#1345
Authors:
- Mark Harris (https://github.com/harrism)
Approvers:
- Michael Wang (https://github.com/isVoid)
URL: #1349
Currently the C++ include files in the RAPIDS codebase are not consistently ordered and grouped.
Inconsistent ordering makes it harder to maintain the codebase, to understand the dependencies,
and to automate changes.
Using clang-format to automate the ordering and grouping of include files will not only add
consistent style, but it will ease automation of changes. For example, We are undertaking a
refactoring of RMM that will replace
rmm::mr::device_memory_resource*
withrmm::device_async_resource-ref
everywhere in RAPIDS (not just cuDF). This requires adding aninclude to MANY files across multiple RAPIDS repos. Getting the location of this include correct
everywhere is very difficult without automatic grouping of headers.
I propose to use clang-format's
IncludeCategories
settings to automate the ordering andgrouping of include files in the C++ codebase consistently.
Proof-of-concept PRs have been created for RMM and cuDF:
The ordering used for cuDF is given by the following settings.
The text was updated successfully, but these errors were encountered: