Possibly remove defaulting values in flit-config.toml
#254
Labels
documentation
Involves touching documentation
enhancement
python
Involves touching python code
question
tests
Involves touching tests
Feature Request
Describe the new feature:
When values are missing in
flit-config.toml
, much effort has been taken to give decent default values, such as takingg++
,clang++
andicpc
from the systemPATH
and handling missing ones gracefully. However, with issue #93 (Fortran support) and adding other languages, the configuration file is becoming much more complex. It is becoming increasingly difficult to handle giving intuitive defaults with a configuration file that is both backward compatible and handling new features.I think moving forward, it is unmaintainable to handle missing values for compilers and compiler collections. The other fields are possible to have as default values, but trying to specify which fields are required and which are not may or may not be easy to do. This is something that needs to be addressed to make FLiT easy to use, understand, and maintain.
Suggested change:
I suggest making all fields required in the
flit-config.toml
. This is easier to specify to the user that everything is needed rather than trying to be clean which ones are or are not. This approach has some benefits:flit-config.toml
based on the user environment rather than hard-coded default values. This makes for potentially more user-friendly without making it opaqueThere are some consequences of such an approach:
flit-config.toml
. The configuration file becomes verbose.Alternative approaches:
The main alternative approach is to pick and choose which values in the configuration file are required and which are not. It would have the following benefits:
flit-config.toml
would not necessarily constitute a breaking change. It would only be a breaking change if that added field were a required field.flit-config.toml
based on the user environment rather than hard-coded default values for the required fields. The non-required fields would have hard-coded default values (such as enabling MPI) which are specified in the default Toml file.And the following consequences:
Currently, I believe the following fields (after #93 is accepted) would need to be required:
[dev_build]
: all fields[ground_truth]
: all fields[[compiler]]
: all fields (except mayberequired_flags
,ld_flags
,optimization_levels
, andswitches_list
)[[compiler_collection]]
: all fields (except, I think thelangs
field is maybe not even necessary to have)Discussion:
I am not fully convinced that my proposed approach is better than the alternative approach listed above. If you have an opinion or even another alternative approach, please discuss in this issue.
The text was updated successfully, but these errors were encountered: