Build variant of Frameworks on CI: EXCLUDE_DEPRECATED_BEFORE_AND_AT=CURRENT
Closed, WontfixPublic

Description

INTRODUCTION
As part of preparations for KF6 it would be good to have CI keep track of the build variant of all the KF modules where only the code behind the non-deprecated API is built. This should help to ensure that all non-deprecated API is implemented in terms of other non-deprecated API, and help to catch regressions where people forget to properly mark deprecated code sections or accidentally use deprecated API to implement non-deprecated one.

Since some time many KF modules with deprecated API feature support for disabling layers of implementation of deprecated API, using a standardized-across-KF cmake option EXCLUDE_DEPRECATED_BEFORE_AND_AT, with "0" (default), "x.y.z" or "CURRENT" (resolves to current x.y.z version) as values.

WANTED
KDE CI would have an additional build variant of all KF modules not tagged as PORTING_AID where additionally the cmake option -DEXCLUDE_DEPRECATED_BEFORE_AND_AT=CURRENT is passed in to those builds. It should be enough for now to have just one plaform/OS covered, to catch at least any cross-OS issues. SUSEQt5.14 might be an interesting choice (later SUSEQt 5.15, once also available).

kossebau created this task.May 14 2020, 5:34 PM
Restricted Application added a subscriber: sysadmin. · View Herald TranscriptMay 14 2020, 5:34 PM
kossebau closed this task as Wontfix.Aug 27 2020, 5:54 PM
kossebau claimed this task.

Seems this has not been simple to implement, most KF contributors are already challenged to track KDE CI for normal builds, no-one has added to this task, and KF6 splitting is just around the corner anyway (at least I assume people will do that somewhere between Akademy 2020 and targetted Qt 6.0.0 release in December), I drop this request. The occasional local builds done by the few suspected and their follow-up fixes have substituted things good enough.

Any efforts instead might be rather invested in preparing Qt6 build variants next. Myself not available to push for that/help with that right now though.

Apologies for that - it is indeed non-trivial with the current system architecture in Jenkins.

With the move to Gitlab we'll likely look at addressing this weakness for future use.

Supporting Qt 6 with the current setup on the other hand is reasonably straight forward.

Hi @vkrause @ahmadsamir @nicolasfella @alex

With the arrival of gitlab CI, there might be a new chance to revive this idea (please see task description) here to keep some automated track where we are with KF itself depending on own deprecated API in the non-deprecated parts.

I would imagine there would be a separate build family "suse_tumbleweed_qt515_nodeprecated", so all the dependencies are available with all deprecation fully disabled only in that family. For the start this would be KF-only . But might be interesting to extent this later also to other products (applications/libraries) which aim to be on the bleeding edge when it comes to building without deprecated API.

@bcooksley would like to see a good set of people actually considering this a worthwhile thing to have, to prevent other people asking for lots of other random build setups. So please chime in and tell whether you would fancy to have such builds as well.

kossebau reopened this task as Open.Dec 8 2021, 5:39 PM
kossebau updated the task description. (Show Details)Dec 8 2021, 5:56 PM

Another option might be to go directly for Qt6 builds (which imply EXCLUDE_DEPRECATED_BEFORE_AND_AT=CURRENT). The upside of this is that it is something we need long-term anyway, the downside is that we so far have only one module ready for this (I expect this to change shortly though, but possibly not to full KF coverage before branching).

Thinking about it some more, seeing the state of EXCLUDE_DEPRECATED_BEFORE_AND_AT might be also slightly orthogonal to which Qt version is used.

Instead the idea might be rather to make sure that any deprecations are properly done through the whole stack (ideally already when introducing a deprecation) and not only partially and introducing more troubles by having any new replacement API not properly supporting the use-cases of the old API.

E.g. KLazyLocalizedString might have best prepared while also already having the respective patches for the current usages of the I18N* macros, to see whether the new API nicely works for all current usages of those now deprecated macros. Having the EXCLUDE_DEPRECATED_BEFORE_AND_AT builds failing without immediate porting might increase awareness of that workflow.

Oha, I just gave doing a build of KF with EXCLUDE_DEPRECATED_BEFORE_AND_AT a try, and seems there are now lots of places in non-deprecated parts of KF modules which use/rely on deprecated API...

Starting with

  • kservice
  • kglobalaccel
  • knotifications
  • kwallet
  • kio

which then blocked a check of the rest by missing dependencies, so ~23 modules currently are blocked from having a KF-deprecation-free build. Compare that to 3 tier3 modules it was when I checked many months ago.

I already started some patches for kservice, knotifications & kglobalaccel, should be back to turn into MR this late afternoon.

So IMHO we should have some insight here into the state of all of KF where we are with having our own stuff free of deprecated API dependencies,. To avoid creating a new hidden wall of things to do.

If you want to try locally yourself, see here my kdesrc-buildrc content I use for the special build (next to that also needs making sure any normal build installation is not visible to the compiler and thus mixing in, where I have a local hacky setup, so not a good example here)

module-set nodeprecated
    repository kde-projects
    use-modules extra-cmake-modules attica baloo bluez-qt kactivities kactivities-stats karchive kauth kbookmarks kcalendarcore kcmutils kcodecs kcompletion kconfig kconfigwidgets kcontacts kcoreaddons kcrash kdav kdbusaddons kdeclarative kdesu kdnssd kdoctools kemoticons kfilemetadata kglobalaccel kguiaddons kholidays ki18n kiconthemes kidletime kinit kio kitemmodels kitemviews kjobwidgets knewstuff knotifications knotifyconfig kpackage kparts kpeople kplotting kpty kquickcharts krunner kservice ktexteditor ktextwidgets kunitconversion kwallet kwayland kwidgetsaddons kwindowsystem kxmlgui modemmanager-qt networkmanager-qt plasma-framework prison solid sonnet syndication syntax-highlighting threadweaver kirigami kinit kded qqc2-desktop-style

    cmake-options -DBUILD_TESTING=TRUE -DBUILD_QCH=TRUE -DCMAKE_BUILD_TYPE:STRING=debug -DEXCLUDE_DEPRECATED_BEFORE_AND_AT=CURRENT
    build-dir /home/koder/Kode/kdegit/build/nodeprecated
    kdedir /home/koder/System/opt/kf5.nodeprecated
end module-set
kossebau closed this task as Wontfix.Dec 28 2021, 5:16 PM

Seems such insight is nothing people have active interest in it, thus discarding again, makes no sense to setup and maintain something only 1-2 persons would ever use. And fits the lack of other insight overview reports like development of compiler warnings, test results etc., guess the lack of MBAs has not helped to establish a cult around metrics ;)