Merge: Loader refactor
authorJean Privat <jean@pryen.org>
Mon, 19 Oct 2015 12:50:24 +0000 (08:50 -0400)
committerJean Privat <jean@pryen.org>
Mon, 19 Oct 2015 12:50:24 +0000 (08:50 -0400)
commit7743ff7bb65c42ce0c56445fcfb15e3f0987d61e
treecfdf4ef794ed9c6867f64f0b33c3b09ce0fa819e
parent801b7228a5046ec5751d9b93e3d2655a38970427
parentf7ae0ac46d7b824be8862f90d99589d522fce232
Merge: Loader refactor

A big refactorization of the loader

This include cleanup, renaming and documentation of the existing code.

The major change is the removal of `ModulePath` used to designate an identified module that is not yet loaded. This caused major issues since once the module was loaded, the MModule object has to be used instead.
Now, genuine `MModule` are used to also represent modules identified in the file system but not yet loaded.
This simplify the code of the loader, nitls and nitcatalog.

By the way, the option `-d` (and `-M`) of nitls that was broken by the previous changes in the loader is now fixed.

Another change is the introduction of `scan_full` that is a high-level method to be used by clients like nitls or nitcatalog that just need to identify packages, groups and modules in the filesystem without loading them.

By the way, nitcalatog works on directories of projects now. eg. `nitcatalog ../lib)

Note, because this PR introduces a lot of interrelated changes, It was hard to come up with nice commits. The alternative was to have a single big commit.

Pull-Request: #1750
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
contrib/online_ide/sources/nit/pnacl_nit.nit