Merge: Conditional importation
authorJean Privat <jean@pryen.org>
Wed, 22 Jul 2015 14:21:05 +0000 (10:21 -0400)
committerJean Privat <jean@pryen.org>
Wed, 22 Jul 2015 14:21:05 +0000 (10:21 -0400)
First quick and dirty implementation for #1579.
Since the loader is due to a full rewrite (cf #1250), some part were implemented as simple as possible.

It is only a technology preview. A lot of thing are missing including the following:

* do not error if the modules in the rules are not present (eg optional modules not installed). Not an issue currently since all the modules are present in the repository.
* show warnings for useless condition to help the programmer
* implement some visibility rules. `public` is assumed even if it makes no sense and cause issues
* understand qualified modules in the conditions

The last issue might be the more limiting currently as only the conditional module understand qualified names. the potential qualified names in the arguments are accepted but just ignored.
Basically `toto` is ignored in `import foo::bar is conditional(toto::tata)`.

Pull-Request: #1580
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>


Trivial merge