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

2014-02-27 Thread 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.

What do you think?

Best regards,
Artem.

-- 
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
___
SailfishOS.org Devel mailing list

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

2014-02-27 Thread Thomas Tanghus
On Thursday 27 February 2014 22:21 Martin Kolman wrote:
 27.2.2014 22:10, Artem Marchenko:

  - 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

I am *very* much for this proposal. That way I don't have to maintain several 
copies of the same qml module, but can use a git submodule and just update it 
when needed.

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus
___
SailfishOS.org Devel mailing list