Allow skipping the build of the KPackage install handlers when building `frameworkintegration`
ClosedPublic

Authored by ntninja on May 5 2018, 4:07 PM.

Details

Reviewers
dfaure
Summary

Currently building the KPackage install handlers is mandatory when building the frameworkintegration. This package allows them to be disabled if they do not seem useful for the given target environment. Explicit Opt-In is required for this.

Diff Detail

Repository
R252 Framework Integration
Lint
Lint Skipped
Unit
Unit Tests Skipped
ntninja created this revision.May 5 2018, 4:07 PM
Restricted Application added a subscriber: Frameworks. · View Herald TranscriptMay 5 2018, 4:07 PM
ntninja requested review of this revision.May 5 2018, 4:07 PM

Any review of this would be greatly apprechiated…

Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald TranscriptJul 27 2018, 11:30 PM
apol added a subscriber: apol.Jul 28 2018, 8:39 PM

Why would we want to make it optional?
In fact, the only one that is mandatory is the KNS one.

I build a Qt app with „just enough“ KDE-integration for the Flatpak sandbox where I have no use for this KPackage stuff. I know I could just include the install handlers in the build and drop them afterwards, but that would require a build KNS (and all of *its* dependencies) as well. IMHO „only build what you use“ is surpreme in this case.

apol added a comment.Jul 30 2018, 12:25 PM

If you are building a flatpak, please use org.kde.Sdk.

The target application I'm building has only very minimal dependencies on Qt (just QtCore + QtWidgets + PyQt5) and no real dependencies on KDE. The application only has a size footprint of about 6MiB, the required Qt libraries use about 10MiB of space, the selected set of KDE integration libraries (a minimalist build of the KDE plasmaintegration package including dependencies) add another 10MiB. By contrast org.kde.Platform alone adds more than 150MiB in size requirements – this is not acceptable for an app that uses less than 20% percent of its contents IMHO. You can take a look at the project here. I'm planning on making this available as a runtime extension for the FreeDesktop runtime so that other people can reuse it too.

If you're not merging this I'll keep the patch on my side.

dfaure accepted this revision.Aug 1 2018, 9:09 AM
dfaure added a subscriber: dfaure.

We have done similar things in other frameworks, to indeed make it easier to reuse them in contexts where not all dependencies are wanted.
See SONNET_USE_WIDGETS, KSYNTAXHIGHLIGHTING_USE_GUI, KCONFIG_USE_GUI, kxmlgui's FORCE_DISABLE_KGLOBALACCEL, ki18n's BUILD_WITH_QTSCRIPT, KACTIVITIES_LIBRARY_ONLY, KIOCORE_ONLY...

Making KF5 frameworks reusable outside of the KDE community was and is still goal number 1 of the rearchitecture (compared to kdelibs4), so I'd say, yes, this change is good.

This revision is now accepted and ready to land.Aug 1 2018, 9:09 AM

Since these changes have been approved and marked read-to-land for quite some time, could this please be done soon? Thank you!

Ah, you need to specify that you don't have a developer account, otherwise the assumption is simply that you'll push the patch once approved.

I'll land it now.

Thanks, I'll keep that in mind for next time.