-
Notifications
You must be signed in to change notification settings - Fork 532
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
Update clang-format to 16.0.1. #5361
Conversation
@dantegd I think this just needs reviews, then should be good to merge. (Merging sooner means less likelihood of conflicts.) |
Actually, I take that back -- this isn't ready to merge. I am not sure if the clang-format script is working as intended on this repo. We saw minor changes for most other RAPIDS repos but the hook did not appear to make any changes in cuML. cuML is the one RAPIDS repository that isn't using pre-commit in the same way as other RAPIDS projects, and still relies on a custom Python script for the hook rather than the semi-official After all the other RAPIDS clang-format updates are merged, I will come back to this one and standardize it to match the rest of RAPIDS. |
I don't think there is a strong motivation for the custom hook at least that I know of. Did you try to just use the semi-official hook instead? Also, we should probably coordinate this effort with #5235 , right? @bdice Maybe revert this PR back to draft status until it is ready? |
@csadorf This should be totally independent of #5235 because we use pre-commit. The clang-format binary that is installed by pre-commit (into its own virtual environment) is unrelated to the CI job using clang-tidy. I reverted to a draft for now. I will attempt to migrate this repo to use the same pre-commit hook as the rest of RAPIDS, then re-open if that works. |
Using the same pre-commit hook as the rest of RAPIDS appears to have worked -- but it's possible that clang-format hasn't been applied for a while, so the changeset is large. I'll reopen for review. |
cpp/scripts/run-clang-format.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script is not used by pre-commit any more. May we remove this file in favor of pre-commit's own logic for running clang-format? It would only matter if developers still want to use this script locally instead of running pre-commit locally (which I recommend, since it matches the CI outputs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's remove it, I don't think there's much of a case for using it instead of pre-commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. I removed it. This is now ready for merge @dantegd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the changes to the pre-commit config and associated docs, as well as the header file under python/ – LGTM.
Thanks a lot!
Discussed offline. Because clang-format is managed through pre-commit and clang-tidy is managed through some other means (conda or system), matching versions is not necessary. |
This PR updates the clang-format version used by pre-commit.