Skip to content

Add cling 1.2 support #580

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

Merged
merged 3 commits into from
May 22, 2025
Merged

Add cling 1.2 support #580

merged 3 commits into from
May 22, 2025

Conversation

mcbarton
Copy link
Collaborator

Description

Please include a summary of changes, motivation and context for this PR.

This PR makes CppInterOp compatible with cling 1.2, and jobs the cling 1.0 jobs. I will remove cling 1.0 support from CppInterOp in a separate PR soon.

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Please describe the test(s) that you added and ran to verify your changes.

Checklist

  • I have read the contribution guide recently

@Vipul-Cariappa Vipul-Cariappa self-requested a review May 16, 2025 09:32
@mcbarton mcbarton force-pushed the Add-cling-1.2-support branch 2 times, most recently from bfee029 to ea1c61f Compare May 16, 2025 09:39
@mcbarton
Copy link
Collaborator Author

As this PR will involve deleting things from the cache, once this PR has been approved, please just leave it to me to merge, since I know exactly what needs to be deleted before merging.

@mcbarton mcbarton requested review from vgvassilev and aaronj0 May 16, 2025 09:44
@mcbarton mcbarton force-pushed the Add-cling-1.2-support branch from ea1c61f to 90d4bf0 Compare May 16, 2025 10:13
@aaronj0
Copy link
Collaborator

aaronj0 commented May 16, 2025

Hi @mcbarton, looks like this build won't work unless we move to cling master or wait for the v1.3 release. If you don't mind tracking a patch for the timebeing, I can push that here. I do still face some weird issues with googletest in cmake, but I'm sure you can take it from there.

@aaronj0
Copy link
Collaborator

aaronj0 commented May 16, 2025

I do still face some weird issues with googletest in cmake, but I'm sure you can take it from there.

@mcbarton never mind that, came from me not passing the CMAKE_BUILD_TYPE, which was an error on my end. Now with the patch, lets see if the jobs pass

@mcbarton
Copy link
Collaborator Author

mcbarton commented May 16, 2025

Just a note that as part of this PR we will want to update the documentation too, to remove references to cling 1.0, and mention the need for the patch if they use cling 1.2 . I plan to put in a PR on Monday to eliminate the code needed for 1.0 cling support.

Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.36%. Comparing base (6951212) to head (843a3d4).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #580   +/-   ##
=======================================
  Coverage   76.36%   76.36%           
=======================================
  Files           9        9           
  Lines        3655     3655           
=======================================
  Hits         2791     2791           
  Misses        864      864           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aaronj0 aaronj0 force-pushed the Add-cling-1.2-support branch from 5cbcf3d to 2fe65fc Compare May 16, 2025 14:20
@mcbarton
Copy link
Collaborator Author

@aaronj0 @Vipul-Cariappa The macOS cling 1.2 job passes for CppInterOp with the new patch. To get the whole job to pass an identical PR will need to be opened in cppyy to fix the test tags there.

@mcbarton
Copy link
Collaborator Author

mcbarton commented May 16, 2025

DynamicLibraryManagerTest.Sanity is failing for Windows cling 1.2 . That test will need to be disabled for Windows cling llvm = 18 . I am away from my computer this weekend, so this will need to be taken care of by someone else if needed before Monday.

@aaronj0 aaronj0 force-pushed the Add-cling-1.2-support branch from cf3aa84 to dfaf2bd Compare May 16, 2025 17:13
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@aaronj0 aaronj0 force-pushed the Add-cling-1.2-support branch from 155edcf to f7f9c63 Compare May 20, 2025 09:03
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -1,5 +1,6 @@
#include "gtest/gtest.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'gtest/gtest.h' file not found [clang-diagnostic-error]

#include "gtest/gtest.h"
         ^

@mcbarton mcbarton force-pushed the Add-cling-1.2-support branch from c46b04b to 232a4a8 Compare May 20, 2025 10:08
@aaronj0
Copy link
Collaborator

aaronj0 commented May 20, 2025

@mcbarton I disagree with you dropping my commit updating the LLJIT guards on this PR. This is code I worked on earlier and something I wanted to address with a specific commit and a functional description as to what changed there. Either way, opening PRs with broad goals, expecting others to fix all the issues on those PRs (which have been doing) and then dropping their commits gets in the way of people who work on these things as a part of their job, and is in poor taste.

