nit.git
5 years agocontrib/nitin: protect README doc units
Alexandre Terrasa [Mon, 14 May 2018 18:11:56 +0000 (14:11 -0400)]
contrib/nitin: protect README doc units

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

5 years agocontrib/brainfuck: protect README doc units
Alexandre Terrasa [Mon, 14 May 2018 18:11:49 +0000 (14:11 -0400)]
contrib/brainfuck: protect README doc units

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

5 years agocontrib/nitiwiki: protect non-nit code blocks in README
Alexandre Terrasa [Sun, 13 May 2018 20:35:44 +0000 (16:35 -0400)]
contrib/nitiwiki: protect non-nit code blocks in README

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

5 years agocontrib/wiringPi: fix `shift` module name
Alexandre Terrasa [Sun, 13 May 2018 18:48:46 +0000 (14:48 -0400)]
contrib/wiringPi: fix `shift` module name

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

5 years agolib/core: remove BufferedReader
Lucas Bajolet [Sun, 13 May 2018 13:55:27 +0000 (09:55 -0400)]
lib/core: remove BufferedReader

Since the streams are often already buffered in the libraries we depend
upon, and since it is not used anymore on streams present in the
librarires, we remove it.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agoMerge: lib/config: better tool configuration
Jean Privat [Sat, 12 May 2018 01:10:41 +0000 (21:10 -0400)]
Merge: lib/config: better tool configuration

This PR reworks some aspects of the `lib/config`:
* Add option `-?` as help
* Introduce `--stub-man` option (almost the same thing than in `ToolContext`)
* Make `nitmd` use `config` instead of `opts`
* Define a better `tool_description` for `github/loader`

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

6 years agoMerge: doc/commands: introduce Markdown rendering for commands
Jean Privat [Sat, 12 May 2018 01:10:40 +0000 (21:10 -0400)]
Merge: doc/commands: introduce Markdown rendering for commands

This PR introduces Markdown rendering for all DocCommands.

Also adds tests.

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

6 years agoMerge: Trace system
Jean Privat [Sat, 12 May 2018 01:10:40 +0000 (21:10 -0400)]
Merge: Trace system

To install lttng: https://lttng.org/docs/v2.10/#doc-installing-lttng

To compile using the trace system: add -t or --trace

To test tracing some instances :
lttng create "Nom de la session"
lttng enable-event --userspace Nit_Compiler:Object_Instance
lttng start
--> run your program
lttng stop

To read your CTF trace file:
babeltrace ~/lttng-traces/nom_de_la_session

define TRACEPOINT_INCLUDE "/home/olivier/Bureau/nit/src/nit_compile/traces.h"
This instruction is located into traces.h. You have to adapt it with your specific path.
The dynamical version is the object of the next PR.

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

6 years agotests: fix tests related to new config options display
Alexandre Terrasa [Fri, 11 May 2018 22:07:02 +0000 (18:07 -0400)]
tests: fix tests related to new config options display

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

6 years agoMerge: macOS: skip one of the nitpm tests because of locale issues
Jean Privat [Fri, 11 May 2018 20:01:27 +0000 (16:01 -0400)]
Merge: macOS: skip one of the nitpm tests because of locale issues

The test `nitpm_arg3` exposes an output from Git. It looks like there is locale issue on the macOS CI server changing the output and breaking the tests.

Test diff:
~~~
--- sav//nitpm_args3.res 2018-04-05 22:14:54.000000000 -0400
+++ out/nitpm_args3.res 2018-05-11 02:59:58.000000000 -0400
@@ -1 +1 @@
-Already up-to-date.
+Already up to date.
~~~

I didn't find a clear cause after a quick investigation. This PR as a temporary workaround, feel free to investigate and PR a real fix!

Pull-Request: #2675

6 years agoMerge: opportunity: add a docker-compose.yml file
Jean Privat [Fri, 11 May 2018 20:01:21 +0000 (16:01 -0400)]
Merge: opportunity: add a docker-compose.yml file

