[CMake and run time dependencies] Re: Do not split QML packages

Nate Graham nate at kde.org
Tue Aug 15 06:19:05 BST 2023


On 8/12/23 13:31, Lisandro Damian Nicanor Perez Meyer wrote:
> And by the way:
> 
> On viernes, 11 de agosto de 2023 11:38:53 -03 Carl Schwan wrote:
> [snip]
>> Merkuro correctly bumped the dependency in its cmakelists.txt file to depend
>> on Kirigami Addons 0.9 which should have ensured that the module is
>> installed.
> 
> CMake can only express build time dependencies. QML files are **not** required
> at build time. Run time dependencies are sadly not easy to grab from QML files,
> or at least there is no "correct methodology", like you would have on C++
> libraries with NEEDED entries.

It's fairly common for runtime QML modules to get missed by packagers 
and result in runtime breakage for users. The more QML libraries get 
sliced-and-diced into tiny parts, the more opportunities there are for 
this to happen.

In fact, it's for this reason that some of our QML-based apps even 
specify their runtime dependencies as build-time dependencies. This may 
not be technically accurate, but it solves the problem by getting 
packagers' attention when something fails to build.

Ultimately our goal is to ship quality software to users and I think 
it's important to not lose sight of that. If policies are impairing this 
goal, I think it's worth changing them.

Nate


More information about the Distributions mailing list