Alexandre Terrasa [Sun, 10 Jun 2018 22:44:07 +0000 (18:44 -0400)]
lib/html: escape Bootstrap links titles
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 12 Jun 2018 14:59:31 +0000 (10:59 -0400)]
src/doc/commands: clean importation for `commands_base`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 20 Jun 2018 15:15:15 +0000 (11:15 -0400)]
benchmarks/markdown: add benches for markdown2
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 30 May 2018 02:38:52 +0000 (22:38 -0400)]
lib/markdown2: introduce `nitmd` client
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 30 May 2018 00:02:24 +0000 (20:02 -0400)]
lib/markdown2: introduce wikilinks parsing
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 30 May 2018 02:15:16 +0000 (22:15 -0400)]
lib/markdown2: introduce Github extended mode
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 May 2018 23:55:58 +0000 (19:55 -0400)]
lib/markdown2: introduce markdown rendering to LaTeX
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 17:57:20 +0000 (13:57 -0400)]
cmd/commands_http: parse filter options from HttpRequest
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 17:44:02 +0000 (13:44 -0400)]
cmd/commands_http: clean Bool options handling
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 17:43:34 +0000 (13:43 -0400)]
cmd/commands_http: clean Int options handling
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 17:43:17 +0000 (13:43 -0400)]
cmd/commands_http: clean String options handling
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 16:52:04 +0000 (12:52 -0400)]
cmd/cmd_parser: parse filter options from cmd string
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 15:46:04 +0000 (11:46 -0400)]
cmd/cmd_parser: clean Bool options handling
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 15:42:45 +0000 (11:42 -0400)]
cmd/cmd_parser: clean Int options handling
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 14:03:13 +0000 (10:03 -0400)]
cmd/cmd_parser: clean String options handling
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 17:27:55 +0000 (13:27 -0400)]
cmd/cmd_parser: remove ModelFilter parameter from init
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 16:51:48 +0000 (12:51 -0400)]
doc/commands: test commands with filters
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 May 2018 23:54:13 +0000 (19:54 -0400)]
lib/markdown2: introduce markdown rendering to Manpages
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 May 2018 23:55:11 +0000 (19:55 -0400)]
lib/markdown2: introduce markdown rendering to markdown
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 May 2018 23:56:40 +0000 (19:56 -0400)]
lib/markdown2: import tests from CommonMark spec
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 30 May 2018 00:48:19 +0000 (20:48 -0400)]
lib/markdown2: import tests from DaringFireball
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 30 May 2018 00:48:40 +0000 (20:48 -0400)]
lib/markdown2: add tests from issues
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 May 2018 23:52:35 +0000 (19:52 -0400)]
lib/markdown2: introduce markdown rendering to HTML
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 May 2018 23:57:20 +0000 (19:57 -0400)]
lib/markdown2: introduce markdown rendering interfaces
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 30 May 2018 00:49:28 +0000 (20:49 -0400)]
lib/markdown2: add tests for markdown nodes location
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 30 May 2018 00:48:05 +0000 (20:48 -0400)]
lib/markdown2: introduce markdown base test services
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 May 2018 23:51:24 +0000 (19:51 -0400)]
lib/markdown2: introduce markdown block parser
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 May 2018 23:51:14 +0000 (19:51 -0400)]
lib/markdown2: introduce markdown AST inline parser
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 18 May 2018 17:52:06 +0000 (13:52 -0400)]
lib/markdown2: introduce markdown AST nodes
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Wed, 20 Jun 2018 18:59:16 +0000 (14:59 -0400)]
Merge: nitdoc: full rewrite
This PR introduces a new version of Nitdoc based on DocCommands.
The main objective is to unify the display with `nitweb`.
Beside a cleaner implementation and the removal of a lot of code here a quick presentation of the new tool.
### Replace Overview page by Nit Catalog
Avoiding the clutter of the old overview page.
![home](https://user-images.githubusercontent.com/583144/
40859182-
df1db392-65ae-11e8-82d6-
8abd1708722e.png)
This closes #1516
### New packages pages
Package READMEs are now rendered with support of `[[doc commands]]`
![screenshot from 2018-06-01 15 19 10](https://user-images.githubusercontent.com/583144/
40859246-
263b4a14-65af-11e8-9fe8-
4806fedc4a2a.png)
### Simplified modules pages
The modules pages offer a simplified view of its content with introduced and redefined classes:
![screenshot from 2018-06-01 15 23 28](https://user-images.githubusercontent.com/583144/
40859466-
ed481434-65af-11e8-8c06-
88d8b50b17e2.png)
### Module code view
The source code of a module can be viewed directly in the documentation:
![screenshot from 2018-06-01 15 25 12](https://user-images.githubusercontent.com/583144/
40860212-
9bca9192-65b2-11e8-9115-
a623a3d9f026.png)
Entities in the source code can be clicked to access the related documentation page.
This closes #953.
### Class & property linearization
In the new nitdoc, I totally removed the concept of definition pages. Thus no more page for a MClassDef or a MPropDef.
Instead we present the linearization of a MClass or MProperty like in nitweb.
![screenshot from 2018-06-01 15 27 53](https://user-images.githubusercontent.com/583144/
40859654-
89aa4cca-65b0-11e8-9e2a-
0f710a9186ea.png)
There is now a simple rule for where a click on a class or property will land:
* If the user clicks on an introduction, the target page is the documentation of the class or property (the intro def)
* If the user clicks on a redefinition, the target is the definition card in the linearization list.
Beside in the linearization lists, there is only two places where you can find a link to a redefinition:
* in the **Redefined classes** of a module page (tab #doc)
* in the **Redefined properties** of a class page (tab #doc)
Here also, the code is linked to the documentation.
I applied heuristics that disable the linearization lists for:
* `Sys`
* `Object::SELF`
* `Object::init`
* `Object::to_s`
This closes #1563.
### Better quicksearch results
In order to close #361, I added an heuristic to place the packages and modules on top of the list depending on the query.
If the query has a better matches with properties, they will be presented in top, here an example for the query `pop`:
![screenshot from 2018-06-01 15 36 44](https://user-images.githubusercontent.com/583144/
40859970-
9a7a4ce8-65b1-11e8-9a84-
c6fc83886e96.png)
The `pop` first matches `pop` and `popup` then we presents the packages and modules `popcorn`.
For the query `popc`:
![screenshot from 2018-06-01 15 37 57](https://user-images.githubusercontent.com/583144/
40860045-
e0eea2dc-65b1-11e8-90d1-
5f233ce7d204.png)
We directly show the matches for the packages and modules (same behavior than before).
### Redesign
The new design (imported from nitweb) add a lot of free spaces for future PR like example suggestions, doc generation, call graphs etc.
We can benefit from the tabbed view to add new content (like in nitweb with the license et contrib rules for examples).
We can also use the space under the documentation to introduce examples and other things.
### Regressions
The only regression is the disappearance of concerns sections. I'm working on it with new doc commands.
Final note, it also closes #962.
Pull-Request: #2707
Jean Privat [Wed, 20 Jun 2018 18:59:15 +0000 (14:59 -0400)]
Merge: Windows: fix bootstrap
It looks like the use of the method `is_tty` in Nit tools triggered the FFI compilation of the `posix` module which fails on Windows. This module imports some headers that are unavailable in the msys2 environment, as used by our test servers.
Pull-Request: #2711
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Wed, 20 Jun 2018 18:59:13 +0000 (14:59 -0400)]
Merge: nitweb: show full name in mentities cards
This PR shows the full name of a MEntity in all Nitweb cards.
Example:
![screenshot from 2018-06-14 15 10 19](https://user-images.githubusercontent.com/583144/
41432831-
1fde1be8-6fe5-11e8-88b8-
149f3aa86bb6.png)
Closes #2365.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2716
Jean Privat [Wed, 20 Jun 2018 18:59:12 +0000 (14:59 -0400)]
Merge: nitweb: fix access to query results count
This PR replaces accesses to key `total` by `count` in all Nitweb views.
So the display in not broken.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2717
Jean Privat [Wed, 20 Jun 2018 18:59:11 +0000 (14:59 -0400)]
Merge: lib/trees: introduce BKTree
This PR introduces a new kind of tree: the BKTree.
This data structure can be used to speed-up the comparison of a string and a collection of strings with Levenshtein distance.
See https://dl.acm.org/citation.cfm?id=362003.362025 for more details.
Pull-Request: #2718
Jean Privat [Wed, 20 Jun 2018 18:59:09 +0000 (14:59 -0400)]
Merge: src/indexing: Introduces CodeIndex
This PR introduces a new Index based on VSM: CodeIndex, which can be used to retrieve pieces of code from a code query.
Model entities are indexed by their ANode and vectorization is based on model usage such as:
* modules importation
* classes spcialization and refinement
* methods calls and refinements
Example:
~~~nit
# Create the index
var index = new CodeIndex(toolcontext)
for mentity in mentities do
index.index_mentity(mentity)
end
# Match a piece of code
var matches = index.match_code("print \"Hello, World!\"")
for match in matches do
print match
end
~~~
Pull-Request: #2719
Alexandre Terrasa [Tue, 19 Jun 2018 20:07:44 +0000 (16:07 -0400)]
src/indexing: introduce `code_index`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 19 Jun 2018 20:07:07 +0000 (16:07 -0400)]
lib/vsm: default tfidf values are extracted from terms frequencies
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 19 Jun 2018 20:06:28 +0000 (16:06 -0400)]
lib/vsm: factorize term increments
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 19 Jun 2018 20:10:01 +0000 (16:10 -0400)]
lib/vsm: speedup matches using a reverse index
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 23:04:13 +0000 (19:04 -0400)]
lib/vsm: make documents kind customizable
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 14 Jun 2018 17:30:04 +0000 (13:30 -0400)]
lib/trees: introduce BKTree
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 13:38:51 +0000 (09:38 -0400)]
doc/commands: remove default filter from tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 16:51:10 +0000 (12:51 -0400)]
cmd/cmd_catalog: use filter
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 16:50:31 +0000 (12:50 -0400)]
model_index: use filter
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 16:50:11 +0000 (12:50 -0400)]
model_filters: allow copy of filter options
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 16:49:55 +0000 (12:49 -0400)]
model_filters: make all options writable
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 May 2018 15:47:34 +0000 (11:47 -0400)]
model_collect: fix MClass ancestors and descendants access
So filters will work.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
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>
Alexandre Terrasa [Thu, 14 Jun 2018 19:04:31 +0000 (15:04 -0400)]
nitweb: show full name in mentities cards
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 1 Jun 2018 16:04:16 +0000 (12:04 -0400)]
lib/github: fix README commands
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 1 Jun 2018 17:27:48 +0000 (13:27 -0400)]
Makefile: update rules for the new nitdoc
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 1 Jun 2018 19:06:53 +0000 (15:06 -0400)]
tests: update tests for the new nitdoc
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 1 Jun 2018 15:05:11 +0000 (11:05 -0400)]
nitdoc: full rewrite of the nitdoc engine
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 2 Jun 2018 16:11:52 +0000 (12:11 -0400)]
src/doc/templates: add template for the Person class from the nit catalog
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 2 Jun 2018 16:11:21 +0000 (12:11 -0400)]
src/doc/templates: protect access to nullable signatures
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 1 Jun 2018 16:08:16 +0000 (12:08 -0400)]
src/doc/commands: CmdRedefs to return definitions instead of intros
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 1 Jun 2018 16:04:32 +0000 (12:04 -0400)]
src/doc_down: save headlines from InlineDecorator
So it can be used to generate Markdown summaries
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 1 Jun 2018 15:06:28 +0000 (11:06 -0400)]
src/catalog: export package stats to map
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 19 Dec 2017 18:34:00 +0000 (13:34 -0500)]
src/nitdoc: remove old nitdoc
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 1 Jun 2018 16:38:35 +0000 (12:38 -0400)]
src/doc/api: add links to renderer code
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexis Laferrière [Fri, 8 Jun 2018 02:23:34 +0000 (22:23 -0400)]
git: ignore .exe versions of bootstrap compilers
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 7 Jun 2018 19:42:08 +0000 (15:42 -0400)]
windows: skip more tests failing in separate compilation mode
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
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
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>
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
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>
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>
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>
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
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>
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
Alexis Laferrière [Thu, 7 Jun 2018 14:36:45 +0000 (10:36 -0400)]
windows: testall.sh skip niti and nitvm on Windows because they fail
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 7 Jun 2018 14:18:52 +0000 (10:18 -0400)]
windows: blacklist failing tests
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
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>
Alexis Laferrière [Tue, 5 Jun 2018 20:26:35 +0000 (16:26 -0400)]
privileges: update import in clients of the `posix` package
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 5 Jun 2018 19:28:04 +0000 (15:28 -0400)]
posix: add REAME.md
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 5 Jun 2018 19:18:19 +0000 (15:18 -0400)]
posix: merge the `posix_ext` package in `posix`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 5 Jun 2018 19:17:49 +0000 (15:17 -0400)]
posix: move `posix` out of `core` as its own package
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 5 Jun 2018 19:10:06 +0000 (15:10 -0400)]
core: move `Int::isatty` to `file`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 4 Jun 2018 23:35:53 +0000 (19:35 -0400)]
Makefile: add nitpackage
Signed-off-by: Jean Privat <jean@pryen.org>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>