-
Notifications
You must be signed in to change notification settings - Fork 560
[GLUTEN-11287][VL] Use IWYU tool to check code format #11287
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
base: main
Are you sure you want to change the base?
Conversation
d4c97f3 to
6e2680a
Compare
.github/workflows/iwyu.yml
Outdated
| rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco | ||
| wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm | ||
| rpm -Uvh wandisco-git-release-7-2.noarch.rpm | ||
| yum install -y git |
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.
You can just add source /opt/rh/rh-git227/enable to make git 2.27 used.
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.
ok
a51b2eb to
4ac46bc
Compare
.github/workflows/iwyu.yml
Outdated
| yum install -y llvm15 llvm15-devel clang15 lld15 | ||
| clang15 --version | ||
| mkdir -p /work/.ccache | ||
| bash dev/ci-velox-buildstatic-centos-7-with-clang.sh |
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.
Do we need to build a new binary? can we reuse existing workflow and add the check there?
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.
@xinghuayu007 it seems we could use below GHA to check IWYU?
https://github.com/marketplace/actions/include-what-you-use-github-action
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.
@xinghuayu007 it seems we could use below GHA to check IWYU? https://github.com/marketplace/actions/include-what-you-use-github-action
Thanks for your comments. I try to use GHA to check IWYU.
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.
Do we need to build a new gluten binary here? can we add to
| build-native-lib-centos-7: |
you may change dev/ci-velox-buildstatic-centos-7.sh as clang build
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.
ok
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.
@xinghuayu007 it seems we could use below GHA to check IWYU? https://github.com/marketplace/actions/include-what-you-use-github-action
I found this GHA can't only check modified files, it checks all the files which costs a lot of time.
1884480 to
ba200ee
Compare
67713da to
4cbd339
Compare
PHILO-HE
left a comment
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.
Can we enable IWYU in a way embed in cmake? We can enable the check only when code changes are made under cpp/ path.
if(ENABLE_IWYU)
find_program(IWYU_PATH NAMES include-what-you-use iwyu)
if(IWYU_PATH)
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_PATH})
endif()
endif()
6d5c423 to
9596758
Compare
9596758 to
adbf458
Compare
Compiling include-what-you-use needs clang and source code. Currently design can ensure only check modified cpp files. |
What changes are proposed in this pull request?
Use IWYU tool to check code format
How was this patch tested?
Related issue: #11287