Pull-Request: #2677

6 years agoMerge: Small improvements on the oot.sh script
Jean Privat [Fri, 11 May 2018 20:01:18 +0000 (16:01 -0400)]
Merge: Small improvements on the oot.sh script

Pull-Request: #2676

6 years agoMerge: File no buffered
Jean Privat [Fri, 11 May 2018 20:01:08 +0000 (16:01 -0400)]
Merge: File no buffered

Still as part of the Stream refactor, this commit removes the BufferedReader dependency for FileReader.

Note: last commit only to review, the previous one is from #2648

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

6 years agoMerge: Added HTTP METHODS to CurlHTTPRequest
Jean Privat [Fri, 11 May 2018 20:01:08 +0000 (16:01 -0400)]
Merge: Added HTTP METHODS to CurlHTTPRequest

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

6 years agoMerge: Bitmap fix missing checks
Jean Privat [Fri, 11 May 2018 20:01:06 +0000 (16:01 -0400)]
Merge: Bitmap fix missing checks

Some checks were missing after fixing some warnings in PR #2658, we add these checks here.

Note: the last commit only is relevant, the other comes from #2658

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

6 years agoMerge: lib/socket: remove BufferedReader superclass
Jean Privat [Fri, 11 May 2018 20:01:05 +0000 (16:01 -0400)]
Merge:  lib/socket: remove BufferedReader superclass

Since BufferedReader is scheduled for removal, we remove it as superclass from the TCPSocket.

As the TCPSocket will be buffered at the system-level, it is not a big problem for performance.

Note: Last commit is to be reviewed only, the others are from #2648

Pull-Request: #2665

6 years agoMerge: Fix Reader::read
Jean Privat [Fri, 11 May 2018 20:01:04 +0000 (16:01 -0400)]
Merge: Fix Reader::read

With the stream refactor being developed and tested alongside, some buggy behaviours are being discovered.
This PR fixes one of such, where calling read on a dead stream caused the program to segfault.

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

6 years agolib/core: add blocking eof implementation
Lucas Bajolet [Wed, 9 May 2018 01:54:07 +0000 (21:54 -0400)]
lib/core: add blocking eof implementation

eof is a problematic operation for Streams as its state may be decided
by reading input (in sockets for instance).

Because of that, operations relying on it may read one extra byte at the
end of a file, causing the apparition of bad characters (null byte, or
replacement character).

By changing the semantic of eof and making it blocking, we ensure that
querying eof will always produce the appropriate error.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agolib/core: fix read_bytes_to_cstring implementation
Lucas Bajolet [Thu, 10 May 2018 21:49:47 +0000 (17:49 -0400)]
lib/core: fix read_bytes_to_cstring implementation

When reading bytes from both the lookahead and a source, the lookahead
bytes were not kept in the cstring and we re-written by the
raw_read_bytes after that.

This commit fixes that behaviour.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agolib/core: remove BufferedReader as file superclass
Lucas Bajolet [Mon, 7 May 2018 14:48:15 +0000 (10:48 -0400)]
lib/core: remove BufferedReader as file superclass

Since files are already buffered at the libc-level, we do not need to
have a BufferedReader on top of it.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agoopportunity: add a docker-compose.yml file
Jean Privat [Fri, 11 May 2018 16:38:06 +0000 (12:38 -0400)]
opportunity: add a docker-compose.yml file

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

6 years agoadd the trace system with a first test which is instance tracing
olivierschirm [Wed, 9 May 2018 20:09:22 +0000 (16:09 -0400)]
add the trace system with a first test which is instance tracing

Signed-off-by: olivierschirm <olive.schirm@gmail.com>

6 years agocontrib/oot.sh: allow an optional list argument
Jean Privat [Fri, 11 May 2018 15:12:52 +0000 (11:12 -0400)]
contrib/oot.sh: allow an optional list argument

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

