You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modules inside gridcomps/ currently bypass the top-level MAPL umbrella module and directly USE internal low-level MAPL modules (e.g. mapl_Base_mod, mapl_Comms_mod, mapl_Config_mod, mapl_Constants_mod, etc.).
This is incorrect. Gridcomp modules are conceptually at the top of the MAPL dependency hierarchy and should only USE:
The MAPL umbrella module (for anything from the MAPL library), and/or
Modules that are internal to the gridcomp itself (i.e. defined within gridcomps/).
Direct USE of internal low-level modules (those that would otherwise carry a _mod suffix) from within gridcomps/ violates the intended layering and creates a maintenance burden — changes to internal module names or structure require hunting down usages in gridcomps code that should be insulated from such details.
Examples of violations found
use mapl_Base_mod
use mapl_Comms_mod
use mapl_Config_mod
use mapl_Constants_mod
use mapl_AbstractGridFactory_mod
use mapl_AbstractRegridder_mod
use mapl_ApplicationSupport_mod
...and many more throughout gridcomps/.
Proposed Fix
Audit all .F90 files under gridcomps/ and replace direct USE of internal MAPL modules with USE MAPL (with appropriate ONLY clauses). Any entity not currently re-exported by the MAPL umbrella that is needed by a gridcomp should be added to MAPL.
The CMake dependency graph is already correct (MAPL.cap etc. depend on MAPL.base, not on MAPL), so no circular dependency exists at the build level today — but the Fortran USE structure does not reflect the intended abstraction boundary.
Problem
Modules inside
gridcomps/currently bypass the top-levelMAPLumbrella module and directlyUSEinternal low-level MAPL modules (e.g.mapl_Base_mod,mapl_Comms_mod,mapl_Config_mod,mapl_Constants_mod, etc.).This is incorrect. Gridcomp modules are conceptually at the top of the MAPL dependency hierarchy and should only
USE:MAPLumbrella module (for anything from the MAPL library), and/orgridcomps/).Direct
USEof internal low-level modules (those that would otherwise carry a_modsuffix) from withingridcomps/violates the intended layering and creates a maintenance burden — changes to internal module names or structure require hunting down usages in gridcomps code that should be insulated from such details.Examples of violations found
...and many more throughout
gridcomps/.Proposed Fix
Audit all
.F90files undergridcomps/and replace directUSEof internal MAPL modules withUSE MAPL(with appropriateONLYclauses). Any entity not currently re-exported by theMAPLumbrella that is needed by a gridcomp should be added toMAPL.Notes
mapl_<Name>_modmodule rename effort (Rename all internal modules to mapl_<Name>_mod convention #4958).MAPL.capetc. depend onMAPL.base, not onMAPL), so no circular dependency exists at the build level today — but the FortranUSEstructure does not reflect the intended abstraction boundary.