nit.git
5 years agonitweb: fix access to query results count
Alexandre Terrasa [Thu, 14 Jun 2018 19:04:38 +0000 (15:04 -0400)]
nitweb: fix access to query results count

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

5 years agoMerge: nitce: do not forgot to autoadapt in native_array_instance
Jean Privat [Fri, 8 Jun 2018 22:42:36 +0000 (18:42 -0400)]
Merge: nitce: do not forgot to autoadapt in native_array_instance

This fix test_new_native.nit with a more strict compiler

Pull-Request: #2715

5 years agoMerge: nitc: intro hidden option to compile to a shared native lib (.so/.dll)
Jean Privat [Fri, 8 Jun 2018 22:42:35 +0000 (18:42 -0400)]
Merge: nitc: intro hidden option to compile to a shared native lib (.so/.dll)

Add the `--shared-lib` command line option for `nitc` to generate a native library (.so or .dll). It is hidden because by itself it is not very useful. This is a first step to create polyglot programs where Nit is not the entrypoing.

I currently use such a DLL by first calling `nit_main` and then invoking callbacks generated by the FFI for a dummy method. Once we have a better way to generate the callbacks (or entrypoint actually) and maybe generate a .h, we could make this an official feature.

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

5 years agoMerge: lib/core: remove uses of Byte for Text
Jean Privat [Fri, 8 Jun 2018 22:42:33 +0000 (18:42 -0400)]
Merge: lib/core: remove uses of Byte for Text

Byte is convenient for automatic modular arithmetic on 8-bit values.

However, due to the way our Numeric types are handled, no automatic
conversion is done when working on primitive types, and operations like
comparison will fail when comparing two values of different type.

This is a cause of bugs as the u8 suffix is requires for comparing two
bytes, and is also the cause for tedious cast operations to go
back-and-forth between Byte and Int.

We remove the uses of Byte in the Text API, and replace then with Int.
This should not have a negative impact on performance.

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

Pull-Request: #2688

5 years agolib/core: remove ascii method on Int and 'b' prefix
Lucas Bajolet [Tue, 5 Jun 2018 21:40:55 +0000 (17:40 -0400)]
lib/core: remove ascii method on Int and 'b' prefix

Since no distinction is to be done between both Int and Byte when
dealing with strings, there is no need to have both an 'ascii' and a
'code_point' service on both Int and Char.

Therefore, we remove the ascii method, as our Chars are first and
foremost Unicode-compliant.

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

5 years agolib/core: remove uses of Byte for Text
Lucas Bajolet [Mon, 14 May 2018 18:56:51 +0000 (14:56 -0400)]
lib/core: remove uses of Byte for Text

Byte is convenient for automatic modular arithmetic on 8-bit values.

However, due to the way our Numeric types are handled, no automatic
conversion is done when working on primitive types, and operations like
comparison will fail when comparing two values of different type.

This is a cause of bugs as the u8 suffix is required for comparing two
bytes, and is also the cause for tedious cast operations to go
back-and-forth between Byte and Int.

We remove the uses of Byte in the Text API, and replace them with Int.
This should not have a negative impact on performance.

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

5 years agonitce: do not forgot to autoadapt in native_array_instance
Jean Privat [Fri, 8 Jun 2018 15:42:23 +0000 (11:42 -0400)]
nitce: do not forgot to autoadapt in native_array_instance

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

5 years agoMerge: Makefile: add nitpackage
Jean Privat [Fri, 8 Jun 2018 12:02:30 +0000 (08:02 -0400)]
Merge: Makefile: add nitpackage

I wanted to have it in my path

Pull-Request: #2710

5 years agonitc: intro command option --shared-lib to compile to a .so or .dll
Alexis Laferrière [Sun, 1 Apr 2018 12:18:03 +0000 (08:18 -0400)]
nitc: intro command option --shared-lib to compile to a .so or .dll

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

5 years agoMerge: text: escape_to_mk should not escape =
Jean Privat [Fri, 8 Jun 2018 00:33:06 +0000 (20:33 -0400)]
Merge: text: escape_to_mk should not escape =

