nit.git
8 years agotyping: move vararg_length on each argument, instead of the whole signature
Jean Privat [Tue, 10 Nov 2015 14:45:58 +0000 (09:45 -0500)]
typing: move vararg_length on each argument, instead of the whole signature

This will permit to have more that one vararg per call.

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

8 years agoMerge: More keepgoing
Jean Privat [Sat, 7 Nov 2015 17:38:47 +0000 (12:38 -0500)]
Merge: More keepgoing

Another small serie about robustness.

Now all files in tests (including alts), except one, do not make `nipick` crash.
This should improve the quality of error messages in vim.

Pull-Request: #1816
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agoMerge: More contributors
Jean Privat [Sat, 7 Nov 2015 17:38:45 +0000 (12:38 -0500)]
Merge: More contributors

add metadata `package.more_contributors` for lib/core and lib/nitcorn.

Pull-Request: #1815
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agoMerge: nitcorn: fix bug with binary files
Jean Privat [Sat, 7 Nov 2015 17:38:40 +0000 (12:38 -0500)]
Merge: nitcorn: fix bug with binary files

Downloading binary files from a nitcorn server works as expected once again.

The API should be enough for most users but there is a few features lacking. Namely alternating custom text with files and writing custom data. We could merge the `body` and `files` attributes into a sequence of `Bytables` to send, with support for `Bytes`.

You can test the result on xymus.net, either by downloading the latest WBTW at http://xymus.net/pub/wbtw-v0.4-110-g668b261.tar.gz or by playing a clone of Super Hexagon (mostly made by @ablondin) at http://xymus.net/pub/hex/.

Pull-Request: #1817
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agolib/nitcorn/examples: customize server listening port
Alexis Laferrière [Fri, 18 Sep 2015 20:57:14 +0000 (16:57 -0400)]
lib/nitcorn/examples: customize server listening port

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/nitcorn/examples: rename the simple_file_server example
Alexis Laferrière [Fri, 18 Sep 2015 20:57:32 +0000 (16:57 -0400)]
lib/nitcorn/examples: rename the simple_file_server example

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/nitcorn: use `files` and thus fix transferring binary data
Alexis Laferrière [Sat, 19 Sep 2015 13:04:23 +0000 (09:04 -0400)]
lib/nitcorn: use `files` and thus fix transferring binary data

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/nitcorn: intro `HttpResponse::files` to append files
Alexis Laferrière [Sat, 19 Sep 2015 13:03:56 +0000 (09:03 -0400)]
lib/nitcorn: intro `HttpResponse::files` to append files

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/libevent: add `read|write_buffer`
Alexis Laferrière [Sat, 7 Nov 2015 13:42:46 +0000 (08:42 -0500)]
lib/libevent: add `read|write_buffer`

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/libevent: implement missing `write_bytes` in `Connection`
Alexis Laferrière [Sat, 19 Sep 2015 12:37:07 +0000 (08:37 -0400)]
lib/libevent: implement missing `write_bytes` in `Connection`

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/libevent: update write_file
Alexis Laferrière [Sat, 19 Sep 2015 13:02:45 +0000 (09:02 -0400)]
lib/libevent: update write_file

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/core: fill `package.more_contributors` metadata as git lost track since renaming...
Jean Privat [Sat, 7 Nov 2015 01:47:40 +0000 (20:47 -0500)]
lib/core: fill `package.more_contributors` metadata as git lost track since renaming (d7f15922adeef40)

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

8 years agonitcorn: improve the README a little
Jean Privat [Sat, 7 Nov 2015 04:56:31 +0000 (23:56 -0500)]
nitcorn: improve the README a little

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

8 years agotests: improve error tests on --keep-going by adding usage of broken things
Jean Privat [Sat, 7 Nov 2015 04:47:26 +0000 (23:47 -0500)]
tests: improve error tests on --keep-going by adding usage of broken things

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

