ecmwf-ifs / loki

Freely programmable source-to-source translation for Fortran
https://sites.ecmwf.int/docs/loki/
Apache License 2.0
22 stars 11 forks source link

Fix: import of private symbols affects the type inference #308

Closed quepas closed 2 months ago

quepas commented 2 months ago

As described in #309, imports of private symbols destroys the type inference. This pull request propose a simple check of symbols access specificators to filter out the private symbols.

TODO:

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 95.09%. Comparing base (dd01f94) to head (9b8ac61).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #308 +/- ## ======================================= Coverage 95.09% 95.09% ======================================= Files 165 165 Lines 35282 35301 +19 ======================================= + Hits 33552 33571 +19 Misses 1730 1730 ``` | [Flag](https://app.codecov.io/gh/ecmwf-ifs/loki/pull/308/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ecmwf-ifs) | Coverage Δ | | |---|---|---| | [lint_rules](https://app.codecov.io/gh/ecmwf-ifs/loki/pull/308/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ecmwf-ifs) | `96.39% <ø> (ø)` | | | [loki](https://app.codecov.io/gh/ecmwf-ifs/loki/pull/308/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ecmwf-ifs) | `95.07% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ecmwf-ifs#carryforward-flags-in-the-pull-request-comment) to find out more.

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

quepas commented 2 months ago

Many thanks for finding this and providing the fix, this looks fantastic!

I've just a few stylistic pointers but otherwise very happy to merge this as soon as possible.

Thank you for great suggestions! I have applied them.

No problem, the pleasure is on our side (IPSL), as we are actively using loki in our work.

reuterbal commented 2 months ago

ecwam regression fails due to missing permissions from an external contribution. Verified compatibility offline.