toolcontext: add `usage` and `tooldescription`

Signed-off-by: Jean Privat <jean@pryen.org>
toolcontext: process_option honor --help and check options errors

Signed-off-by: Jean Privat <jean@pryen.org>
toolcontext: add an honor accept_no_arguments

Signed-off-by: Jean Privat <jean@pryen.org>
src: rename `nit_version.nit` as `version.nit`

the `nit` prefix is reserved for commands.

Signed-off-by: Jean Privat <jean@pryen.org>
toolcontext: honor --version

Signed-off-by: Jean Privat <jean@pryen.org>
src: rename `nitdbg_commons` as `debugger_commons`

the `nit` prefix is reserved for commands.

Signed-off-by: Jean Privat <jean@pryen.org>
src: rename `dbgcli` and `netdbg` as `nitdbg_{client,server}`

the `nit` prefix is reserved for commands.

Signed-off-by: Jean Privat <jean@pryen.org>
makefile: build nitdbg_* tools

Because the ffi works again!

Signed-off-by: Jean Privat <jean@pryen.org>
src: update tools to the new toolcontext helpers on option processing

Specify a tooldescription
Get rid of manual management of most arguments error

Signed-off-by: Jean Privat <jean@pryen.org>
tests: update sav/ for tools

Signed-off-by: Jean Privat <jean@pryen.org>
toolcontext: `process_options` require arguments.

Having it to access directly `sys.args` broke some isolation concerns.

This commit also updates all tools to avoid breakage.

Signed-off-by: Jean Privat <jean@pryen.org>
modelbuilder: `run_global_phases` takes an array of modules

Instead of a single module.
Thus it can creates itself the implicit bottom module if required.

Signed-off-by: Jean Privat <jean@pryen.org>
modelbuilder: add parameter `given_mmodules` to `Phase::process_mainmodule`

`given_modules` is the list of explicitely requested modules.
From the command-line for instance.

Thus, global phases can chose to work with the bottom main module or
with each specific given modules.

Signed-off-by: Jean Privat <jean@pryen.org>
metrics/generate_hier: project_hierarchy.dot use given_mmodules

Instead of using the first loaded project

Signed-off-by: Jean Privat <jean@pryen.org>
tests: add src/test_phase

Signed-off-by: Jean Privat <jean@pryen.org>
test_phase: provide a simpler way to implement POC of nit tools

Signed-off-by: Jean Privat <jean@pryen.org>
src: new example tool test_test_phase.nit

This module could be shown to first-time contributors (like students)
that need to implement some proof of concept.

Signed-off-by: Jean Privat <jean@pryen.org>
tests: add src/test_test_phase

Signed-off-by: Jean Privat <jean@pryen.org>