-
Notifications
You must be signed in to change notification settings - Fork 24
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
base: main
Are you sure you want to change the base?
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. |
This PR will update cling in the ci to version 1.1 using root llvm 16