Skip to content
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

Add Clang 15 C++17 build with error tolerance #1764

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

lucaam
Copy link

@lucaam lucaam commented Feb 5, 2025

This PR adds Clang 15 to the build matrix C++17 support and set it as non-voting (continue-on-error: true) and use the -k option to cmake continue going even if error occurs.

Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be the first step towards such a CI check.
I think for this to be very useful, we need also a postprocessor that reads the error output of the compilation, and lists the failing and non-failing .cpp fiiles that can and can't be compiled.
This can then be combined with an explicit whitelist (Files that we have already fixed) to really check, that we don't regress, and that we correctly track our progress.
But I assume, that this is your initial step, and as you get the output of the CI pipeline you can used that to develop the further tools.

Let me know if I can be of assistance.

CMakeLists.txt Outdated
Comment on lines 35 to 36
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "15.0.0")
MESSAGE(FATAL_ERROR "Clang++ versions older than 15.0 are not supported by QLever")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as this compilation doesn't work in fact, I would prefer having an additional
variable to be used here, such that this reads if (COMPILER_VERSION LESS 16 && !COMPILER_VERSION_CHECK_DEACTIVATED

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, way better solution, gonna push it soon

Comment on lines 50 to 56
- compiler: clang
compiler-version: 15
additional-cmake-options: "-DUSE_CPP_17_BACKPORTS=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS='-ferror-limit=0'"
build-type: Debug
expensive-tests: false
continue-on-error: true
use-keep-going: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just started the pipeline, this would be an initial step to track the progress.

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.59%. Comparing base (db6825c) to head (041b309).
Report is 81 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1764      +/-   ##
==========================================
+ Coverage   89.98%   90.59%   +0.60%     
==========================================
  Files         395      414      +19     
  Lines       37693    40100    +2407     
  Branches     4241     4536     +295     
==========================================
+ Hits        33919    36329    +2410     
+ Misses       2478     2419      -59     
- Partials     1296     1352      +56     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lucaam
Copy link
Author

lucaam commented Feb 6, 2025

This can be the first step towards such a CI check. I think for this to be very useful, we need also a postprocessor that reads the error output of the compilation, and lists the failing and non-failing .cpp fiiles that can and can't be compiled. This can then be combined with an explicit whitelist (Files that we have already fixed) to really check, that we don't regress, and that we correctly track our progress. But I assume, that this is your initial step, and as you get the output of the CI pipeline you can used that to develop the further tools.

Let me know if I can be of assistance.

I think we could think about it in the future. Would you be open to a Python-based solution for this (we could include in a Github Workflow)?

@lucaam lucaam requested a review from joka921 February 6, 2025 08:53
@lucaam
Copy link
Author

lucaam commented Feb 12, 2025

Hello @joka921, any chance to have a look?

@lucaam lucaam marked this pull request as draft February 12, 2025 11:36
@lucaam lucaam force-pushed the add_clang15_cpp17_support branch from 1bb3965 to a4e643a Compare February 12, 2025 11:53
@lucaam lucaam marked this pull request as ready for review February 12, 2025 11:54
@lucaam
Copy link
Author

lucaam commented Feb 18, 2025

Hello @joka921, could you please take a look and tell me if something else is needed?

@joka921
Copy link
Member

joka921 commented Feb 19, 2025

Hi @lucaam
Sorry for the delay,
I have just started the checks again, so we can have a look at what the actual output looks like.
I have some questions

  1. Was your choice to support a clang based compiler deliberate? I think our target platform is GCC, so something like GCC 10, or even the actual target 8.3 would seem more appropriate for me.

  2. I hope that I did not block your further work, I hope that you don't have some workflow that depends on this being merged.

  3. If you want to discuss anything general about the further extensions of these CI checks to make them more useful by reporting the failed and succesful builds, you can contact me via email (you should have access to the address)

Best regards
Johannes

@lucaam lucaam force-pushed the add_clang15_cpp17_support branch from 57a9600 to f112862 Compare February 24, 2025 16:46
Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lucaam ,
I previously had three comments/issues:

  1. Use GCC instead of clang, as it is our target platform
  2. Don't fail the CI if the tests fail. (The ctest of everything must be "do not fail on error" and the checks after that (E2E and Printing benchmark examples) must be disabled.
  3. Add a (hard) check for a whitelisted set of tests.

In your latest commit I see point 3 addressed, but 1 and 2 are still missing.
Best regards

@lucaam
Copy link
Author

lucaam commented Feb 25, 2025

Hi @lucaam , I previously had three comments/issues:

1. Use GCC instead of clang, as it is our target platform

2. Don't fail the CI if the tests fail. (The ctest of everything must be "do not fail on error" and the checks after that (E2E and Printing benchmark examples) must be disabled.

3. Add a (hard) check for a whitelisted set of tests.

In your latest commit I see point 3 addressed, but 1 and 2 are still missing. Best regards

Hi, I will continue working on that to add all the requested changes and let you know once is done! Thanks!

@lucaam lucaam marked this pull request as draft February 25, 2025 13:16
@lucaam lucaam force-pushed the add_clang15_cpp17_support branch 2 times, most recently from 5bb6b25 to 49a8d5b Compare March 21, 2025 15:14
@lucaam lucaam force-pushed the add_clang15_cpp17_support branch 2 times, most recently from 7d5ff08 to 3dbed9f Compare March 26, 2025 10:28
@lucaam lucaam force-pushed the add_clang15_cpp17_support branch from 3dbed9f to 4cd6614 Compare March 26, 2025 10:52
@lucaam lucaam marked this pull request as ready for review March 26, 2025 16:20
@lucaam
Copy link
Author

lucaam commented Mar 26, 2025

Hello @joka921, could you please have a look?

@joka921
Copy link
Member

joka921 commented Mar 27, 2025

Hi @lucaam
I have just started the checks, so we can see how they behave.
I will have a look at this later today.

Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we already have very many compilers, maybe GCC-8 sufficies, and you can drop the clang-15 check for now.
Otherwise this looks fine if it works as expected (checks are still running, as the CI is very busy at the moment).

Comment on lines +64 to +71
- compiler: clang
compiler-version: 15
additional-cmake-options: "-DUSE_CPP_17_BACKPORTS=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS='-ferror-limit=0' -DCOMPILER_VERSION_CHECK_DEACTIVATED=ON"
build-type: Debug
expensive-tests: false
continue-on-error: true
use-keep-going: true
use-ignore-errors: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need Clang15?
The CI runs long enough as is, so if it works we can maybe only add the Gcc8 check for now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lucaam
Thanks for integrating the Gcc-8 compiler.
However currently this doesn't do anything useful because we explicitly pass the -fcoroutines flag, which gcc-8 doesn't have.
So for now let's keep the clang-15 build and don't activate the gcc-8 build. Please leave the code to run it in, and just deactivate the given configuration, s.t. it doesn't waste our CI time.
Sorry for the confusion, but all the work you did was required and now it's working.

TLDR:
keep but deactivate the GCC-8 build for now, then we can merge this.
Best regards

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @joka921, thanks for the feedback, I just pushed a commit to avoid -fcoroutines flag for gcc8 but I don't understand what do you mean with "keep but deactivate the GCC-8". Do you mean remove it from include in the matrix but keep the commits already pushed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lucaam
Yes, that's what I meant. But if the removed flag also works and we can compile the whitelisted test with GCC-8 (let's wait for the check), then we can do it the other way round and remove Clang-15 and keep GCC-8.

While analyzing the last build output I found out that the build passes if the whitelisted tests are not run, because they couldn't be compiled, but I am not sure if we can do something about that (let me know if you have any idea).

I'll be away for the weekend soon, but hopefully we can finally merge this with exactly one additional CI check at the beginning of next week.

@sparql-conformance
Copy link

@joka921
Copy link
Member

joka921 commented Apr 1, 2025

Hi @lucaam
GCC with the removed -fcoroutines flag now works as expected, so you can remove the clang-15 build for now
(just comment it out in the matrix, s.t. we know how to reincluded should we ever want to.
Then we can merge this and discuss further steps.

Best regards
Johannes

@lucaam
Copy link
Author

lucaam commented Apr 1, 2025

Hi @lucaam GCC with the removed -fcoroutines flag now works as expected, so you can remove the clang-15 build for now (just comment it out in the matrix, s.t. we know how to reincluded should we ever want to. Then we can merge this and discuss further steps.

Best regards Johannes

Hi @joka921, I would keep both if you think this is possible, the main idea was having clang15 enabled. Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants