Build_Flags (dynamic variables) separated in serveral lines (platform.ini)

Hi,

I’m using the dynamic variables section within the paltform.ini very intensive.

[common]
build_flags = -DVERSION="1.2.3" '-DOTAAUTH="secret"' -DDEBUG="1" -DVAR1="1" -DVAR2="2" ....
lib_deps_builtin = SPI, Wire, ...
lib_deps_external = ArduinoJson@>5.6.0, WifiManager, ...

Hence, I would like to use this section separated in several lines per option due to readability reasons:

[common]
build_flags =
              -DVERSION="1.2.3"
              '-DOTAAUTH="secret"'
              -DDEBUG="1"
              -DVAR1="1" 
              -DVAR2="2"
              ....
lib_deps_builtin =
              SPI,
              Wire,
              ...
lib_deps_external =
              ArduinoJson@>5.6.0,
              WifiManager,
              ...

It tested several scenarios and in conclusion you can use comma separated options within different lines (like lib__deps__builtin). Build flags (bulid__flags), which are not comma separated, cannot be used in different lines. You get a compilation error.

Question:

  • Is there another way to get a better readablity within the platform.ini?
  • Will there be a such feature in the future?

Thanks,
GL

Please file a feature request here Issues · platformio/platformio-core · GitHub

moved to platformio core issues

git issues: Build_Flags (dynamic variables) separated in serveral lines (platform.ini) · Issue #889 · platformio/platformio-core · GitHub