Hi everyone! ![]()
My name is Aditya, and I’m a CS undergrad at IIIT Bhopal. I’ve recently been diving into the internal architecture of fpm to understand how modern build systems handle package manifests and compiler drivers.
I noticed a few open issues regarding project configuration and wanted to share my experience implementing solutions for them. I’ve submitted two PRs, and I’d love some feedback from the community.
1. Enforcing Fortran Standards (feat: Add support for 'fortran-standard' in fpm.toml by Adityazzzzz · Pull Request #1216 · fortran-lang/fpm · GitHub)
Addresses Issue #1131
Previously, passing a standard flag (like -std=f2018) required manually editing compiler flags every time. I’ve added a fortran-standard field to the fpm.toml manifest.
The Implementation:
-
Manifest Layer: I updated
package_config_tinsrc/fpm/manifest/package.f90to deserialize the new string field. -
Model Layer: Propagated this data into the
fpm_model_ttype. -
Compiler Driver: Modified
new_compiler_flagsinsrc/fpm.f90to dynamically append flags. (Currently, I’ve implemented the logic forgfortranto map2018→-std=f2018, but it’s extensible for Intel/NAG).
2. Minimal Version Constraints (feat: implement minimal-version check in fpm.toml by Adityazzzzz · Pull Request #1215 · fortran-lang/fpm · GitHub)
Addresses Issue #1194
To prevent obscure build errors when using older fpm versions, I added a check that compares the current CLI version against a minimal-version specified in the package manifest. If the user’s fpm is too old, it now halts with a clean, descriptive error message before attempting the build.
What I learned: This was a great introduction to the deserialization pipeline and the “Manifest → Model → Backend” architecture of fpm. I was particularly interested in how fpm abstracts compiler differences, and I hope to help extend the standard-flag support to other compilers like ifx in the future.
I am keenly interested in contributing more to the Fortran ecosystem and am hoping to participate in GSoC 2026. If there are other high-priority areas in fpm (or related tools) that need attention, please let me know!
Thanks, Aditya