Alexandre Terrasa [Sun, 13 May 2018 20:34:27 +0000 (16:34 -0400)]
contrib: merge manually generated Makefiles with existing ones
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 13 May 2018 20:13:58 +0000 (16:13 -0400)]
contrib: replace Makefile form contrib with same rules
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 13 May 2018 20:10:12 +0000 (16:10 -0400)]
contrib: generate Makefile for projects without any
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 14 May 2018 17:47:00 +0000 (13:47 -0400)]
contrib: add some manpages generated with `nitpackage`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 8 May 2018 22:20:39 +0000 (18:20 -0400)]
lib: add some manpages generated with `nitpackage`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 8 May 2018 22:20:18 +0000 (18:20 -0400)]
nitpackage: generate and check man pages
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 14:04:10 +0000 (10:04 -0400)]
git: ignore `lib/*/bin`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 13 May 2018 18:51:54 +0000 (14:51 -0400)]
share/man: fix `nitmd` path
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 11 May 2018 22:20:26 +0000 (18:20 -0400)]
lib: add two examples of Makefile generated by `nitpackage`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 8 May 2018 15:30:08 +0000 (11:30 -0400)]
nitpackage: generate and check Makefiles
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 8 May 2018 02:00:28 +0000 (22:00 -0400)]
nitpackage: rename phase
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 13 May 2018 19:07:53 +0000 (15:07 -0400)]
contrib: generate `package.desc` key for all contrib projects
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 13 May 2018 19:29:53 +0000 (15:29 -0400)]
contrib: fix wrong `git.directory` in some contrib projects
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 13 May 2018 19:30:50 +0000 (15:30 -0400)]
nitpackage: accept more `package.ini` keys
Added:
* `upstream.apk`
* `upstream.tryit`
* `source.exclude`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 15 May 2018 11:16:39 +0000 (07:16 -0400)]
Merge: contrib/wiringPi: fix `shift` module name
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2681
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 15 May 2018 11:16:38 +0000 (07:16 -0400)]
Merge: contrib/nitiwiki: protect non-nit code blokcs in README
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2683
Jean Privat [Tue, 15 May 2018 11:16:38 +0000 (07:16 -0400)]
Merge: contrib: use `config` instead of `opts`
Modified two contrib projects to make then use `config`:
* `github_merge`
* `nitiwiki`
They now automatically provide the `--stub-manpage` option from `config`.
Pull-Request: #2686
Jean Privat [Tue, 15 May 2018 11:16:37 +0000 (07:16 -0400)]
Merge: contrib: fix readmes
Fix some unprotected raw code blocks in contrib READMES.
Pull-Request: #2687
Alexandre Terrasa [Tue, 15 May 2018 02:46:29 +0000 (22:46 -0400)]
lib/md5: nitunitize tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 02:24:33 +0000 (22:24 -0400)]
lib/base64: nitunize tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 02:21:47 +0000 (22:21 -0400)]
lib/a_star: nitunitize tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 00:51:49 +0000 (20:51 -0400)]
src/doc/commands: fix test class name for `commands_md`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 14 May 2018 16:45:41 +0000 (12:45 -0400)]
contrib/nitiwiki: use `config` instead of `opts`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 14 May 2018 16:29:09 +0000 (12:29 -0400)]
contrib/github_merge: use `config` instead of `opts`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 13 May 2018 19:18:24 +0000 (15:18 -0400)]
contrib: expand package `github_merge`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 14 May 2018 18:12:08 +0000 (14:12 -0400)]
contrib/sort_downloads: protect README doc units
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
Jean Privat [Fri, 11 May 2018 20:01:21 +0000 (16:01 -0400)]
Merge: opportunity: add a docker-compose.yml file
Pull-Request: #2677
Jean Privat [Fri, 11 May 2018 20:01:18 +0000 (16:01 -0400)]
Merge: Small improvements on the oot.sh script
Pull-Request: #2676
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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
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
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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>
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>