-
Notifications
You must be signed in to change notification settings - Fork 223
Description
hey @jvdp1 @jalvesz
The current build configuration process in stdlib utilizes a check for the fypp preprocessor, which is essential for generating Fortran source code from templates. Currently, if the fypp executable is not found in the system PATH, the build terminates with a generic error message directing the user to the documentation. While technically correct, this creates a significant bottleneck for new contributors, particularly those working on Windows environments where Python's Scripts directory (containing fypp.exe) is frequently omitted from the system PATH by default.
I recently encountered this exact issue while setting up the development environment on a Windows 11 machine. Despite having successfully installed fypp via pip, the CMake configuration failed repeatedly because the executable was located in a non-standard roaming directory. Navigating this "silent failure" required several manual overrides and a deep dive into the stdlib.cmake logic, which could discourage potential GSoC applicants or first-time contributors from proceeding with the project.
The proposed solution:
To implement more robust "Defensive Programming" within the preprocess function and the main CMakeLists.txt. Instead of a simple failure message, the build system should provide actionable technical guidance. This includes explicitly suggesting a check for the Python Scripts folder, providing the exact pip install command, and documenting the -DFYPP_EXECUTABLE flag as a manual override. By transforming this fatal error into a diagnostic tool, we can significantly reduce the "Time-to-First-Build" for new developers and ensure a smoother onboarding experience for the community.