PSyclone icon indicating copy to clipboard operation
PSyclone copied to clipboard

(Closes #2201) Implementation enabling FileContainer's to have information about routines outside of modules.

Open LonelyCat124 opened this issue 1 year ago • 1 comments

Likely missing coverage and FAILED psyir/backend/fortran_test.py::test_fw_filecontainer_error1 test fails.

Also waiting on #2566 for fixing some tests before this will be ready.

LonelyCat124 avatar May 08 '24 14:05 LonelyCat124

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.86%. Comparing base (5bbe862) to head (843b163).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2575   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files         351      351           
  Lines       48339    48396   +57     
=======================================
+ Hits        48274    48331   +57     
  Misses         65       65           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 08 '24 14:05 codecov[bot]

This is ready for a look now - I think its a pretty small change overall.

LonelyCat124 avatar May 23 '24 10:05 LonelyCat124

Changed my mind, there's some missing coverage (which i need to decide if its reachable) and I think I will also fix #2582 here.

LonelyCat124 avatar May 23 '24 11:05 LonelyCat124

Changed my mind, there's some missing coverage (which i need to decide if its reachable) and I think I will also fix #2582 here.

I think we should fix #2582 by adding Routine._symbol (unless I'm missing something?).

arporter avatar May 23 '24 11:05 arporter

I think adding Routine._symbol is a bigger change but maybe thats a better place to solve #2582 than doing it effectively twice.

LonelyCat124 avatar May 23 '24 12:05 LonelyCat124

Ok - I checked this now @sergisiso. We can't pass a subroutine to either psyir_from_expression or psyir_from_statement, they aren't valid for those entry points so I think we will always have a Container above a subroutine, so I'm going to remove the try/except from here:

try:

routine_symbol = routine.symbol_table.lookup(routine.name)
routine_symbol.datatype = base_type
except KeyError:
 pass

as I think we will always have that routine.name in a container.

LonelyCat124 avatar May 23 '24 12:05 LonelyCat124

Should now be ready for review.

LonelyCat124 avatar May 23 '24 12:05 LonelyCat124

Are we best delaying this now until #2596 is done @LonelyCat124 ?

arporter avatar May 24 '24 09:05 arporter

Ready for another look

LonelyCat124 avatar Jun 20 '24 15:06 LonelyCat124

@LonelyCat124 I put this back with reviewed with actions to clarify if the last commit after your message that this was ready belongs here, because the same commit is also in your Routine.symbol PR

sergisiso avatar Jun 25 '24 08:06 sergisiso

@sergisiso Sorry i forgot to check this yesterday. I don't think that commit is on this branch, its just mentioned in the commit message.

LonelyCat124 avatar Jun 25 '24 09:06 LonelyCat124