8 years agotyping: skip error message when dealing with bottom types
Jean Privat [Sat, 7 Nov 2015 04:45:39 +0000 (23:45 -0500)]
typing: skip error message when dealing with bottom types

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

8 years agosrc: use `toolcontext.quit` instead of rogue `exit`
Jean Privat [Sat, 7 Nov 2015 04:13:17 +0000 (23:13 -0500)]
src: use `toolcontext.quit` instead of rogue `exit`

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

8 years agotoolcontext: add `ToolContext::quit` to perform a correct shutdown of the program
Jean Privat [Sat, 7 Nov 2015 04:08:24 +0000 (23:08 -0500)]
toolcontext: add `ToolContext::quit` to perform a correct shutdown of the program

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

8 years agotyping: AForBlock propagates error to the main AForExpr
Jean Privat [Sat, 7 Nov 2015 03:42:40 +0000 (22:42 -0500)]
typing: AForBlock propagates error to the main AForExpr

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

8 years agomodelize_class: do not rely on number of errors since things are more robust
Jean Privat [Sat, 7 Nov 2015 03:26:33 +0000 (22:26 -0500)]
modelize_class: do not rely on number of errors since things are more robust

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

8 years agonitcorn: add package.more_contributors metadata
Jean Privat [Sat, 7 Nov 2015 01:39:29 +0000 (20:39 -0500)]
nitcorn: add package.more_contributors metadata

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

8 years agonitcatalog: implements `package.more_contributors` per specification
Jean Privat [Sat, 7 Nov 2015 01:28:21 +0000 (20:28 -0500)]
nitcatalog: implements `package.more_contributors` per specification

I tough I did it, but it seems that no.

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

8 years agoMerge: JSON fix
Jean Privat [Sat, 7 Nov 2015 00:58:32 +0000 (19:58 -0500)]
Merge: JSON fix

As @xymus reported in #1796, this PR should fix the aforementioned issue by closing an old TODO in `RopeBuffer::add` that was only supporting ASCII services.

At the same time, some cleanup was done in JSON to use properly our new Unicode-oriented strings that were worked around until now.

Closes #1796

Pull-Request: #1797
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agotests: Updated existing + added new test for escaping in JSON
Lucas Bajolet [Fri, 6 Nov 2015 20:02:27 +0000 (15:02 -0500)]
tests: Updated existing + added new test for escaping in JSON

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agotext/ropes: Fix broken byte iterator in Buffer
Lucas Bajolet [Mon, 2 Nov 2015 16:06:57 +0000 (11:06 -0500)]
text/ropes: Fix broken byte iterator in Buffer

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agotext/ropes: Fixed `RopeBuffer::add` when dealing with something other than an ASCII...
Lucas Bajolet [Fri, 30 Oct 2015 15:23:45 +0000 (11:23 -0400)]
text/ropes: Fixed `RopeBuffer::add` when dealing with something other than an ASCII character

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agojson/static: Replaced uses of write_to_string by to_s since it benefits from copy...
Lucas Bajolet [Fri, 30 Oct 2015 15:24:24 +0000 (11:24 -0400)]
json/static: Replaced uses of write_to_string by to_s since it benefits from copy-on-write mechanisms

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agojson/static: Fixed Unicode escaping in JSON read code
Lucas Bajolet [Fri, 30 Oct 2015 15:22:27 +0000 (11:22 -0400)]
json/static: Fixed Unicode escaping in JSON read code

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agocore/flat: Fix bug in `FlatBuffer::substring`
Lucas Bajolet [Mon, 2 Nov 2015 22:04:22 +0000 (17:04 -0500)]
core/flat: Fix bug in `FlatBuffer::substring`

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agocore/text: Added UTF-16 escape coding/decoding methods
Lucas Bajolet [Mon, 2 Nov 2015 17:16:46 +0000 (12:16 -0500)]
core/text: Added UTF-16 escape coding/decoding methods

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agoMerge: Introduced xoring of String and a sequence of Bytes
Jean Privat [Fri, 6 Nov 2015 01:46:37 +0000 (20:46 -0500)]
Merge: Introduced xoring of String and a sequence of Bytes

Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>