6 years agocontrib/oot.sh: do not error if no makefile
Jean Privat [Fri, 11 May 2018 15:11:54 +0000 (11:11 -0400)]
contrib/oot.sh: do not error if no makefile

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

6 years agolib/github: define better `tool_description` for loader
Alexandre Terrasa [Tue, 8 May 2018 22:19:53 +0000 (18:19 -0400)]
lib/github: define better `tool_description` for loader

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

6 years agolib/markdown: nitmd use `config` instead of `options`
Alexandre Terrasa [Tue, 8 May 2018 22:19:25 +0000 (18:19 -0400)]
lib/markdown: nitmd use `config` instead of `options`

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

6 years agolib/config: introduce --stub-man option
Alexandre Terrasa [Tue, 8 May 2018 22:18:52 +0000 (18:18 -0400)]
lib/config: introduce --stub-man option

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

6 years agolib/config: add `-?` option as help
Alexandre Terrasa [Tue, 8 May 2018 02:54:00 +0000 (22:54 -0400)]
lib/config: add `-?` option as help

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

6 years agodoc/commands: introduce Markdown rendering for commands
Alexandre Terrasa [Thu, 3 May 2018 16:42:03 +0000 (12:42 -0400)]
doc/commands: introduce Markdown rendering for commands

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

6 years agomacOS: skip one of the nitpm tests because of locale issues
Alexis Laferrière [Fri, 11 May 2018 14:41:45 +0000 (10:41 -0400)]
macOS: skip one of the nitpm tests because of locale issues

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

6 years agoMerge: docker: nitpm requires libcurl, move it up from `full`
Jean Privat [Fri, 11 May 2018 14:33:36 +0000 (10:33 -0400)]
Merge: docker: nitpm requires libcurl, move it up from `full`

This PR should fix the compilation of the nitlang/nit Docker which was broken since adding nitpm.

See: https://hub.docker.com/r/nitlang/nit/builds/bgtphmftqbdp9o7eqhqzn9f/

I've activated email alerts on hub.docker.com to hopefully catch these problems sooner next time.

Pull-Request: #2672

6 years agolib/websocket: refactor websocket as a Protocol
Lucas Bajolet [Wed, 9 May 2018 16:07:40 +0000 (12:07 -0400)]
lib/websocket: refactor websocket as a Protocol

Websocket can be re-implemented as a Protocol to be implemented atop a
TCP stream.

This refactor should be more memory-efficient when handling incoming
data.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agolib/socket: remove BufferedReader superclass
Lucas Bajolet [Tue, 8 May 2018 19:26:53 +0000 (15:26 -0400)]
lib/socket: remove BufferedReader superclass

Since BufferedReader is scheduled for removal, we remove it as a
superclass from the TCPSocket.

As the TCPSocket will be buffered at the system-level, it is not a big
problem for performance.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agolib/core: add protocols for decorator streams
Lucas Bajolet [Wed, 9 May 2018 17:18:51 +0000 (13:18 -0400)]
lib/core: add protocols for decorator streams

Protocol are a class of streams designed to be decorators over others
and provide a high-level interface to protocols.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agodocker: nitpm requires libcurl, move it up from `full`
Alexis Laferrière [Fri, 11 May 2018 11:26:47 +0000 (07:26 -0400)]
docker: nitpm requires libcurl, move it up from `full`

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

6 years agolib/core: add failsafe to UTF8Codec::decode_string
Lucas Bajolet [Fri, 11 May 2018 00:50:14 +0000 (20:50 -0400)]
lib/core: add failsafe to UTF8Codec::decode_string

Calling decode_string on the UTF-8 codec with a negative legth would
cause memmove to crash the program with a segfault.

Adding an assert gives more information on what went wrong and will help
investigate future bugs.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agolib/core: fix Reader::read
Lucas Bajolet [Fri, 11 May 2018 00:48:31 +0000 (20:48 -0400)]
lib/core: fix Reader::read

