New Contributor: Implemented 'fortran-standard' and 'minimal-version' in fpm

Hi everyone! :waving_hand:

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_t in src/fpm/manifest/package.f90 to deserialize the new string field.

  • Model Layer: Propagated this data into the fpm_model_t type.

  • Compiler Driver: Modified new_compiler_flags in src/fpm.f90 to dynamically append flags. (Currently, I’ve implemented the logic for gfortran to map 2018-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

9 Likes

Brilliant stuff, kudos. All the very best in your undergrad studies, it will be really cool if you participate in GSoC 2026 and contribute to Fortran.

Consider also LFortran and compiler development of modern Fortran facilities, especially toward parallel facilities, generics, and advanced OO with focus on scientific computing.

4 Likes

Thank you so much for the kind words and the guidance!

I am definitely aiming for GSoC 2026. I find the suggestion to look into LFortran very exciting, especially since I have a background in C++ and am interested in how modern compiler infrastructure (LLVM) interacts with Fortran.

The topics you mentioned—specifically Generics and Parallel facilities—sound like challenging but high-impact areas. I will start exploring the LFortran codebase and issue tracker alongside my work on fpm.

Thanks again for the roadmap!

4 Likes

Welcome to the community.

If you’d like to learn more about the generics that are about to be prototyped in LFortran you can check out our “Traits, Generics and Modern-day OOP” proposal for Fortran.

@certik and the LFortran team are presently implementing Fortran’s legacy OO polymorphism to get LFortran to beta status. But once they’re done with this, they will focus quite a bit of their efforts on implementing this proposal. Just contact them if you’re interested.

2 Likes