Pull-Request: #1814
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agoOptimized SequenceRead instantiation with fixed length in Text.xor
Philippe Pepos Petitclerc [Thu, 5 Nov 2015 20:20:17 +0000 (15:20 -0500)]
Optimized SequenceRead instantiation with fixed length in Text.xor

Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>

8 years agoMoved crypto services from String to Text
Philippe Pepos Petitclerc [Thu, 5 Nov 2015 20:17:23 +0000 (15:17 -0500)]
Moved crypto services from String to Text

Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>

8 years agoIntroduced xoring of String and a sequence of Bytes
Philippe Pepos Petitclerc [Thu, 5 Nov 2015 19:22:28 +0000 (14:22 -0500)]
Introduced xoring of String and a sequence of Bytes

Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>

8 years agoMerge: Intro `Task` and use in for Android's `run_on_ui_thread`
Jean Privat [Thu, 5 Nov 2015 15:13:53 +0000 (10:13 -0500)]
Merge: Intro `Task` and use in for Android's `run_on_ui_thread`

The `Task` interface defines a fragment of Nit code to execute in its `main` method. This interface should be compatible between different platforms and parallelization engines.

`NativeActivity::run_on_ui_thread` is widely used on Android as most logic is executed on background threads but only the UI thread can modify the UI. It is a perfect example of how the `Task` interface can be used.

Future work include using `Task` in `pthreads` and `gtk::gdk`. But there a a few differences in the logic that makes it not as easy: `Thread::main` returns a `nullable object`, but is it worth keeping it? `GdkRunnable::run` returns a boolean to tell GDK if it should be called again.

Pull-Request: #1812
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>

8 years agoMerge: lib/gtk: add services from GTK+ 3.10 and rename some core services
Jean Privat [Thu, 5 Nov 2015 15:13:51 +0000 (10:13 -0500)]
Merge: lib/gtk: add services from GTK+ 3.10 and rename some core services

Services from v3.10 includes the `HeaderBar` (the large window top bar with custom buttons) and the `Stack` which shows only 1 widget at a time with transition effects. The renamed services use the same name as in C.

Pull-Request: #1809
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agocontrib/nitester: rename local class Task to TesterTask
Alexis Laferrière [Wed, 4 Nov 2015 00:34:51 +0000 (19:34 -0500)]
contrib/nitester: rename local class Task to TesterTask

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agotests & lib/ui: update gtk users
Alexis Laferrière [Tue, 3 Nov 2015 15:55:22 +0000 (10:55 -0500)]
tests & lib/ui: update gtk users

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/gtk: intro threading system of GDK
Alexis Laferrière [Wed, 28 Oct 2015 12:45:02 +0000 (08:45 -0400)]
lib/gtk: intro threading system of GDK

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/gtk: add more services to gtk_core
Alexis Laferrière [Wed, 28 Oct 2015 12:45:21 +0000 (08:45 -0400)]
lib/gtk: add more services to gtk_core

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/gtk: intro new services from GTK+ 3.10
Alexis Laferrière [Mon, 26 Oct 2015 19:05:21 +0000 (15:05 -0400)]
lib/gtk: intro new services from GTK+ 3.10

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/gtk: rename gtk life-cycle methods, and other, to their C counter parts
Alexis Laferrière [Wed, 28 Oct 2015 00:32:24 +0000 (20:32 -0400)]
lib/gtk: rename gtk life-cycle methods, and other, to their C counter parts

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agotests: update tests relying on the content of core
Alexis Laferrière [Tue, 3 Nov 2015 20:09:30 +0000 (15:09 -0500)]
tests: update tests relying on the content of core

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/android: intro `NativeActivity::run_on_ui_thread`
Alexis Laferrière [Tue, 3 Nov 2015 17:34:34 +0000 (12:34 -0500)]
lib/android: intro `NativeActivity::run_on_ui_thread`

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/core: intro `Task`
Alexis Laferrière [Tue, 3 Nov 2015 17:42:31 +0000 (12:42 -0500)]
lib/core: intro `Task`

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agoversion 0.7.9 v0.7.9
Jean Privat [Sat, 31 Oct 2015 14:29:06 +0000 (10:29 -0400)]
version 0.7.9

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

8 years agoMerge: Bench strings update
Jean Privat [Thu, 29 Oct 2015 19:04:02 +0000 (15:04 -0400)]
Merge: Bench strings update

A few things happening here:

* Added some line-producing output to `bench_plot.sh`, use both functions to produce lines instead of histograms
* `bench_strings.sh` underwent a few transformations: now you can try with different values of `maxlen` (threshold at which a flat concatenation produces a new Concat node instead of a new FlatString), you can also work on HEAD only with a new option, also, all benches now produce lines instead of histograms

Pull-Request: #1795
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agoMerge: Robust Virtual Type
Jean Privat [Thu, 29 Oct 2015 19:04:00 +0000 (15:04 -0400)]
Merge: Robust Virtual Type

Improve the handling of inconsistent model when virtual types are badly defined.

The changes are mainly done with 2 things:

* still register broken `type` definition in the property, so that properties have at least a definition
* use bottom type (also called the absurd type) to indicate inconsistency in the model (instead of aborting)

Reported-by: @Morriar

Pull-Request: #1791
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agoMerge: lib/trees: more services and documentation
Jean Privat [Thu, 29 Oct 2015 19:03:55 +0000 (15:03 -0400)]
Merge: lib/trees: more services and documentation

Add `depth` and `Comparable` services to abstract Trees.

Also enhance the abstract_tree module documentation.

Pull-Request: #1787
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agobenches: String benches now produce line graphs, HTML and can be used to test differe...
Lucas Bajolet [Thu, 29 Oct 2015 18:59:22 +0000 (14:59 -0400)]
benches: String benches now produce line graphs, HTML and can be used to test different variations of `maxlen`

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agobench_plot.sh: Fix indentation in prepare_res
Lucas Bajolet [Thu, 29 Oct 2015 19:00:09 +0000 (15:00 -0400)]
bench_plot.sh: Fix indentation in prepare_res

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agobench_plot: Added line-producing plot functions
Lucas Bajolet [Wed, 28 Oct 2015 20:16:54 +0000 (16:16 -0400)]
bench_plot: Added line-producing plot functions

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agoMerge: nitc can inline redefinitions with -D
Jean Privat [Thu, 29 Oct 2015 12:36:46 +0000 (08:36 -0400)]
Merge: nitc can inline redefinitions with -D

nitc with --global and --semi-global tries to inline things, but methods with an explicit `constant_value` (i.e. defined with `-D`) were not recognized when asked: ``can I inline this?''

The inlining itself does not require specific code.

Close #1793

Pull-Request: #1794
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agotests: add error_redef_vt
Jean Privat [Wed, 28 Oct 2015 16:06:36 +0000 (12:06 -0400)]
tests: add error_redef_vt

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

8 years agotests: update sav for VT related tests
Jean Privat [Wed, 28 Oct 2015 16:05:20 +0000 (12:05 -0400)]
tests: update sav for VT related tests

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