Reader::read would crash if trying to read from an empty socket, as the
codec::decode_string would be called with a negative length.

We add a failsafe to prevent that.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agolib/bitmap: fix unchecked error while reading bytes
Lucas Bajolet [Tue, 8 May 2018 13:57:33 +0000 (09:57 -0400)]
lib/bitmap: fix unchecked error while reading bytes

The `read_byte` method from `Reader` may return a negative int if an
error is encountered while reading.

This was not checked in lib/bitmap, we therefore add it.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agolib/bitmap: fix warnings
Alexandre Terrasa [Tue, 8 May 2018 13:43:10 +0000 (09:43 -0400)]
lib/bitmap: fix warnings

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

6 years agoMerge: android: remove the deprecated armeabi target platform
Jean Privat [Fri, 11 May 2018 03:14:25 +0000 (23:14 -0400)]
Merge: android: remove the deprecated armeabi target platform

Android NDK tools do not support the armeabi target platform anymore, breaking the compilation of all Nit app for Android. This PR removes this target, fixing our compilation issues. This platform version should not be active anywhere, it was widely replaced by armeabi-v7a.

Unless you update the Android SDK tool, compiling Nit apps for Android should still work on your machine and the CI server. However, it fails on the Nit docker, as with:
https://gitlab.com/xymus/darpg/-/jobs/67649353
https://gitlab.com/Skyline76/memory_gamnit/-/jobs/67571796

Pull-Request: #2671

6 years agoMerge: lib/crypto: add in-place xor cipher on CStrings
Jean Privat [Fri, 11 May 2018 03:14:18 +0000 (23:14 -0400)]
Merge: lib/crypto: add in-place xor cipher on CStrings

The xor operation as defined in xor_ciphers lacked a performance-aware
version on byte sequences.

This commit adds a fast version to perform it on a CString.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

Pull-Request: #2669

6 years agoMerge: lib: add `package.desc` keys to the `package.ini` file of most of the packages...
Jean Privat [Fri, 11 May 2018 03:13:52 +0000 (23:13 -0400)]
Merge: lib: add `package.desc` keys to the `package.ini` file of most of the packages in `lib`

This PR adds a `package.desc` key to all `package.ini` files into `lib/`.

For most of them the description is imported from the `mdoc_or_fallback.synopsis` with some light modifications (removing the starting `#` and the trailing `.`).

After this automated fix, 5 packages still missed the `package.desc` key:
* `dummy_array`
* `filter_stream`
* `graph`
* `mnit`
* `postgresql`

I manually added the key for `graph` and `postgresql`, so after this PR only 3 packages still miss the key:
* `dummy_array`
* `filter_stream`
* `mnit`

Pull-Request: #2667

6 years agoMerge: lib/core/text: add memset to `CString`
Jean Privat [Fri, 11 May 2018 03:13:51 +0000 (23:13 -0400)]
Merge: lib/core/text: add memset to `CString`

Memset is an operation used for setting bytes to a particular value.

Since it was not defined on CStrings, we add it.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

Pull-Request: #2668

6 years agoandroid: remove the deprecated armeabi target
Alexis Laferrière [Fri, 11 May 2018 02:01:35 +0000 (22:01 -0400)]
android: remove the deprecated armeabi target

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

6 years agoMerge: lib/core: provide default codec-aware read_char
Jean Privat [Thu, 10 May 2018 22:46:06 +0000 (18:46 -0400)]
Merge: lib/core: provide default codec-aware read_char

Previous implementations of read_char were unaware of codec issues, and
used to read a byte and convert it to a code point.

For ASCII characters this was enough, but once unicode characters were
read on a char-by-char basis, wrong characters would appear.

This commit fixes this issue by using the Codec API to read a character
intelligently, and properly support multibyte encodings.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

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

6 years agoMerge: doc/commands: introduce `main` related commands
Jean Privat [Thu, 10 May 2018 22:46:06 +0000 (18:46 -0400)]
Merge: doc/commands: introduce `main` related commands

This PR introduce new doc commands related to executable files:
* `CmdMains`: list all executable files from a package
* `CmdMainCompile`: return the `nitc` command to compile an executable file
* `CmdTesting`: return the `nitunit` command to test a package
* `CmdManSynopsis`: return the command synopsis from its manpage
* `CmdManOptions`: return the command options descriptions from its manpage

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

6 years agoMerge: json: rename and improve the quick and easy `deserialize_json`
Jean Privat [Thu, 10 May 2018 22:46:05 +0000 (18:46 -0400)]
Merge: json: rename and improve the quick and easy `deserialize_json`

Rename the service `String::from_json_string` to a nicer `deserialize_json`. I believe that the old name was counter-intuitive and may explain why the method was used so rarely/never.

Add the argument `static_type` to `deserialize_json` to limit the type of objects that can be deserialized. This argument is passed directly to the JSON deserializer.

The method `deserialize_json` still prints errors to the console, so it should be used for quick prototypes or scripts.

This could make prettier and safer examples in #2655.

Pull-Request: #2664

6 years agolib/core: provide default codec-aware read_char
Lucas Bajolet [Mon, 7 May 2018 14:45:21 +0000 (10:45 -0400)]
lib/core: provide default codec-aware read_char

Previous implementations of read_char were unaware of codec issues, and
used to read a byte and convert it to a code point.

For ASCII characters this was enough, but once unicode characters were
read on a char-by-char basis, wrong characters would appear.

This commit fixes this issue by using the Codec API to read a character
intelligently, and properly support multibyte encodings.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agoniti: fix CString::fast_cstring semantics
Lucas Bajolet [Tue, 8 May 2018 16:01:30 +0000 (12:01 -0400)]
niti: fix CString::fast_cstring semantics

The old implementation of CString::fast_cstring used to create a new
CString instance instead of sharing the underlying buffer.

This in turn caused code relying on this semantic to fail as the memory
was not re-initialized properly.

This commit fixes this behaviour by introducing a new cstring
constructor specific for the VM and Interpreter.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agotests: fix tests related to test_prog
Alexandre Terrasa [Tue, 8 May 2018 01:56:15 +0000 (21:56 -0400)]
tests: fix tests related to test_prog

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

6 years agodoc/commands: term handles `commands_main`
Alexandre Terrasa [Wed, 2 May 2018 23:34:43 +0000 (19:34 -0400)]
doc/commands: term handles `commands_main`

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

6 years agodoc/commands: render `commands_main` as JSON
Alexandre Terrasa [Wed, 2 May 2018 23:20:39 +0000 (19:20 -0400)]
doc/commands: render `commands_main` as JSON

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

6 years agodoc/commands: render `commands_main` as HTML
Alexandre Terrasa [Wed, 2 May 2018 23:20:19 +0000 (19:20 -0400)]
doc/commands: render `commands_main` as HTML

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

6 years agodoc/commands: parse `commands_main`
Alexandre Terrasa [Wed, 2 May 2018 23:18:04 +0000 (19:18 -0400)]
doc/commands: parse `commands_main`

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

6 years agodoc/commands: introduce `commands_main`, commands about main programs
Alexandre Terrasa [Wed, 2 May 2018 23:17:26 +0000 (19:17 -0400)]
doc/commands: introduce `commands_main`, commands about main programs

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

6 years agolib/crypto: add in-place xor cipher on CStrings
Lucas Bajolet [Thu, 10 May 2018 18:18:49 +0000 (14:18 -0400)]
lib/crypto: add in-place xor cipher on CStrings

The xor operation as defined in xor_ciphers lacked a performance-aware
version on byte sequences.

This commit adds a fast version to perform it on a CString.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agoAdded HTTP METHODS to CurlHTTPRequest
Matthieu Le Guellaut [Thu, 10 May 2018 15:08:40 +0000 (11:08 -0400)]
Added HTTP METHODS to CurlHTTPRequest

Signed-off-by: Matthieu Le Guellaut <leguellaut.matthieu@gmail.com>

6 years agolib/core/text: add memset to `CString`
Lucas Bajolet [Thu, 10 May 2018 18:17:39 +0000 (14:17 -0400)]
lib/core/text: add memset to `CString`

Memset is an operation used for setting bytes to a particular value.

Since it was not defined on CStrings, we add it.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agolib: manually add `package.desc` keys to some packages
Alexandre Terrasa [Thu, 10 May 2018 16:37:24 +0000 (12:37 -0400)]
lib: manually add `package.desc` keys to some packages

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

6 years agolib: generate `package.desc` keys to all packages
Alexandre Terrasa [Thu, 10 May 2018 16:31:08 +0000 (12:31 -0400)]
lib: generate `package.desc` keys to all packages

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

6 years agodoc/commands: allow NitUnit entities in model view
Alexandre Terrasa [Wed, 2 May 2018 23:19:49 +0000 (19:19 -0400)]
doc/commands: allow NitUnit entities in model view

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

6 years agomodel_collect: collect all mmodules for a mgroup
Alexandre Terrasa [Mon, 7 May 2018 21:02:21 +0000 (17:02 -0400)]
model_collect: collect all mmodules for a mgroup

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

6 years agotests/test_prog: add a dummy test suite
Alexandre Terrasa [Wed, 2 May 2018 23:16:30 +0000 (19:16 -0400)]
tests/test_prog: add a dummy test suite

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

6 years agotests/test_prog: add a dummy man page
Alexandre Terrasa [Wed, 2 May 2018 23:16:20 +0000 (19:16 -0400)]
tests/test_prog: add a dummy man page

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

6 years agoMerge: src/nit: remove unused primitive_types module
Jean Privat [Wed, 9 May 2018 00:03:17 +0000 (20:03 -0400)]
Merge: src/nit: remove unused primitive_types module

The primitive_types module contained legacy native file IO methods which
were unused in the current interpreter.

Since it is not necessary anymore, we remove it.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

Pull-Request: #2660

6 years agoMerge: lib/actors: uniformize Makefile names with the rest of the Nit project
Jean Privat [Wed, 9 May 2018 00:02:55 +0000 (20:02 -0400)]
Merge: lib/actors: uniformize Makefile names with the rest of the Nit project

Some of the `actors` Makefile where named `makefile`, this looks weird compared to all others Makefiles in the Nit project.

This PR renames them.

Pull-Request: #2661

6 years agoMerge: doc/commands: introduce INI commands
Jean Privat [Wed, 9 May 2018 00:02:42 +0000 (20:02 -0400)]
Merge: doc/commands: introduce INI commands

This PR introduces commands related to `package.ini` files:
* `CmdIniDescription`: return the package description from the `package.ini` file
* `CmdIniGitUrl`: return the package Git URL from the `package.ini` file
* `CmdIniCloneCommand`: return the package `git clone` command from the `package.ini` file
* `CmdIniIssuesUrl`: return the package issues URL from the `package.ini` file
* `CmdIniMaintainer`: return the maintainer name from the `package.ini` file
* `CmdIniContributors`: return the contributors list from the `package.ini` file
* `CmdIniLicense`: return the license string from the `package.ini` file
* `CmdLicenseFile` and `CmdLicenseFileContent`: return the LICENSE.md file and its content
* `CmdContribFile` and `CmdContribFileContent`: return the CONTRIBUTING.md file and its content

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

6 years agoMerge: nitpackage: generate ini files
Jean Privat [Wed, 9 May 2018 00:02:34 +0000 (20:02 -0400)]
Merge: nitpackage: generate ini files

This PR replace the old `nit-makepackage` sheel script by an option in the `nitpackage` tool.

`nitpackage` is now able to generate `package.ini` files automatically with the following command:

```sh
nitpackage lib/ --gen-ini
```

