[SailfishDevel] Harbour rules: request loading libraries from own folders, do not impose rules on the *source code*

Martin Kolman martin.kolman at gmail.com
Thu Feb 27 21:21:57 UTC 2014


27.2.2014 22:10, Artem Marchenko:
> Hi all
>
> As you know harbour rules regarding custom libraries and QML modules 
> require two things:
> 1. Load everything from your app folder
> 2. In your QML import stuff as "import harbour.mycoolapp.desiredmodule"
>
> Rule 1 makes sense for limiting dependency on the system, but rule 2.. 
> Following it needs that at the very least you need modify the plugin's 
> qmldir, often you also have to change the source code of the plugin 
> you use (e.g. some nemomobile plugins have ASSERTs for the folder).
>
> That is not nice and doesn't serve any purpose except for warning you. 
> Also it is easily gameable by just packaging all QMLs into a QRC 
> resource that harbour check script won't parse. That will kill the 
> useful warnings too though..
>
> **Proposal**
> - So lets mandate only what is actually needed: reading libraries from 
> own folder only. Traceable e.g. by strace
> - Let's not mandate the source code to use particular import form
>   - You can still keep the warning as information for the developer 
> and alert for the Harbour tester to check that this or that plugin is 
> loaded exactly from app folders, but it shouldn't fail the validation.
+1 from me on this!

BTW, I'll just add another usecase - QML only modules. You might not 
want to use absolute paths in every QML file using a set of components 
(import "../my-shiny-module"), so you make it to a proper module with 
qmldir and everything and add the folder it is in to QML import path. 
Voila, you can just use "import shiny 1.0", looks better, can't brek 
when moving QML files in folder hierarchy, etc. Under current rules, 
every such _plain QML_ module would need to have the harbour prefix 
hardcoded in - which is IMHO pretty useless and rather stupid.
>
> What do you think?
>
> Best regards,
> Artem.
>
> -- 
> Artem Marchenko
> http://agilesoftwaredevelopment.com
> http://twitter.com/AgileArtem
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140227/4ea76782/attachment.html>


More information about the Devel mailing list