ford icon indicating copy to clipboard operation
ford copied to clipboard

show_proc_parent is ignored

Open mscfd opened this issue 1 year ago • 2 comments

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?

mscfd avatar Feb 28 '24 06:02 mscfd

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

ZedThree avatar Feb 28 '24 09:02 ZedThree

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.

mscfd avatar Feb 28 '24 10:02 mscfd