As examples, I provide two generated ini files:
* `lib/fca/package.ini`
* `lib/vsm/package.ini`

Both file were generated with `nitpackage`, I only edited manually the `tags` and `desc` keys.

Please ignore the three first commits as they belong to #2652.

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

6 years agoMerge: lib/ini: better output
Jean Privat [Wed, 9 May 2018 00:02:31 +0000 (20:02 -0400)]
Merge: lib/ini: better output

This PR changes three things:
* remove `nullable` warnings
* keep the keys in the same order than they are added to the config file
* group keys in the ini output

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

6 years agojson: rename and improve the quick and easy `deserialize_json`
Alexis Laferrière [Tue, 8 May 2018 23:52:02 +0000 (19:52 -0400)]
json: rename and improve the quick and easy `deserialize_json`

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

6 years agotests: fix test for `test_sort_perf`
Alexandre Terrasa [Tue, 8 May 2018 01:36:28 +0000 (21:36 -0400)]
tests: fix test for `test_sort_perf`

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

6 years agonitweb: remove old and useless `doc` view
Alexandre Terrasa [Wed, 2 May 2018 23:41:45 +0000 (19:41 -0400)]
nitweb: remove old and useless `doc` view

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

6 years agonitweb: add HTML view for ini commands
Alexandre Terrasa [Wed, 2 May 2018 23:41:26 +0000 (19:41 -0400)]
nitweb: add HTML view for ini commands

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

6 years agonitweb: serve routes for ini commands
Alexandre Terrasa [Wed, 2 May 2018 23:41:03 +0000 (19:41 -0400)]
nitweb: serve routes for ini commands

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

6 years agodoc/commands: term handles `commands_ini`
Alexandre Terrasa [Wed, 2 May 2018 23:40:42 +0000 (19:40 -0400)]
doc/commands: term handles `commands_ini`

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

6 years agodoc/commands: render `commands_ini` as JSON
Alexandre Terrasa [Wed, 2 May 2018 23:40:23 +0000 (19:40 -0400)]
doc/commands: render `commands_ini` as JSON

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

6 years agodoc/commands: render `commands_ini` as HTML
Alexandre Terrasa [Wed, 2 May 2018 23:40:06 +0000 (19:40 -0400)]
doc/commands: render `commands_ini` as HTML

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

6 years agodoc/commands: parse `commands_ini`
Alexandre Terrasa [Wed, 2 May 2018 23:39:39 +0000 (19:39 -0400)]
doc/commands: parse `commands_ini`

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

6 years agodoc/commands: introduce `commands_ini` for .INI related commands
Alexandre Terrasa [Wed, 2 May 2018 23:39:14 +0000 (19:39 -0400)]
doc/commands: introduce `commands_ini` for .INI related commands

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

6 years agonitpackage: update man page
Alexandre Terrasa [Mon, 7 May 2018 20:31:19 +0000 (16:31 -0400)]
nitpackage: update man page

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

6 years agonitpackage: add option to check existing package.ini files
Alexandre Terrasa [Tue, 8 May 2018 00:51:58 +0000 (20:51 -0400)]
nitpackage: add option to check existing package.ini files

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

6 years agolib/popcorn: remove unknown ini key `version`
Alexandre Terrasa [Tue, 8 May 2018 00:47:34 +0000 (20:47 -0400)]
lib/popcorn: remove unknown ini key `version`

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

6 years agolib: update INI files with for expanded paths
Alexandre Terrasa [Tue, 8 May 2018 00:45:18 +0000 (20:45 -0400)]
lib: update INI files with for expanded paths

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

6 years agolib: generate missing INI files with `nitpackage`
Alexandre Terrasa [Mon, 7 May 2018 19:35:32 +0000 (15:35 -0400)]
lib: generate missing INI files with `nitpackage`

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

6 years agonitpackage: generate INI files
Alexandre Terrasa [Mon, 7 May 2018 17:57:06 +0000 (13:57 -0400)]
nitpackage: generate INI files

