Kross module loading is broken since KF5.0.0
Alexander Potashev
aspotashev at gmail.com
Mon May 11 16:37:53 UTC 2015
Hello,
It all started this morning when I wanted to translate some Kwave in Lokalize...
Long story short, while porting Kross from kdelibs4 into a KF5
framework there was a commit [1] that broke module loading.
I'll tell you why it broke module loading. The commit was about naming
of libraries/plugins, it also included renaming of Kross modules - for
example "krossmoduleforms" renamed to "KrossModuleForms". When a
script needs a module, it requests it by its name, for example
"forms". Then a piece of common code in the Kross framework prepends
"krossmodule" to this name and the respective shared library is
loaded. When module "forms" is requested, it loads
"krossmoduleforms.so". Now the library is installed as
"KrossModuleForms.so" and thus cannot be found with this procedure.
Possible solutions:
1. Revert back to lowercase names for Kross modules. This is what I
prefer, because of full compatibility with kdelibs4. How badly we want
camel case library names in KF5?
2. Fix module loader in Kross framework so that it prepends
"KrossModule" and probably also somehow capitalize the module short
name to make "KrossModuleForms" from "forms". But how to do that if a
module name consists of several words like "KdeTranslation"? If we
only prepend "KrossModule", then all the scripts from the KDE4 age
will be broken because they may request module "forms", not "Forms".
3. Make module names case insensitive. This can be implemented in
Kross framework by listing and filtering directory contents instead of
checking for a specific file. It will be slower and this looks like a
hack to me.
[1] http://commits.kde.org/kdelibs/aed219f6b04252e4c74e6df5419f64d9e50b89d4
--
Alexander Potashev
More information about the Kde-frameworks-devel
mailing list