2 ms·
> If your language has modules, like in the syntax and semantics, and you're still requiring external tools to hunt down dependencies, your module system must s
by kergonath 2y ago
> If your language has modules, like in the syntax and semantics, and you're still requiring external tools to hunt down dependencies, your module system must somehow be a failure.
No argument from me :)
> The idea behind modules is that since they are part of the language, the compiler for the language understands modules and follows the dependencies. All module-related tooling, like incremental builds, is hooked through the compiler.
I am not sure I follow. The compiler still compiles one file each time it is run, so we need a first pass to determine the dependency tree and what can be compiled in which order, right? Even if that first pass uses the compiler itself (doing only enough parsing to see what is needed).
> You give the compiler the proper option to spit out dependencies, point it at the root module of the program, and let it do its thing.
Nowadays, gfortran can generate Makefile fragments with the dependencies, but it was not always the case. This is why there are a handful of small tools to do it and makedepf90 is one of them (it’s a small Fortran program with a rudimentary parser). There are also other compilers that don’t do it properly.
- ReleaseCandidat 2y ago> Nowadays, gfortran can generate Makefile fragments with the dependencies, but it was not always the case. For quite some years, there had been no gfortran, only g95.