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

Alter ModuleManager to use fparser2 FortranReader? #2597

Open
arporter opened this issue May 24, 2024 · 1 comment
Open

Alter ModuleManager to use fparser2 FortranReader? #2597

arporter opened this issue May 24, 2024 · 1 comment

Comments

@arporter
Copy link
Member

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.

@hiker
Copy link
Collaborator

hiker commented May 29, 2024

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.

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