@mcbarton
Copy link
Collaborator Author

@mcbarton I disagree with you dropping my commit updating the LLJIT guards on this PR. This is code I worked on earlier and something I wanted to address with a specific commit and a functional description as to what changed there. Either way, opening PRs with broad goals, expecting others to fix all the issues on those PRs (which have been doing) and then dropping their commits gets in the way of people who work on these things as a part of their job, and is in poor taste.

I didn't mean to cause any offence. I certainly am not expecting you solve the issues on PRs I open (I am happy for you to close this PR, and open up a completely new one). I did it because I see updating to cling 1.2 to be separate to dropping support for 1.0 . I saw this commit as something which didn't have anything to do with adding 1.2 support, and more to do with dropping 1.0 support (and I had already made this change in my 1.0 cling support dropping PR).

@aaronj0 aaronj0 force-pushed the Add-cling-1.2-support branch from 232a4a8 to 693d288 Compare May 21, 2025 12:48
@aaronj0
Copy link
Collaborator

aaronj0 commented May 21, 2025

I didn't mean to cause any offence. I certainly am not expecting you solve the issues on PRs I open (I am happy for you to close this PR, and open up a completely new one). I did it because I see updating to cling 1.2 to be separate to dropping support for 1.0 . I saw this commit as something which didn't have anything to do with adding 1.2 support, and more to do with dropping 1.0 support (and I had already made this change in my 1.0 cling support dropping PR).

No worries, I have updated the Windows failures, and we have the cppyy tags ready here: compiler-research/cppyy#145. We can merge this since all jobs fail on the cppyy step, and follow up on the cppyy side for the tags. I will also open a PR with the patch dropped here, so we no longer have that pointer arithmetic for Cling in ROOT with the immediate CppInterOp release.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -163,6 +163,10 @@ TEST(ScopeReflectionTest, SizeOf) {


TEST(ScopeReflectionTest, IsBuiltin) {
#if CLANG_VERSION_MAJOR == 18 && defined(CPPINTEROP_USE_CLING) && defined(_WIN32) && (defined(_M_ARM) || defined(_M_ARM64))
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: no header providing "CLANG_VERSION_MAJOR" is directly included [misc-include-cleaner]

unittests/CppInterOp/ScopeReflectionTest.cpp:21:

- #include <string>
+ #include <clang/Basic/Version.h>
+ #include <string>

@aaronj0 aaronj0 force-pushed the Add-cling-1.2-support branch from 693d288 to 1a4f0aa Compare May 21, 2025 14:29
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

2 similar comments
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton
Copy link
Collaborator Author

@vgvassilev @aaronj0 can one of you approve this PR now that the Windows arm part of the ci passes? I'm planning on dealing with deleting old unneeded cache builds tonight and merge together with this PR #583 which removes the cross compile emscripten patch, when things are quiet, since both PRs are likely to be disruptive while the cache rebuilds. @aaronj0 can rerun his cppyy PR tomorrow to show that it passes after this goes in.

I will rebase my PR which removes cling 1.0 support on top of this one, with a plan for that PR to be ready either tomorrow or Friday.

@mcbarton
Copy link
Collaborator Author

I will squash the commits on merge if approved.

@aaronj0 aaronj0 force-pushed the Add-cling-1.2-support branch from 843a3d4 to 130b481 Compare May 22, 2025 07:09
@aaronj0 aaronj0 force-pushed the Add-cling-1.2-support branch from 130b481 to 82069ff Compare May 22, 2025 07:11
Copy link
Collaborator

@aaronj0 aaronj0 left a comment

Choose a reason for hiding this comment

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

LGTM! I have rebased on main and squashed into meaningful commits, we can merge this once the jobs pass, and move on to updating cppyy. Thanks for this effort @mcbarton

@aaronj0
Copy link
Collaborator

aaronj0 commented May 22, 2025

LGTM! I have rebased on main and squashed into meaningful commits, we can merge this once the jobs pass, and move on to updating cppyy. Thanks for this effort @mcbarton

I guess there is no point in waiting for the cache to rebuild again, so I am going ahead and merging this PR

@aaronj0 aaronj0 merged commit e5d06de into main May 22, 2025
33 of 47 checks passed
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@vgvassilev vgvassilev deleted the Add-cling-1.2-support branch May 27, 2025 07:09
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