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

For classes, add a field to the script object just like functions #149

Merged
merged 2 commits into from
Feb 17, 2024

Conversation

khatchad
Copy link
Collaborator

Then, (external) classes can be found by the PA when they are imported. Otherwise, they cannot be found.

We can't a test for this because we found that com.ibm.wala.cast.python.test is run twice during the Maven build. And, the behavior of the code differs between the builds. Thus, on one run, the assertions pass, and on the other, the assertions fail. The only difference I can see is that the first test uses Python files from target/, while the second passes uses the ones from the repo. Other than that, I have no idea what the difference is and why it's run twice in the first place.

Still, this fix works in our client application. Thus, I feel that the fix would be beneficial for someone as it solves a significant bug in our client.

Then, (external) classes can be found by the PA when they are imported. Otherwise, they cannot be found.
@khatchad khatchad added the bug Something isn't working label Feb 16, 2024
@khatchad khatchad requested a review from msridhar February 16, 2024 03:56
@khatchad khatchad enabled auto-merge (squash) February 16, 2024 03:57
@msridhar
Copy link
Member

It would be good at some point to dig into why tests are running twice and to fix that.

@khatchad khatchad merged commit 634eb70 into wala:master Feb 17, 2024
1 check passed
@khatchad khatchad deleted the contrib_external_class_fix branch February 17, 2024 00:31
@khatchad
Copy link
Collaborator Author

It would be good at some point to dig into why tests are running twice and to fix that.

I think I can see why the tests are run twice, but the troubling part is why the results differ between the runs. My guess is that the multiple runs is due to surefire being included in both the parent and children pom.xml files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants