Skip to content

(Closes #3406) Fix subroutine handler to find the subroutine stmt if it exists instead of assuming its the first child.#3407

Merged
sergisiso merged 5 commits into
masterfrom
3406_fix
Apr 23, 2026
Merged

(Closes #3406) Fix subroutine handler to find the subroutine stmt if it exists instead of assuming its the first child.#3407
sergisiso merged 5 commits into
masterfrom
3406_fix

Conversation

@LonelyCat124
Copy link
Copy Markdown
Collaborator

@schreiberx This worked for the reproducer you gave us - if you have time to try it on NEMO itself it'd be appreciated.

Otherwise ready for a look from @arporter or @sergisiso. I will set ITs running in the mean time.

@LonelyCat124
Copy link
Copy Markdown
Collaborator Author

This PR also ticks fparser from 0.2.2 to >= 0.2.2 (since fparser has a 0.2.3 version now at least it helps us to use newer versions during development).

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.96%. Comparing base (1706d28) to head (6a8fad8).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3407   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files         389      389           
  Lines       54524    54542   +18     
=======================================
+ Hits        54505    54523   +18     
  Misses         19       19           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

@LonelyCat124 I have some doubts about the implementation and its test, see inline.

Comment thread src/psyclone/psyir/frontend/fparser2.py Outdated
Comment thread src/psyclone/tests/psyir/frontend/fparser2_subroutine_handler_test.py Outdated
Comment thread setup.py Outdated
@LonelyCat124
Copy link
Copy Markdown
Collaborator Author

@sergisiso Ready for another look, I fixed the main changes not being tested properly but the fparser chjange I didn't revert yet as I'm confused as to why my local fparser reports a later version.

Copy link
Copy Markdown
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

@LonelyCat124 See replies above, I like the new solution, there are just some minor comments now.

@LonelyCat124
Copy link
Copy Markdown
Collaborator Author

@sergisiso Reverted the setup.py change and added the additional checks into the tests.

Copy link
Copy Markdown
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

@LonelyCat124 Everything looks good now and the integration test succeeded, this is approved for merging

@sergisiso sergisiso merged commit 26a8756 into master Apr 23, 2026
14 of 15 checks passed
@sergisiso sergisiso deleted the 3406_fix branch April 23, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants