-
Notifications
You must be signed in to change notification settings - Fork 75
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
use specific commit of amalgamate for single-header branch #2437
use specific commit of amalgamate for single-header branch #2437
Conversation
There are some files which has #include directive inside #ifdef directive like the file
|
@mehmetyusufoglu Do you know, why it is not working anymore? I checked the next commit and it is only adding test cases. Therefore it should also work. In general it is better to find out what was changed in the |
The error is introduced by a904e3255cf05a92d32036e636e21378a2681071, the second after the one i used to go back to solve the problem. It is quite long. I am trying to understand what is the reason introduced by this commit. |
I was already in fear that this PR introduced the problem :-( |
Ok, they restricted the #included file name search and file paths which includes "_" can not be detected. Hence #include file path which consists "_" can not found.
|
632fb95
to
8430f8b
Compare
Looks good. I think we can merge after PR #2442 which fixes the CI. |
If it is ready someone can merge [ I am on vacation during 6-10 January] |
#include "alpaka/workdiv/WorkDivHelpers.hpp" | ||
#include "alpaka/workdiv/WorkDivMembers.hpp" | ||
|
||
#include <stdexcept> | ||
#include <tuple> | ||
#include <type_traits> | ||
|
||
#include "alpaka/queue/cuda-hip/QueueUniformCudaHipRt.hpp" |
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.
why move this here instead of staying above with the other alpaka headers ?
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.
clang-format-16 changed it.
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.
clang-format-16 changed it.
Because there is a bug in the regular expressions used in .clang-format
:
diff --git a/.clang-format b/.clang-format
index acd9fbd3b37..dccbb183c20 100644
--- a/.clang-format
+++ b/.clang-format
@@ -135,20 +135,20 @@ UseTab: Never
#IfMacros: []
IncludeCategories:
# Local headers (in "") above all else
- - Regex: '"([A-Za-z0-9.\/-_])+"'
+ - Regex: '"([A-Za-z0-9.\/_-])+"'
Priority: 1
# "alpaka/foo.hpp" after local headers (occur inside alpaka)
- - Regex: '"alpaka/([A-Za-z0-9.\/-_])+"'
+ - Regex: '"alpaka/([A-Za-z0-9.\/_-])+"'
Priority: 2
# <alpaka/foo.hpp> after local headers (occur outside alpaka in examples and test)
- - Regex: '<alpaka/([A-Za-z0-9.\/-_])+>'
+ - Regex: '<alpaka/([A-Za-z0-9.\/_-])+>'
Priority: 3
# C++ standard library headers are the last group to be included
- - Regex: '<([A-Za-z0-9\/-_])+>'
+ - Regex: '<([A-Za-z0-9\/_-])+>'
Priority: 5
# Includes that made it this far are third-party headers and will be placed
# below alpaka's includes
- - Regex: '<([A-Za-z0-9.\/-_])+>'
+ - Regex: '<([A-Za-z0-9.\/_-])+>'
Priority: 4
# Macros: []
# NamespaceMacros: []
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 I see, thanks. This is not deliberate a bug as you said. "-" should be escaped otherwise it is a Range defining character.
Corrected by escaping "-" and putting it to the end of the regex. ( escaping "/" is not needed removed)
- - Regex: '"([A-Za-z0-9.\/-_])+"'
+ - Regex: '"([A-Za-z0-9./_\-])+"'
Priority: 1
- # "alpaka/foo.hpp" after local headers (occur inside alpaka)
- - Regex: '"alpaka/([A-Za-z0-9.\/-_])+"'
+ # "alpaka/foo.hpp" after local headers (occur inside alpaka)
+ - Regex: '"alpaka/([A-Za-z0-9./_\-])+"'
Priority: 2
# <alpaka/foo.hpp> after local headers (occur outside alpaka in examples and test)
- - Regex: '<alpaka/([A-Za-z0-9.\/-_])+>'
+ - Regex: '<alpaka/([A-Za-z0-9./_\-])+>'
Priority: 3
# C++ standard library headers are the last group to be included
- - Regex: '<([A-Za-z0-9\/-_])+>'
+ - Regex: '<([A-Za-z0-9/_\-])+>'
Priority: 5
# Includes that made it this far are third-party headers and will be placed
- # below alpaka's includes
- - Regex: '<([A-Za-z0-9.\/-_])+>'
+ # below alpaka's includes
+ - Regex: '<([A-Za-z0-9./_\-])+>'
I have checked all hpp and cpp files with the new format file, it did not changed anything. And corrected deliberately made errors properly.
find . -type f -name "*.hpp" | grep -v ^"./thirdParty" | xargs clang-format-16 -i
find . -type f -name "*.cpp" | grep -v ^"./thirdParty" | xargs clang-format-16 -i
48c9954
to
5b98c2e
Compare
5b98c2e
to
c3b5083
Compare
182b40e
to
ebf4ddd
Compare
This is a solution to issue #2431
Problem [Updated]
#include "alpaka/queue/cuda_hip/QueueUniformCudaHipRt.hpp"
Solution
.clang-format
file. The character "-" in file-path regex must be escaped since it is used in definition of a Range like ina-z
. Otherwise the include directive having a file-path including "-" will be listed separately at the end.