Remove the escaping to ASCII hex value for the `=` char in `escape_to_mk`. It doesn't appear to be necessary, it was not documented and it breaks `nitls` support for `nitpm` packages.

Here's the error raised by `make` when it can't parse an escaped `=`.
~~~
make: *** No rule to make target '/home/xymus/.local/lib/nit/gamnit?3ddepth-vbos/lib/gamnit/bmfont.nit'
~~~

Pull-Request: #2713

5 years agotext: escape_to_mk should not escape =
Alexis Laferrière [Wed, 6 Jun 2018 17:17:05 +0000 (13:17 -0400)]
text: escape_to_mk should not escape =

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

5 years agoMakefile: add nitpackage
Jean Privat [Mon, 4 Jun 2018 23:35:53 +0000 (19:35 -0400)]
Makefile: add nitpackage

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

5 years agoMerge: nitweb: add documentation links in rendered code with htmllight
Jean Privat [Mon, 4 Jun 2018 13:43:38 +0000 (09:43 -0400)]
Merge: nitweb: add documentation links in rendered code with htmllight

Based on the work of #2702.

Nitweb now display links in code.

Closes #2196 .

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

5 years agoMerge: model_filter: introduce `is_broken` and `is_generated` filters
Jean Privat [Mon, 4 Jun 2018 13:43:37 +0000 (09:43 -0400)]
Merge: model_filter: introduce `is_broken` and `is_generated` filters

Introduce two new model filter options: `is_broken` and `is_generated`.

Nothing new here, only using already defined attributes.

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

5 years agonitmetrics: fix tests following linearization change
Alexandre Terrasa [Sat, 2 Jun 2018 15:57:56 +0000 (11:57 -0400)]
nitmetrics: fix tests following linearization change

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

5 years agosrc/model: add `is_generated` filter
Alexandre Terrasa [Fri, 1 Jun 2018 15:43:23 +0000 (11:43 -0400)]
src/model: add `is_generated` filter

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

5 years agosrc/model: add `is_broken` filter
Alexandre Terrasa [Fri, 1 Jun 2018 15:05:20 +0000 (11:05 -0400)]
src/model: add `is_broken` filter

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

5 years agodoc/commands: CmdCode does not use infoboxes in html highlight
Alexandre Terrasa [Fri, 1 Jun 2018 16:38:16 +0000 (12:38 -0400)]
doc/commands: CmdCode does not use infoboxes in html highlight

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

5 years agoMerge: Changed nitcorn HTTPResponse body type to Writable
Jean Privat [Fri, 1 Jun 2018 17:10:06 +0000 (13:10 -0400)]
Merge: Changed nitcorn HTTPResponse body type to Writable

This PR allows to send binaries (and whatever writable document) as bodies in nitcorn's responses.

The reduced use of buffers and copies should also reduce the pressure on the GC and make things faster.

Embrace, extend and extinguish #2703

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

5 years agoMerge: Use links in nitlight --no-infobox
Jean Privat [Fri, 1 Jun 2018 17:10:05 +0000 (13:10 -0400)]
Merge: Use links in nitlight --no-infobox

Links are inserted the HTML when infoboxes are disabled.
Previously, only the title was used.

Note that the links are the same than the one in the infobox title, thus specific subclasses of HtmlightVisitor should behave as expected.

Pull-Request: #2702

5 years agoMerge: crypto: add some methods on Bytes, Char & String
Jean Privat [Fri, 1 Jun 2018 17:10:04 +0000 (13:10 -0400)]
Merge: crypto: add some methods on Bytes, Char & String

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

5 years agoMerge: Nitunit: mass compile non-simple docunits
Jean Privat [Fri, 1 Jun 2018 17:10:02 +0000 (13:10 -0400)]
Merge: Nitunit: mass compile non-simple docunits

When docunits are simple (just statements), a single module is generated for all.
Unfortunately, when docunits contains classes or importations, a specific module must be generated for each one of them.
Compiling all these module takes most of the nitunit elapsed time.

