Fortran-FOSS-Programmers / ford

Automatically generates FORtran Documentation from comments within the code.
https://forddocs.readthedocs.io
GNU General Public License v3.0
410 stars 134 forks source link

show_proc_parent is ignored #630

Closed mscfd closed 7 months ago

mscfd commented 9 months ago

It looks like that show_proc_parent is not used anywhere. I assume that it was meant to control the prefix in procedure nodes, done in ProcNode.init:

        parent_label = ""
        binding_label = ""
        if parent:
            parent_label = f"{parent.name}::"
        if binder:
            binding_label = f"{binder.name}%"

        self.attribs["label"] = f"{parent_label}{binding_label}{self.name}"

Indeed, it looks like that show_proc_parent accidentially got lost in commit 859ef3e461d2c227a534452e8d7417a0fcf00de5?

ZedThree commented 9 months ago

I think it was decided it was more sensible to have this be always on, but it looks like it wasn't removed completely.

mscfd commented 9 months ago

I looked into this option because the procedure call-graphs where stretched far too much because of node labels. Because of the global namespace in fortran, it is typical in f90/95 code to prefix subroutines and functions by something related to the module name, which itself needs to be rather descriptive due to the global namespace. For example:

solver_bicgstab_aux_mod.f90 contains a subroutine solver_bicgstab_setup_vectors

yields a big node with text

solver_bicgstab_aux_mod::solver_bicgstab_setup_vectors

which is not really readable, as the routine already contains almost all the info.

Anyway, I can easily keep this option by local patch.