Hash the include path mods
bblay opened this issue · comments
Fab generates a hash of mod file dependencies, and notices if a dependency changes, triggering a recompile.
However, it currently only does this for mods in the project's source folder.
It will not notice if a mod changes in an include folder elsewhere.
An example is the UM build which uses GCom's mpl.mod, which is in a different build project folder.
Fab should also generate a hash for any included mod file outside the project source.
Todo:
- Chat about this.
- Are include paths always specified with
-I
? If not, we might need to add include paths to the managed flags (if we still want to manage flags, that is). - If we do this, remove docs from #193.
Technical note:
When compiling a file, in CompileFortran._get_obj_combo_hash()
, Fab will attempt to get the hash of the file's module dependencies. It looks for them in self._mod_hashes
, which is populated at the end of each compile pass. They will default to 0 if it's not a mod which Fab has compiled in this run.
Perhaps, instead of defaulting to 0, Fab should pre-populate self._mod_hashes
with the hash of any dependency which is not in the project's source folder, but which is found in an include folder.