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

fix: name conflict and GetGlobalOperator #109

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

Vipul-Cariappa
Copy link
Collaborator

Fixes 5 previously failing test cases.

@@ -477,7 +477,7 @@ bool Cppyy::AppendTypesSlow(const std::string &name,
if (!struct_count)
Cpp::Declare(code.c_str()); // initialize the trampoline

std::string var = "__s" + std::to_string(struct_count++);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

__s8 conflicts with some variable/type name.

Comment on lines 313 to +314
TCppIndex_t GetGlobalOperator(
TCppType_t scope, const std::string& lc, const std::string& rc, const std::string& op) { assert(0 && "GetGlobalOperator");return 0; }
TCppType_t scope, const std::string& lc, const std::string& rc, const std::string& op) { assert(0 && "GetGlobalOperator");return -1; }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

GetGlobalOperator is called by BuildOperator at https://github.com/Vipul-Cariappa/CPyCppyy-compiler-research/blob/b59c6b1846b40ba99fc2c5d82cbbfd90401d1667/src/Utility.cxx#L271-L274.

I believe it should be -1 and not 0. By looking at the logic at caller end.

@Vipul-Cariappa
Copy link
Collaborator Author

ping @vgvassilev @aaronj0

@aaronj0
Copy link
Collaborator

aaronj0 commented Sep 30, 2024

Looks good to me! Let's wait for the checks to finish before merging

@Vipul-Cariappa
Copy link
Collaborator Author

It is failing with OSX cling.
I do not have access you any device with OSX. I cannot test it.
Can we set run=not IS_MAC for now?
I guess test_stltypes.py::TestSTLSTRING::test04_array_of_strings is failing from the logs.

@aaronj0
Copy link
Collaborator

aaronj0 commented Sep 30, 2024

It is failing with OSX cling. I do not have access you any device with OSX. I cannot test it. Can we set run=not IS_MAC for now? I guess test_stltypes.py::TestSTLSTRING::test04_array_of_strings is failing from the logs.

Looks like it crashes now, instead of just failing previously. I would edit the tag to use run = not(IS_MAC and not IS_CLANG_REPL) to no longer run on OS X cling.

@aaronj0 aaronj0 merged commit 1df4a33 into compiler-research:master Sep 30, 2024
13 of 15 checks passed
@Vipul-Cariappa Vipul-Cariappa deleted the bug-fix branch September 30, 2024 13:15
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