Also remove the old shell script `nit-makepackage`

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

6 years agomodel/mpackage: introduce INI path related services
Alexandre Terrasa [Mon, 7 May 2018 17:56:44 +0000 (13:56 -0400)]
model/mpackage: introduce INI path related services

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

6 years agonitpackage: make package expension optional
Alexandre Terrasa [Mon, 7 May 2018 17:54:40 +0000 (13:54 -0400)]
nitpackage: make package expension optional

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

6 years agolib/actors: uniformize Makefile names with the rest of the Nit project
Alexandre Terrasa [Tue, 8 May 2018 02:47:38 +0000 (22:47 -0400)]
lib/actors: uniformize Makefile names with the rest of the Nit project

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

6 years agosrc/nit: remove unused primitive_types module
Lucas Bajolet [Tue, 8 May 2018 15:00:21 +0000 (11:00 -0400)]
src/nit: remove unused primitive_types module

The primitive_types module contained legacy native file IO methods which
were unused in the current interpreter.

Since it is not necessary anymore, we remove it.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

6 years agonitpackage: only work on packages passed as argument
Alexandre Terrasa [Mon, 7 May 2018 17:53:15 +0000 (13:53 -0400)]
nitpackage: only work on packages passed as argument

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

6 years agonitpackage: move package path services up to `model/mpackage.nit`
Alexandre Terrasa [Mon, 7 May 2018 17:51:54 +0000 (13:51 -0400)]
nitpackage: move package path services up to `model/mpackage.nit`

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

6 years agolib/ini: write output with groups
Alexandre Terrasa [Mon, 7 May 2018 19:28:44 +0000 (15:28 -0400)]
lib/ini: write output with groups

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

6 years agolib/ini: remove warnings
Alexandre Terrasa [Mon, 7 May 2018 19:13:17 +0000 (15:13 -0400)]
lib/ini: remove warnings

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

6 years agolib/ini: write output with groups
Alexandre Terrasa [Mon, 7 May 2018 19:28:44 +0000 (15:28 -0400)]
lib/ini: write output with groups

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

6 years agolib/ini: remove warnings
Alexandre Terrasa [Mon, 7 May 2018 19:13:17 +0000 (15:13 -0400)]
lib/ini: remove warnings

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

6 years agoMerge: Nitcatalog for nitpm
Jean Privat [Mon, 7 May 2018 23:57:32 +0000 (19:57 -0400)]
Merge: Nitcatalog for nitpm

This move the packages fetched by nitpm to nitlanguage.org and use the nitcatalog infrastructure to publish and update the ini files.

The list of public packages is now in `contrig/nitpm_packages.txt` (was `oot.txt`) and new public packages can be added to the file trough PR and review by the community.

Note that there is nothing yet to check the sanity of public pagkage (nor do any long run quality assurance).

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

6 years agoMerge: pnacl: remove target and related projects
Jean Privat [Mon, 7 May 2018 23:57:31 +0000 (19:57 -0400)]
Merge: pnacl: remove target and related projects

Since PNaCl is now deprecated for all targets, and since nobody use the
platform or the contributed online_ide, we remove the packages from the
repo.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

Pull-Request: #2651

6 years agoMerge: share/man: update man page for nitweb
Jean Privat [Mon, 7 May 2018 23:57:30 +0000 (19:57 -0400)]
Merge: share/man: update man page for nitweb

This PR fixes the warning thrown by check-manpages.sh for the `nitweb` tool.

Pull-Request: #2654

6 years agotests/test_prog: add dummy documentation
Alexandre Terrasa [Wed, 2 May 2018 23:37:54 +0000 (19:37 -0400)]
tests/test_prog: add dummy documentation

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

6 years agoshare/man: update man page for nitweb
Alexandre Terrasa [Mon, 7 May 2018 20:34:56 +0000 (16:34 -0400)]
share/man: update man page for nitweb

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