-
Notifications
You must be signed in to change notification settings - Fork 31
Update cling in ci to version 1.1 using roots llvm 16 #358
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 cling in ci to version 1.1 using roots llvm 16 #358
Conversation
@vgvassilev @aaronj0 #333 has issues for me that are easier to resolve by just starting a new PR. We shouldn't have the cling version set to 'refs/heads/master' . This will just cause the cache is fill up quickly. The names have been made inconsistent by dropping the compiler from the job name on osx. Its just brought back lots of jobs that were removed from the ci. |
It's not ready yet... The reason you see the old jobs is because it's many commits behind, but that is relatively easy to resolve which I am doing right now. I don't think opening a fresh PR is the solution.
As for 'refs/head/master', cling with llvm18 doesn't have a release tag yet. The purpose of this is to have a real-time test of upstream cling |
@aaronj0 We can't have a real time test of the cling based on llvm 18 in the ci as it would be constantly be rebuilding the cache, overwhelming the little space we have very quickly. If you drop this from the PR and make it specifically about cling 1.1 and llvm 16, and revert the names back to be consistent then I'll drop this PR. |
clang-tidy review says "All clean, LGTM! 👍" |
We will cut a tag for it, or use a commit. Either way I don't see the point of duplicating the previous PR |
clang-tidy review says "All clean, LGTM! 👍" |
930768c
to
05f2544
Compare
clang-tidy review says "All clean, LGTM! 👍" |
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.
LGTM! Maybe we should also update the README with updated versions for build instructions.
I spent some time debugging the failure. It is caused when there is an error in the code we are executing (source).
Stack trace goes through
Destructor of llvm::Expected
https://github.com/root-project/llvm-project/blob/cling-llvm16/llvm/include/llvm/Support/Error.h#L551-L552
The logic looks valid in my eyes.
The error msg is
Expected<T> must be checked before access or destruction.
Unchecked Expected<T> contained error
With the following patch for cling the CppInterOp tests pass
diff --git a/lib/Interpreter/IncrementalParser.cpp b/lib/Interpreter/IncrementalParser.cpp
index 89cd78d..2aea40d 100644
--- a/lib/Interpreter/IncrementalParser.cpp
+++ b/lib/Interpreter/IncrementalParser.cpp
@@ -911,8 +911,11 @@ namespace cling {
PP.EnterSourceFile(FID, /*DirLookup*/nullptr, NewLoc);
m_Consumer->getTransaction()->setBufferFID(FID);
- if (!ParseOrWrapTopLevelDecl())
+ llvm::Expected<bool> res = ParseOrWrapTopLevelDecl();
+ if (!res) {
+ llvm::consumeError(std::move(res.takeError()));
return kFailed;
+ }
if (PP.getLangOpts().DelayedTemplateParsing) {
// Microsoft-specific:
@vgvassilev may have to take a look once.
Makes sense. Please open a pr. |
PR at cling? |
Yes. |
Hi @vgvassilev I have opened the PR at root-project/cling#538. I was thinking... after merging the PR at Cling, we will have to create a new release, FYI, with this patch, CppInterOp tests pass, but cppyy tests fail. I will start looking into it. Any thoughts @mcbarton |
Yeah, I could release cling... |
@Vipul-Cariappa I have added your patch to the workflow to see it working. I have disabled building cppyy, until you determine what is the issue stopping cppyy from passing with cling 1.1. If this patch works then I will update the documentation. |
clang-tidy review says "All clean, LGTM! 👍" |
@Vipul-Cariappa any idea how to fix the failing osx jobs? The errror is the same as what you fixed for Ubuntu. |
clang-tidy review says "All clean, LGTM! 👍" |
Debugging OSX failures at #359. Looks like I will need to rebuild cling and llvm in debug. It is going to be time consuming. |
Hi @mcbarton. If I run Do we need to rebuild the cache? Or update the logic of retrieving the cache? path: |
llvm-project
${{ matrix.cling=='On' && 'cling' || '' }}
key: ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }} I am coming to this conclusion by looking at the CI run of dbc5d38 (Update cling16-1-Error-Handling.patch to add blank line) commit. I see that ubuntu-cling still fails for the same reason. |
@Vipul-Cariappa The Ubuntu job passes with your patch. See https://github.com/compiler-research/CppInterOp/actions/runs/12100202323/job/33748369555 |
Weird. Looks like the OSX failure may not be caused in this round of CI run.
Which commit is this? Any idea why Ubuntu-Cling fails in my PR https://github.com/compiler-research/CppInterOp/actions/runs/12112309439/job/33766010006?pr=359? It fails with the same error, my patch is supposed to fix. |
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
Closing this as the commit of this PR isbahdd to follow, and now workflow files have gone through substantial changes since this PR was created. Will recreate as a fresh PR with clean commit history. |
Hi @mcbarton, could you please reopen these changes. We are now interested to get this merged quickly (I guess, at least I am). @aaronj0, @vgvassilev can we skip cling |
@Vipul-Cariappa I will look into this today. I'll make a fresh PR which adds cling 1.1 for linux to the ci (since we know that works, and the issues is macos) and i'll open up a separate PR for cling 1.2 |
Just |
I think its best if we have the 1.1 job in the ci for linux. It would look strange if we support 1.0 and 1.2, but not 1.1 at some level at least (with at least meaning just linux). If Aaron and Vassil agree with you though that's fine. We would probably need some sort of note to that effect though in the documentation, if that was the case. |
Once we support |
It should be noted that for clang repl, where we couldn't get a feature working for an older llvm, we just skip over the test. The point of having the old llvms in the ci is more to check that an existing feature that already works isn't broken by a patch |
I think supporting the latest released cling is fine. |
@Vipul-Cariappa I have made a PR here making the cling ci jobs 1.2 instead of 1.0 #580 . I will make a separate PR on Monday which drops cling 1.0 support from CppInterOp, rather than dropping support for it in the same PR which adds 1.2 support, since you say you want this change to the ci soon. |
This PR will update cling in the ci to version 1.1 using root llvm 16