This PR tries to compile these non-simple modules at once, thanks to nitc that features invoking it with multiple programs.

Testing with `nitunit lib/popcorn/README.md`

Before:
* cold ccache: 1m3,832s
* hot ccache: 0m23,063s

After:
* cold ccache: 0m44,517s (-30%)
* hot ccache: 0m17,778s (-23%)

Pull-Request: #2510
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>

5 years agonitcorn clients: remove `write_to_string` when a Writable is given as body
Jean Privat [Thu, 31 May 2018 18:41:19 +0000 (14:41 -0400)]
nitcorn clients: remove `write_to_string` when a Writable is given as body

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

5 years agotests: serve simple and complex binary
Jean Privat [Thu, 31 May 2018 18:21:10 +0000 (14:21 -0400)]
tests: serve simple and complex binary

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

5 years agonitcorn: HttpResponse::body is now an agnostic Writable
Jean Privat [Thu, 31 May 2018 18:18:24 +0000 (14:18 -0400)]
nitcorn: HttpResponse::body is now an agnostic Writable

The only quirk is computing the length :(

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

5 years agonitcorn: render the response in a template to avoid a copy&buffer
Jean Privat [Thu, 31 May 2018 18:17:25 +0000 (14:17 -0400)]
nitcorn: render the response in a template to avoid a copy&buffer

By the way, name the method `render` instead of reusing `to_s`

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

5 years agocore/stream: add Writable::write_to_bytes
Jean Privat [Thu, 31 May 2018 18:14:30 +0000 (14:14 -0400)]
core/stream: add Writable::write_to_bytes

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

5 years agotests: update sav impacted by changes in core::kernel
Jean Privat [Thu, 31 May 2018 15:55:06 +0000 (11:55 -0400)]
tests: update sav impacted by changes in core::kernel

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

5 years agotests: update nitlight with new links
Jean Privat [Thu, 31 May 2018 15:34:48 +0000 (11:34 -0400)]
tests: update nitlight with new links

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

5 years agosrc/htmlight: if no infofox but a href, insert a link the the HTML
Jean Privat [Thu, 31 May 2018 15:33:42 +0000 (11:33 -0400)]
src/htmlight: if no infofox but a href, insert a link the the HTML

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

5 years agosrc/htmlight: A classtype points to the class introduction
Jean Privat [Thu, 31 May 2018 15:32:54 +0000 (11:32 -0400)]
src/htmlight: A classtype points to the class introduction

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

5 years agotests: update sav/nitunit_args1.res
Jean Privat [Thu, 31 May 2018 13:47:27 +0000 (09:47 -0400)]
tests: update sav/nitunit_args1.res

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

5 years agonitunit: try to mass compile all docunits at once
Jean Privat [Tue, 20 Jun 2017 17:46:57 +0000 (13:46 -0400)]
nitunit: try to mass compile all docunits at once

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

5 years agonitunit: `test_single_docunit` call `execute_simple_docunit` to factorize code
Jean Privat [Tue, 20 Jun 2017 17:46:16 +0000 (13:46 -0400)]
nitunit: `test_single_docunit` call `execute_simple_docunit` to factorize code

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

5 years agonitunit: extract `generate_single_docunit` from `test_single_docunit`
Jean Privat [Tue, 20 Jun 2017 17:42:35 +0000 (13:42 -0400)]
nitunit: extract `generate_single_docunit` from `test_single_docunit`

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

5 years agonitunit: rename and redocument `test_simple_docunits` as it just compiles
Jean Privat [Tue, 20 Jun 2017 17:40:55 +0000 (13:40 -0400)]
nitunit: rename and redocument `test_simple_docunits` as it just compiles

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

5 years agocrypto: add some methods on Bytes, Char & String
Jean Privat [Tue, 1 May 2018 17:04:35 +0000 (13:04 -0400)]
crypto: add some methods on Bytes, Char & String

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

5 years agoMerge: lib/core: Fix text tests
Jean Privat [Thu, 31 May 2018 00:23:08 +0000 (20:23 -0400)]
Merge: lib/core: Fix text tests

Fix and clean doc units from `abstract_text`.

Also added back ticks around deprecated code examples.

Closes #2403.

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

5 years agoMerge: Object destroy traces
Jean Privat [Thu, 31 May 2018 00:23:07 +0000 (20:23 -0400)]
Merge: Object destroy traces

- add destruction traces
- add lttng channel configuration file
- resolve the signed pointer issue by using uintptr_t instead of intptr_t
- resolve the discarded events issue by using a blocking channel mode.

To compile using the trace system: --trace

To test tracing some object instance and destroy events:
lttng load -i=~/nit/src/Nit_Compiler.lttng Nit_Compiler
lttng start
--> run your program
lttng stop

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

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

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

5 years agoMerge: model: remove ModelView
Jean Privat [Wed, 30 May 2018 15:36:14 +0000 (11:36 -0400)]
Merge: model: remove ModelView

ModelView had a good life, now is the time to change.

I replaced all the services from ModelView by `collect_*` methods combined with a `ModelFilter` (91072e1).
All the following commits modify the depending tools to use `model_collect` and `model_filter` instead.
Some test results changed because of the new ModelFilter dependency.

> RIP ModelView

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

5 years agolib/core/text: uniformize doc units
Alexandre Terrasa [Tue, 29 May 2018 20:32:06 +0000 (16:32 -0400)]
lib/core/text: uniformize doc units

A lot of different variations around the doc units were used in the same module.

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

5 years agolib/core/text: fix unrecognized doc units
Alexandre Terrasa [Tue, 29 May 2018 20:26:38 +0000 (16:26 -0400)]
lib/core/text: fix unrecognized doc units

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

5 years agolib/core/text: remove deprecated mentions
Alexandre Terrasa [Tue, 29 May 2018 20:22:23 +0000 (16:22 -0400)]
lib/core/text: remove deprecated mentions

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

5 years agonitpackage: remove ModelView dependency
Alexandre Terrasa [Thu, 17 May 2018 21:13:49 +0000 (17:13 -0400)]
nitpackage: remove ModelView dependency

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

5 years agovim_autocomplete: remove ModelView dependency
Alexandre Terrasa [Tue, 15 May 2018 01:50:02 +0000 (21:50 -0400)]
vim_autocomplete: remove ModelView dependency

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

5 years agofrontend: remove ModelView dependency
Alexandre Terrasa [Tue, 15 May 2018 01:49:53 +0000 (21:49 -0400)]
frontend: remove ModelView dependency

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

5 years agonitmetrics: remove ModelView dependency
Alexandre Terrasa [Tue, 15 May 2018 01:49:46 +0000 (21:49 -0400)]
nitmetrics: remove ModelView dependency

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

5 years agonitx: remove ModelView dependency
Alexandre Terrasa [Tue, 15 May 2018 01:49:31 +0000 (21:49 -0400)]
nitx: remove ModelView dependency

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

5 years agonitdoc: remove ModelView dependency
Alexandre Terrasa [Tue, 15 May 2018 01:49:01 +0000 (21:49 -0400)]
nitdoc: remove ModelView dependency

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

5 years agoadd destruction traces, add lttng channel configuration file, resolve the signed...
olivierschirm [Thu, 17 May 2018 13:14:24 +0000 (09:14 -0400)]
add destruction traces, add lttng channel configuration file, resolve the signed pointer issue by using uintptr_t instead of intptr_t.
add some infomations in nitc man page

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

5 years agoMerge: nitpackage: check existence of README.md files
Jean Privat [Fri, 25 May 2018 12:55:47 +0000 (08:55 -0400)]
Merge: nitpackage: check existence of README.md files

This PR adds the option `--check-readme` to the `nitpackage` tool so it can check for existence of README.md files in packages.

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

Pull-Request: #2697

5 years agoMerge: nitc: use pthread_keys on iOS where __thread is not available
Jean Privat [Fri, 25 May 2018 12:55:47 +0000 (08:55 -0400)]
Merge: nitc: use pthread_keys on iOS where __thread is not available

Add an alternative to the use of `__thread` to manage the catch stack on iOS. This fixes the iOS support, broken since #2612.

The issue with `test_catch_multi_threaded` was seemingly unrelated, caused by a stack overflow. @BlackMinou does this make sense?

See previously failing tests: http://gresil.org/jenkins/job/CI%20Github%20OSX/621/#showFailuresLink

Pull-Request: #2698

5 years agoMerge: nitls: option -M escapes characters in paths
Jean Privat [Fri, 25 May 2018 12:55:46 +0000 (08:55 -0400)]
Merge: nitls: option -M escapes characters in paths

Close #2699

Pull-Request: #2700

5 years agonitls: option -M escapes characters in paths
Jean Privat [Thu, 24 May 2018 14:02:40 +0000 (10:02 -0400)]
nitls: option -M escapes characters in paths

Close #2699

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

5 years agotests: fix typo in test name in Darwin.skip
Alexis Laferrière [Mon, 21 May 2018 17:17:21 +0000 (13:17 -0400)]
tests: fix typo in test name in Darwin.skip

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

5 years agotests: recurse less in test_catch_multi_threaded to avoid stack overflow
Alexis Laferrière [Mon, 21 May 2018 00:38:31 +0000 (20:38 -0400)]
tests: recurse less in test_catch_multi_threaded to avoid stack overflow

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

5 years agonitc: use pthread_key_create and others when __thread is not available
Alexis Laferrière [Sun, 20 May 2018 23:17:12 +0000 (19:17 -0400)]
nitc: use pthread_key_create and others when __thread is not available

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

5 years agonitpackage: check existence of README.md files
Alexandre Terrasa [Thu, 10 May 2018 19:13:35 +0000 (15:13 -0400)]
nitpackage: check existence of README.md files

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

5 years agouml: remove ModelView dependency
Alexandre Terrasa [Tue, 15 May 2018 01:48:34 +0000 (21:48 -0400)]
uml: remove ModelView dependency

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

5 years agonitweb: remove ModelView dependency
Alexandre Terrasa [Tue, 15 May 2018 01:48:24 +0000 (21:48 -0400)]
nitweb: remove ModelView dependency

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

5 years agodoc/commands: remove ModelView dependency
Alexandre Terrasa [Tue, 15 May 2018 01:48:03 +0000 (21:48 -0400)]
doc/commands: remove ModelView dependency

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

5 years agomodel_collect: kill ModelView
Alexandre Terrasa [Tue, 21 Nov 2017 18:43:38 +0000 (13:43 -0500)]
model_collect: kill ModelView

And move services to model_collect

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

5 years agoMerge: lib/md5: nitunitize tests
Jean Privat [Tue, 15 May 2018 22:52:05 +0000 (18:52 -0400)]
Merge: lib/md5: nitunitize tests

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

Pull-Request: #2694

5 years agoMerge: lib/base64: nitunize tests
Jean Privat [Tue, 15 May 2018 22:52:04 +0000 (18:52 -0400)]
Merge: lib/base64: nitunize tests

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

Pull-Request: #2693

5 years agoMerge: lib/a_star: nitunitize tests
Jean Privat [Tue, 15 May 2018 22:52:03 +0000 (18:52 -0400)]
Merge: lib/a_star: nitunitize tests

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

Pull-Request: #2692

5 years agoMerge: src/doc/commands: fix test class name for `commands_md`
Jean Privat [Tue, 15 May 2018 16:51:46 +0000 (12:51 -0400)]
Merge: src/doc/commands: fix test class name for `commands_md`

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

Pull-Request: #2689

5 years agoMerge: contrib: generate Makefiles with nitpackage
Jean Privat [Tue, 15 May 2018 16:51:45 +0000 (12:51 -0400)]
Merge: contrib: generate Makefiles with nitpackage

I applied `nitpackage --gen-makefile` (#2662) on contrib:
* generated Makefile for projects without any (76a17aa)
* replaced some existing Makefiles with their generated counterpart (a95be1e)
* manually merged generated rules into existing Makefiles (3b85ec3)

Please consider only these commits as the rest of them belongs to another PRs.

Pull-Request: #2685

5 years agoMerge: contrib: apply nitpackage --gen-ini
Jean Privat [Tue, 15 May 2018 16:51:44 +0000 (12:51 -0400)]
Merge: contrib: apply nitpackage --gen-ini

I ran `nitpackage --gen-ini` on contrib projects.

First of all, I added 3 more accepted keys to nitpackage --check-ini that seem to be used in some projects (04abe90):
* `upstream.apk`
* `upstream.tryit`
* `source.exclude`

I expanded the package `github_merge`, the only one left in the non-expanded form in the Nit project (51df98b).

Then I corrected some `git.directory` keys with incorrect values (a4b53f7). Short note for `src`, I added the trailing `/` to be consistent with all other ini files.

Finally I generated the `package.desc` for all projects from the `mdoc_or_fallback.synopsis` values (051ab50).

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

5 years agoMerge: lib/core: remove BufferedReader
Jean Privat [Tue, 15 May 2018 16:51:43 +0000 (12:51 -0400)]
Merge: 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>

Pull-Request: #2680

5 years agoMerge: nitpackage: generate and check manpages
Jean Privat [Tue, 15 May 2018 16:51:41 +0000 (12:51 -0400)]
Merge: nitpackage: generate and check manpages

This PR adds two new features to nitpackage:

--check-man: check manpages existence and content for packages and executable modules
--gen-man: create manpages for packages and executable modules

As example I added new manpages (91b9839) to `lib/markdown` and `lib/github`.

Please only consider the 6 last commits as the rest belongs to #2652, #2653, #2656, #2657 and #2662.

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

5 years agoMerge: nitpackage: create and check Makefile
Jean Privat [Tue, 15 May 2018 16:51:40 +0000 (12:51 -0400)]
Merge: nitpackage: create and check Makefile

This PR adds two new features to `nitpackage`:
* `--check-makefile`: check Makefiles existence for packages and executable modules
* `--gen-makefile`: create Makefiles for packages and executable modules

As example I added new Makefiles (4f948e3) to all lib/ project if none was found.
I also updated some Makefiles from my projects (dbacfc0).

Please only consider the 4 last commits as the rest belongs to #2652, #2653, #2656 and #2657.

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

5 years agocontrib: merge manually generated Makefiles with existing ones
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>

5 years agocontrib: replace Makefile form contrib with same rules
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>

5 years agocontrib: generate Makefile for projects without any
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>

5 years agocontrib: add some manpages generated with `nitpackage`
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>

5 years agolib: add some manpages generated with `nitpackage`
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>

5 years agonitpackage: generate and check man pages
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>

5 years agogit: ignore `lib/*/bin`
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>

5 years agoshare/man: fix `nitmd` path
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>

5 years agolib: add two examples of Makefile generated by `nitpackage`
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>

5 years agonitpackage: generate and check Makefiles
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>

5 years agonitpackage: rename phase
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>

5 years agocontrib: generate `package.desc` key for all contrib projects
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>

5 years agocontrib: fix wrong `git.directory` in some contrib projects
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>

5 years agonitpackage: accept more `package.ini` keys
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>

5 years agoMerge: contrib/wiringPi: fix `shift` module name
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>

5 years agoMerge: contrib/nitiwiki: protect non-nit code blokcs in README
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

5 years agoMerge: contrib: use `config` instead of `opts`
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

5 years agoMerge: contrib: fix readmes
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

5 years agolib/md5: nitunitize tests
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>

5 years agolib/base64: nitunize tests
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>

5 years agolib/a_star: nitunitize tests
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>

5 years agosrc/doc/commands: fix test class name for `commands_md`
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>

5 years agocontrib/nitiwiki: use `config` instead of `opts`
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>

5 years agocontrib/github_merge: use `config` instead of `opts`
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>

5 years agocontrib: expand package `github_merge`
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>

5 years agocontrib/sort_downloads: protect README doc units
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>

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>