Incremental rebuild failure
Working on a bigger project with fpm (~130 source files in 6 projects currently), I run frequently into issue with the incremental rebuild (once or twice a day), which forces me to delete the build/gfortran_* directories to start from scratch. Given the size of the project and its highly experimental stage it is hard to create a minimal reproducer right now.
The issue manifest in a compile time error due to type mismatch when adding a new component to a derived type or a runtime error / segmentation fault due to interface mismatches when changing dummy argument. The state is pretty much permanent once reached and selectively modifying files in the dependency tree does not trigger the complete rebuild as expected.
I'll try to create a minimal reproducer on the next occasion I run into this, but no promises.
... selectively modifying files in the dependency tree does not trigger the complete rebuild as expected.
Based on this statement I would hazard a guess that a module dependency is not being detected properly.
It may perhaps be easier to pinpoint the bug if you focus on which files, when changed, do not trigger a rebuild as expected.
EDIT: It might be worth checking for a known limitation when detecting module use statements where there is a continuation before the module name:
It seems this case fails silently which is not ideal - I'll take a look.
No continuation characters and no preprocessor used for module names here.
It's not really a minimal reproducer but I think I've been running into the same issue in this small project here: https://github.com/AshyIsMe/flox
I'm not sure if it's the *.mod files that sometimes fail to rebuild even though the source files have changed or if it's something else.
My quick hack workaround is this make clean rule defined here:
https://github.com/AshyIsMe/flox/blob/main/Makefile