privat/nit — pull request #348 by privat (2014-03-18 19:17:16+00:00)
Title: Module paths

This series improve the way the loader identify path.

Now, directories and global projects (those in the NIT_PATH or from -I) can be loaded

Thus, you can write

~~~
$ nitg mytool.nit -m android
~~~

A new tool, `nitls` exposes path identifications to the user than now can list source files, projects, and both in a tree only by looking at the file system (no parsing or whatever)

Eg. what are the projects in the directory lib (-k ignore non nit things)

~~~
$ src/nitls lib/* -k
lib/a_star.nit
lib/android.nit
lib/base64.nit
lib/bcm2835.nit
lib/bucketed_game.nit
lib/console.nit
lib/counter.nit
lib/cpp.nit
lib/csv.nit
lib/curl
lib/curses
lib/dummy_array.nit
lib/egl.nit
lib/filter_stream.nit
lib/for_abuse.nit
lib/glesv2.nit
lib/gpio.nit
lib/gtk.nit
lib/gtk3_4
lib/gtk3_6
lib/gtk3_8
lib/html.nit
lib/json
lib/json_serialization.nit
lib/jvm.nit
lib/md5.nit
lib/mnit
lib/mnit_android
lib/mnit_linux
lib/more_collections.nit
lib/mpd.nit
lib/nitcc_runtime.nit
lib/opts.nit
lib/ordered_tree.nit
lib/pipeline.nit
lib/poset.nit
lib/posix_ext.nit
lib/privileges.nit
lib/realtime.nit
lib/scene2d.nit
lib/serialization.nit
lib/signals.nit
lib/simple_json_reader
lib/socket
lib/sqlite3
lib/standard
lib/symbol.nit
lib/template.nit
lib/x11.nit
~~~

All stuff from standard in a tree

~~~
$ nitls lib/standard/ -r -t
standard
|--collection
| |--lib/standard/collection/abstract_collection.nit
| |--lib/standard/collection/array.nit
| |--lib/standard/collection/collection.nit
| |--lib/standard/collection/hash_collection.nit
| |--lib/standard/collection/list.nit
| |--lib/standard/collection/range.nit
| `--lib/standard/collection/sorter.nit
|--lib/standard/environ.nit
|--lib/standard/exec.nit
|--lib/standard/file.nit
|--lib/standard/gc.nit
|--lib/standard/kernel.nit
|--lib/standard/math.nit
|--lib/standard/posix.nit
|--lib/standard/ropes.nit
|--lib/standard/standard.nit
|--lib/standard/stream.nit
|--lib/standard/string.nit
|--lib/standard/string_search.nit
`--lib/standard/time.nit
~~~