PSyclone icon indicating copy to clipboard operation
PSyclone copied to clipboard

Alter ModuleManager to use fparser2 FortranReader?

Open arporter opened this issue 1 year ago • 1 comments

In #2564 I've extended the ModuleManager to use a regex on the contents of a file in order to determine whether it contains a given module. However, that could be defeated if someone was to choose to do, e.g.:

module & ! something perverse
    my_mod

The simplest solution may be just to use fparser's FortranReader as that will handle comments, line continuations and include files. Hopefully this would add much cost on top of just reading the file as we do now.

arporter avatar May 24 '24 07:05 arporter

While this is true, my feeling is that we should focus on improvements in usability first, and we can tackle this issue if we actually have source code that has the problem. Yes, not perfect, but we only have limited resources :(

We have many new users (thanks to NG-ARCH), and we already had one case where people just can't find the reason for an error and needed our help. There are some existing tickets (e.g. getting code-blocks instead of PSyIR, which is not immediately obvious), and maybe we need to add some script-design tips (use stdout and stderr appropriately? Then we need to make sure PSyclone does the same :) ). That should be a much higher priority imho.

hiker avatar May 29 '24 14:05 hiker