Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module/submodule procedure's description not showing in FORD's Procedures webpage Description field #502

Open
patflynngithub opened this issue Apr 4, 2023 · 1 comment

Comments

@patflynngithub
Copy link

patflynngithub commented Apr 4, 2023

I'm dealing here with procedures defined in a module interface, but with their body code given in a submodule. I'm experiencing a quirk with where these procedure's autodoc comments are displayed in the FORD-generated doc.

Initially, I only had the procedure headers autodoc commented in the submodule. However, FORD doesn't seem to display FORD Procedures webpage entries for procedures in submodules (thereby, doesn't display those procedure header's autodoc comments), but does display ones for their interface definitions in the module. Not what I wanted, but I dutifully moved my submodule procedure header autodoc comments over to their equivalent interface definitions in the module. However, while these autodoc comments now show up on the individual procedure's interface webpage, they don't show up in the FORD Procedures webpage Description column even though the procedure's interface is listed there.

a_routine       a_module         Interface

So, this means that the procedure's header's autodoc comment can only be seen when looking at its procedure interface webpage.

module a_module
  interface
    !> a_routine interface entry comment
    module subroutine a_routine(int_value)
      integer, intent(in) :: int_value
    end subroutine a_routine
  end interface
end module a_module
---
SEPARATE submodule file
!> a_routine submodule
submodule (a_module) a_routine_submod
contains
  !> a_routine submodule entry comment
  module procedure a_routine
     write (*,*) "a_routine:", int_value
  end procedure a_routine
end submodule a_routine_submod
@ZedThree
Copy link
Member

ZedThree commented May 5, 2023

I think there's two separate issues here:

  1. the interface's description doesn't appear in the list of procedures, this seems to only be true for module procedures
  2. if display: private is set (either at the project level, or in the submodule), then links between the module procedure's interface and its implementation are created:

image

image

The first issue is a bug -- I also think it would be better to have it appear as "module procedure" rather than "interface". I'll look into it.

The second one is a consequence of entities in submodules being private by default, and this applies to implementations of module procedures as well. I think this is sensible as submodules are designed to hide implementation details, so only the documentation for the public interface should be shown by default. If you want to have extra developer-only documentation on the implementation, you could enable that with display: private -- making this easier to document public vs private and user vs developer APIs was also raised in #473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants