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

Fixed bug where cycles where always considered unequal #2096

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

PieterOlivier
Copy link
Contributor

Parsetrees with cycles where always considered as "not equal" because the equality check in the interpreter did not check for the cycle case.

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 49%. Comparing base (eda3949) to head (a41d37d).
Report is 83 commits behind head on main.

Files with missing lines Patch % Lines
...almpl/interpreter/result/ConcreteSyntaxResult.java 0% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##              main   #2096    +/-   ##
========================================
  Coverage       49%     49%            
- Complexity    6312    6319     +7     
========================================
  Files          664     666     +2     
  Lines        59633   59693    +60     
  Branches      8648    8672    +24     
========================================
+ Hits         29489   29599   +110     
+ Misses       27935   27857    -78     
- Partials      2209    2237    +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jurgenvinju
Copy link
Member

This code works directly on IConstructor which is a facade over the native ITree implementations. The implementations of .equals(...) in subclasses of ITree are much more efficient. So we could replace some of this by calls to ITree objects.

Copy link
Member

@jurgenvinju jurgenvinju left a comment

Choose a reason for hiding this comment

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

This is great. Maybe log a new issue on forwarding equality to ITree implementations. What I don't get yet is how to have both versions: with and without ignoring layout and keyword fields.

@PieterOlivier PieterOlivier merged commit d83ff92 into main Dec 9, 2024
6 of 7 checks passed
@PieterOlivier PieterOlivier deleted the cycle-equality-bug branch December 9, 2024 10:59
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