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

Explicitly providing free-form extensions does not override fixed-form default extensions #686

Open
banana-bred opened this issue Jan 25, 2025 · 1 comment
Labels

Comments

@banana-bred
Copy link

I'm building a project with fpm and am using the fpm.toml file as my ford project file for now. Everything is modern free-form Fortran, but I have the ".f" extension which is automatically reserved for fixed-form. I figured that

[extra.ford]
extensions = ["f"]

would be enough instead of renaming my files to a free-form default, but this does nothing to prevent my files from being read as fixed-form. It seems that this is because I did nothing to change the default value of the fixed_extensions list, which overrides my free-form choice. Is this the expected behavior ? This part of my project file now looks like

[extra.ford]
extensions = ["f"]
fixed_extensions = []

which is a very simple fix, but I still find it strange that a default value from another array (fixed_extensions) takes precedence here.

@ZedThree
Copy link
Member

Thanks for the bug report @banana-bred! I think this is expected, the way it currently works is that a file is treated as fixed form if its extension appears in fixed_extensions.

I think we could quite easily check if an extension is in both lists and remove it from fixed if it is.

@ZedThree ZedThree added the bug label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants