Admin message

Join us at Akademy to celebrate KDE's 30th anniversary! Travel support requests are open till May 31st. Register now.

Yaml format for config
Let's rework the format of config. Currently, the used format (ksb) is a completely custom. This is bad, as no one editor has syntax highlighting for it (except Kate, but that has its own limitation, and is constantly outdated). The reason why I am arising this question now is that, as discussed in Matrix, some people want to stay in kdesrc-build forever, and keeping the module definitions common with kdesrc-build limits the kde-builder for a long time from moving forward (such as implementing project-based deps resolution). So, it was told that we should have separate definitions for kde-builder. And, as in this case definitions files will anyway loose the file history, this is the best time to finally change format to yaml. I prepared the following example of the config, and the same syntax will be used in module-definitions in yaml format. Want to request comments on the format. `kde-builder_config.yaml`: ```yaml # RFC example yaml config # Specify the "version" of the config syntax. For the cases when in the future some fields may change, such as some option was scalar, but then needs to be a list. config-version: 2 global: # variable declaration: _ver: 6 # _build_with_qt6: OFF _build_with_qt6: "ON" # Better quote such value, but we could make that parsable even without quotes. async: true # variable usage: branch-group: kf${_ver}-qt${_ver} # branch-group: kf5-qt5 # branch-group: kf6-qt6 # branch-group: stable-kf5-qt5 # branch-group: stable-kf6-qt6 include-dependencies: true source-dir: ~/kde${_ver}/src build-dir: ~/kde${_ver}/build install-dir: ~/kde${_ver}/usr log-dir: ~/kde${_ver}/log qt-install-dir: ~/kde${_ver}/usr-qt # cmake-options - variant 1 - as a multiline string cmake-options: > -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=${_ver} -DBUILD_WITH_QT6=${_build_with_qt6} -DPython3_FIND_VIRTUALENV=STANDARD -DSOME_OTHER_OPTION="VALUE with space" -DPython3_FIND_UNVERSIONED_NAMES=FIRST num-cores: 10 # num-cores-low-mem auto num-cores-low-mem: 2 cmake-generator: Ninja install-login-session: true # Stop the build process on the first failure stop-on-failure: true # stop-on-failure false # Build with LSP support for everything that supports it compile-commands-export: true compile-commands-linking: true ignore-modules: - gpgme - libgpg-error # Or equivalent in one line (can be used interchangeably): ignore-modules: [custom-qt${_ver}-libs, gpgme] persistent-data-file: ~/kde${_ver}/persistent-options.json generate-vscode-project-config: true generate-clion-project-config: true source-when-start-program: ~/kde6/qt_logging_environment.sh # The key-value dict option set-env: _GLO: "glo val" PKG_CONFIG_PATH: /usr/lib/pkgconfig LD_LIBRARY_PATH: /usr/lib QT_LOGGING_RULES: ark*=true;kf.coreaddons=false;kf.service.services=false;kf.service.sycoca=false;qt.qpa.wayland=false;kf.moretools=false;default=false # dict git-repository-base: qt6-copy: https://invent.kde.org/qt/qt/ something: something/ # for now, as a string configure-flags: "configure-flags --enable-maintainer-mode --enable-languages=cpp,qt6 --disable-gpgconf-test --disable-gpg-test --disable-gpgsm-test --disable-g13-test" # for now, as a string do-not-compile: one two three # for now, as a string make-install-prefix: "one two" # for now, as a string ninja-options: "-j 99" # for now, as a string qmake-options: "-j 99" # for now, as a string make-options: "-j 99" phase-selection: # candidate for combining with filter-out-phases - no-src - build-only - no-install - no-tests !include ${module-definitions-dir}/kf${_ver}-qt${_ver}.yaml # Another include. Should not indicate "duplicate key error". !include ${module-definitions-dir}/kf${_ver}-qt${_ver}_2.yaml # Declaration of a module (i.e. it does not exist in standard module definitions) crashinator: repository: kde:sitter/crashinator.git # Module-sets syntax. Variant 1 - with trailing "/" frameworks/: repository: kde-projects use-modules: - frameworks/* - kcalc - dolphin ignore-modules: - graphics/* - kdelibs4support - kdewebkit - kdesignerplugin - kemoticons - kxmlrpcclient cmake-options: > -DBUILD_WITH_QT6=ON # Module-sets syntax. Variant 2 - with "< >" brackets <frameworks>: use-modules: - one - two - three ignore-modules: - kdelibs4support - kdewebkit - khtml - kjsembed # Module-sets syntax. Variant 3 - with "( )" surrounding. (frameworks): use-modules: - one - two - three # Replacement for "options kompare" +kompare: set-env: SomeVar: some-val +qt6-set: source-dir: ~/kde6/src-qt build-dir: ~/kde6/build-qt branch: dev +kcoreaddons: # Another way for cmake-options. As a list. cmake-options: - -DCMAKE_BUILD_TYPE=Debug - -DQT_MAJOR_VERSION=${_ver} # comment in the middle of list - -DBUILD_WITH_QT6=${_build_with_qt6} - -DPython3_FIND_VIRTUALENV=STANDARD # comment in the end of line - -DPython3_FIND_UNVERSIONED_NAMES=FIRST +kio: branch: "1.2" # quoting to force string type. # "+" (options) can also apply to module set (project group). +frameworks: ignore-modules: - kcalc # Possibly, it may be a bit confusing in that if it is applying to module or module-set (the same as with options block now). # We can optionally allow trailing slash to indicate the module-set (just for human readability): +frameworks/: ignore-modules: - kcalc ``` Tagging people that probably are interested to discuss this: @duha @merritt @bcooksley @tcanabrava @thiagosueto @nclarius
issue