hiker / fab

Flexible build system for scientific software
https://metomi.github.io/fab/
Other
1 stars 0 forks source link

3 better compiler support #21

Closed hiker closed 3 months ago

hiker commented 3 months ago

That should be ready for a first look.

Hmm - one issue is that git detects (correctly) that there will be conflicts with your changes. But I will only merge your changes in once they have been accepted by Matthew, otherwise I will risk resolving all the conflicts again :(

hiker commented 3 months ago

Gee, fixing mypy involved some major changes to the import order :( But it should now really be ready for review.

Please check my merging of your "transformation script function" changes, that was a bit hairy :(

jasonjunweilyu commented 3 months ago

Oops! @hiker , after rebuilding the container and running the Gitlab pipeline of your Gitlab merge request, there seems to be a circular import error with running grab_lfric.py. It imports BuildConfig, which initializes the tools and in tool PSyclone, there is a call to import BuildConfig. The error message is attached below (https://git.nci.org.au/bom/ngm/lfric/lfric_atm-fab/-/jobs/67568):

Start grabbing the lfric sources Traceback (most recent call last): File "....../fab_framework/infrastructure/build/fab/grab_lfric.py", line 10, in from fab.build_config import BuildConfig File "/opt/mamba/envs/container/lib/python3.11/site-packages/fab/build_config.py", line 26, in from fab.tools.categories import Categories File "/opt/mamba/envs/container/lib/python3.11/site-packages/fab/tools/init.py", line 16, in from fab.tools.psyclone import Psyclone File "/opt/mamba/envs/container/lib/python3.11/site-packages/fab/tools/psyclone.py", line 13, in from fab.build_config import BuildConfig ImportError: cannot import name 'BuildConfig' from partially initialized module 'fab.build_config' (most likely due to a circular import) (/opt/mamba/envs/container/lib/python3.11/site-packages/fab/build_config.py)

Should we move fab.build_config import BuildConfig in https://github.com/hiker/fab/blob/1109a8832c9137e3a6437f446248bfae06e59421/source/fab/tools/psyclone.py#L13 to def process in fab/tools/psyclone.py?