8 years agomodelize: Gracefully handle virtual types without definition in `check_virtual_types_...
Jean Privat [Wed, 28 Oct 2015 16:04:51 +0000 (12:04 -0400)]
modelize: Gracefully handle virtual types without definition in `check_virtual_types_circularity`

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

8 years agomodelizey: continue processing broken redef virtual type
Jean Privat [Wed, 28 Oct 2015 16:03:33 +0000 (12:03 -0400)]
modelizey: continue processing broken redef virtual type

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

8 years agomodelize_property: use bottom type to mark invalid VT bounds
Jean Privat [Wed, 28 Oct 2015 16:01:35 +0000 (12:01 -0400)]
modelize_property: use bottom type to mark invalid VT bounds

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

8 years agomodel: in case of error, methods of MVirtualType return a bottomtype
Jean Privat [Wed, 28 Oct 2015 15:58:07 +0000 (11:58 -0400)]
model: in case of error, methods of MVirtualType return a bottomtype

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

8 years agomodel: handle BottomType in `is_subtype`
Jean Privat [Wed, 28 Oct 2015 15:50:45 +0000 (11:50 -0400)]
model: handle BottomType in `is_subtype`

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

8 years agotests: test nitc with -D and --semi-global
Jean Privat [Wed, 28 Oct 2015 20:01:47 +0000 (16:01 -0400)]
tests: test nitc with -D and --semi-global

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

8 years agoabstract_compiler: can inline methods with `constant_value` (defined with -D)
Jean Privat [Wed, 28 Oct 2015 19:58:56 +0000 (15:58 -0400)]
abstract_compiler: can inline methods with `constant_value` (defined with -D)

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

8 years agoMerge: examples/shoot: fix typo in shoot_linux synopsys
Jean Privat [Wed, 28 Oct 2015 17:02:50 +0000 (13:02 -0400)]
Merge: examples/shoot: fix typo in shoot_linux synopsys

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

Pull-Request: #1789
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agoMerge: introduce nit_env.sh to setup the shell environement
Jean Privat [Wed, 28 Oct 2015 17:02:28 +0000 (13:02 -0400)]
Merge: introduce nit_env.sh to setup the shell environement

The script `nit_env.sh` tries to auto-magically configure PATH, MANPATH and bash completion for users. The point is to be as portable and simple a possible for the final used has he just has to write

~~~
$ source misc/nit_env.sh
~~~

and get a working setup.

Moreover, if `install` in given as argument, then the script register itself to the user `$HOME/.profile`.

~~~
$ source misc/nit_env.sh install
~~~

One advantage is that the script invocation is registered in `.profile`, thus future evolutions of the script will be automatically used in future sessions of the users.

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

8 years agoexamples/shoot: fix typo in shoot_linux synopsys.
Alexandre Terrasa [Tue, 27 Oct 2015 19:08:59 +0000 (15:08 -0400)]
examples/shoot: fix typo in shoot_linux synopsys.

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

8 years agoMakefile: talk about nit_env.sh after successful `make all`
Jean Privat [Thu, 22 Oct 2015 18:12:32 +0000 (14:12 -0400)]
Makefile: talk about nit_env.sh after successful `make all`

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

8 years agoREADME: document nit_env.sh
Jean Privat [Thu, 22 Oct 2015 14:55:34 +0000 (10:55 -0400)]
README: document nit_env.sh

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

8 years agomisc: add `nit_env.sh` to auto-magically configure shell environements
Jean Privat [Thu, 22 Oct 2015 14:53:09 +0000 (10:53 -0400)]
misc: add `nit_env.sh` to auto-magically configure shell environements

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

8 years agoMerge: benitlux: produce better reports
Jean Privat [Mon, 26 Oct 2015 13:55:10 +0000 (09:55 -0400)]
Merge: benitlux: produce better reports

This PR adds customizable width to the graph generated by the benitlux report tool and displays short lived beer batches. Previously, some beers could not appear if they lasted less than a week on the menu.

Pull-Request: #1786
Reviewed-by: Jean Privat <jean@pryen.org>

8 years agoMerge: Update readme
Jean Privat [Mon, 26 Oct 2015 13:55:07 +0000 (09:55 -0400)]
Merge: Update readme

Just a refresh on the README content as it is what is shown in github

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

8 years agoMerge: Opportunity: intro ∇ ratio
Jean Privat [Mon, 26 Oct 2015 13:55:04 +0000 (09:55 -0400)]
Merge: Opportunity: intro ∇ ratio

Add the ∇ ratio to Opportunity with a customizable multiplier. It assigns weight to the choices of participants so that someone who select all possible answers puts less weight on each answer, and someone who choses a single answer puts her full weight on it.

It can be used to count the number of pizzas to order (with a multiplier of 0.4) and to give more importances to the available times of busy people when scheduling a meeting.

Pull-Request: #1783
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agolib/trees: enhance AbstractTreeNode documentation
Alexandre Terrasa [Fri, 11 Sep 2015 16:58:58 +0000 (12:58 -0400)]
lib/trees: enhance AbstractTreeNode documentation

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

8 years agolib/trees: add generic and usefull services in TreeMapNode
Alexandre Terrasa [Sat, 24 Oct 2015 22:52:14 +0000 (18:52 -0400)]
lib/trees: add generic and usefull services in TreeMapNode

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

8 years agolib/trees: clean whitespaces
Alexandre Terrasa [Thu, 3 Sep 2015 21:47:36 +0000 (17:47 -0400)]
lib/trees: clean whitespaces

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

8 years agocontrib/benitlux: select the width of the report with an argument
Alexis Laferrière [Thu, 24 Sep 2015 21:47:05 +0000 (17:47 -0400)]
contrib/benitlux: select the width of the report with an argument

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agocontrib/benitlux: report shows beers available between sample days
Alexis Laferrière [Fri, 23 Oct 2015 15:45:59 +0000 (11:45 -0400)]
contrib/benitlux: report shows beers available between sample days

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib: intro Collection::has_any
Alexis Laferrière [Fri, 23 Oct 2015 16:29:58 +0000 (12:29 -0400)]
lib: intro Collection::has_any

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agoMerge: Less null warnings in src/
Jean Privat [Thu, 22 Oct 2015 18:15:12 +0000 (14:15 -0400)]
Merge: Less null warnings in src/

Some small warning reductions while wandering in the source code of src/

Pull-Request: #1782
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agoMerge: More lib/html optimizations
Jean Privat [Thu, 22 Oct 2015 18:15:10 +0000 (14:15 -0400)]
Merge: More lib/html optimizations

Lazily create structures for attributes and children as most HTML nodes do not have them.

User time for `time ./nitlight ../lib -d out`:

* before 0m8.196s
* after 0m6.940s (-15%)

Pull-Request: #1780
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agoDeprecate the Changelog.
Jean Privat [Thu, 22 Oct 2015 12:55:33 +0000 (08:55 -0400)]
Deprecate the Changelog.

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

8 years agoupdate root README
Jean Privat [Thu, 22 Oct 2015 12:52:14 +0000 (08:52 -0400)]
update root README

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

8 years agoMakefile: `all` generate manpages as `pandoc` is no more required
Jean Privat [Thu, 22 Oct 2015 14:00:30 +0000 (10:00 -0400)]
Makefile: `all` generate manpages as `pandoc` is no more required

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

8 years agoMerge: Generalize `MModule::is_fictive` to any entity
Jean Privat [Thu, 22 Oct 2015 00:45:44 +0000 (20:45 -0400)]
Merge: Generalize `MModule::is_fictive` to any entity

Extends #1776 (so first commits include them)

Pull-Request: #1781
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

8 years agoMerge: Cleanup and synchronize options in manpages
Jean Privat [Thu, 22 Oct 2015 00:45:40 +0000 (20:45 -0400)]
Merge: Cleanup and synchronize options in manpages

A tedious work to detect and fix undocumented options in the manpages of tools.
This also synchronizse the description of `--help` and the text in manpages (when there is a diversion, the best one if often selected).

Cherry on the cake: a new script `check_manpage` can automatically check that new options of tools are documented in the man. Close #1772

Pull-Request: #1778
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

8 years agoMerge: Introduce model_visitor
Jean Privat [Thu, 22 Oct 2015 00:45:37 +0000 (20:45 -0400)]
Merge: Introduce model_visitor

As requested, this is a basic visitor framework on models.
Services names are inspired from those in the AST visitor.

Fell free to comment the API or suggest ideas.

Pull-Request: #1776
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agomodelviz: make the LinexComparator more robust by getting the model from a non-nullab...
Jean Privat [Thu, 22 Oct 2015 00:34:01 +0000 (20:34 -0400)]
modelviz: make the LinexComparator more robust by getting the model from a non-nullable object

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

8 years agomodel_viz: handle groups without filepaths.
Jean Privat [Thu, 22 Oct 2015 00:33:05 +0000 (20:33 -0400)]
model_viz: handle groups without filepaths.

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

8 years agomodel: hint the semantize phases that `exit` does not return
Jean Privat [Thu, 22 Oct 2015 00:32:30 +0000 (20:32 -0400)]
model: hint the semantize phases that `exit` does not return

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

8 years agoniti: protect some NPE errors
Jean Privat [Thu, 22 Oct 2015 00:31:37 +0000 (20:31 -0400)]
niti: protect some NPE errors

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

8 years agoglobal_compiler: remove a useless local variable
Jean Privat [Thu, 22 Oct 2015 00:31:01 +0000 (20:31 -0400)]
global_compiler: remove a useless local variable

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

8 years agosrc: remove some `call on nullable` warning with a non-null local variable
Jean Privat [Thu, 22 Oct 2015 00:30:33 +0000 (20:30 -0400)]
src: remove some `call on nullable` warning with a non-null local variable

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

8 years agoopportunity: intro pizza ratio
Alexis Laferrière [Wed, 21 Oct 2015 22:33:52 +0000 (18:33 -0400)]
opportunity: intro pizza ratio

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agooppurtunity: focus on #new_name
Alexis Laferrière [Wed, 21 Oct 2015 19:47:47 +0000 (15:47 -0400)]
oppurtunity: focus on #new_name

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agoopportunity: count entries in JavaScript on load
Alexis Laferrière [Wed, 21 Oct 2015 17:23:36 +0000 (13:23 -0400)]
opportunity: count entries in JavaScript on load

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agoMerge: remove some unwanted files
Jean Privat [Wed, 21 Oct 2015 21:52:26 +0000 (17:52 -0400)]
Merge: remove some unwanted files

Pull-Request: #1779
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>

8 years agoMerge: Fix `-e` and `-n` on nit
Jean Privat [Wed, 21 Oct 2015 21:52:23 +0000 (17:52 -0400)]
Merge: Fix `-e` and `-n` on nit

These options where broken, and nobody complained.
Now they works again.

Pull-Request: #1777
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agomodel_visitor: skip fictive entities by default
Jean Privat [Wed, 21 Oct 2015 20:30:08 +0000 (16:30 -0400)]
model_visitor: skip fictive entities by default

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

8 years agomodelize: special lazy attribute is tagged fictive
Jean Privat [Wed, 21 Oct 2015 20:29:19 +0000 (16:29 -0400)]
modelize: special lazy attribute is tagged fictive

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

8 years agomodel: move-up `is_fictive` from MModule to MEntity
Jean Privat [Wed, 21 Oct 2015 20:20:40 +0000 (16:20 -0400)]
model: move-up `is_fictive` from MModule to MEntity

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

8 years agotests: skip test_model_visitor on nitc --global
Jean Privat [Tue, 20 Oct 2015 23:48:04 +0000 (19:48 -0400)]
tests: skip test_model_visitor on nitc --global

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

8 years agosrc/nituml: fix `Model::tpl_*` since it is now a MEntity
Jean Privat [Tue, 20 Oct 2015 22:24:36 +0000 (18:24 -0400)]
src/nituml: fix `Model::tpl_*` since it is now a MEntity

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