Jean Privat [Tue, 21 Jun 2016 17:04:45 +0000 (13:04 -0400)]
nitcc: to_minimal_dfa fix transition checks (and document it)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 21 Jun 2016 17:03:54 +0000 (13:03 -0400)]
nitcc: to_minimal_dfa accepts non-tagged DFA
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 20 Jun 2016 14:27:23 +0000 (10:27 -0400)]
Merge: Opportunity: log errors to stderr and update message on failed event creation
Log all errors to stderr and remove prints on normal behavior.
Also update the error message, as the "meetup already exists" is now impossible because we dropped the uniqueness of name/date/location a while back.
This is related to #2186, where the file descriptor leak lead to bloated log files, a disk full and failed event creation by lack of space.
Pull-Request: #2187
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 20 Jun 2016 14:27:21 +0000 (10:27 -0400)]
Merge: libevent: force closing connections on error to fix file descriptors leak
The libevent wrapper did not always free and close connections on errors. These are expected errors, like when a file download is cancelled half-way through or when a push connection expires. This recently caused xymus.net to crash due to the exhaustion of file descriptors available to the process.
Pull-Request: #2186
Reviewed-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Sat, 18 Jun 2016 13:45:24 +0000 (09:45 -0400)]
opportunity: print errors to stderr
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 18 Jun 2016 13:45:08 +0000 (09:45 -0400)]
opportunity: inline Meetup::to_s for prettier prints
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 18 Jun 2016 13:44:35 +0000 (09:44 -0400)]
opportunity: remove prints in normal behavior
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 17 Jun 2016 23:13:31 +0000 (19:13 -0400)]
opportunity: update error message on failure to create event
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 17 Jun 2016 22:24:22 +0000 (18:24 -0400)]
libevent: force_close the connection on error (don't wait on buffers)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 17 Jun 2016 22:23:41 +0000 (18:23 -0400)]
libevent: move close logic from C to Nit, and intro force_close
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 15 Jun 2016 23:09:32 +0000 (19:09 -0400)]
Merge: Highlight: client can provide an linking policy
Links to entities can be defined by specializing `HighlightVisitor::hrefto`
Nitlight uses it to correctly provide better links (and avoid generating dead links)
Pull-Request: #2184
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Mon, 13 Jun 2016 20:48:30 +0000 (16:48 -0400)]
tests: update .res of nitlight and test_highlight
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 13 Jun 2016 20:46:52 +0000 (16:46 -0400)]
highlight: remove default links. Clients have to provide them
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 13 Jun 2016 20:45:39 +0000 (16:45 -0400)]
test_highlight: use only local links
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 13 Jun 2016 20:44:37 +0000 (16:44 -0400)]
nitlight: use contextual links
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 13 Jun 2016 20:40:01 +0000 (16:40 -0400)]
highlight: add HighlightVisitor::hrefto to allow clients to tweak generated links
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 13 Jun 2016 16:04:27 +0000 (12:04 -0400)]
Merge: nitunit: improve generated XML
The XML format used by Jenkins is under-specified. So after loosely googling and a lot of trials and errors here is some improvement of the XML that enhance the user experience on Jenkins.
To experiment, I used a false job to see the results of nitunit for the test cases in tests (where a lot are expected to fails)
* the (ANSI-colored) log: http://gresil.org/jenkins/job/ZZnothing/195/console
* the results: http://gresil.org/jenkins/job/ZZnothing/195/testReport/
The main improvements are:
* messages are open by default (when you click on the + of a failed tests)
* add a time (not impressive but might be useful on real tests)
* all test cases are counted
* more readable names. Compare with http://gresil.org/jenkins/job/ZZnothing/189/testReport/ for instance
Pull-Request: #2182
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Mon, 13 Jun 2016 16:04:25 +0000 (12:04 -0400)]
Merge: makefiles: simplify them and assume that Nit tools are in the PATH
close #2105
Pull-Request: #2181
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 13 Jun 2016 16:04:24 +0000 (12:04 -0400)]
Merge: hightlight: improve infrastructure
infoboxes that popup where broken some time ago. This PR fix them and add two toggle for clients.
* `show_messages` to underline tokens and show error messages (or not)
* `show_infobox` to attach (or not) popupable infoboxes (those that where broken).
demo is available http://info.uqam.ca/~privat/tmp/nitlight/
Note: the UI is still terrible, but I have no better idea than these ugly popups to present complex contextual information.
Pull-Request: #2180
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Mon, 13 Jun 2016 16:04:21 +0000 (12:04 -0400)]
Merge: hightlight as a service
Some small adaptation to make the various tools less command-line dependent.
As a proof a concept, there is a simple nitlight&nitpick online tools.
Maybe a future nit online validador (nitltn?)
http://pratchett.info.uqam.ca:8081/
It seems that the machine is no more accessible from outside :/
Pull-Request: #2179
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Sat, 11 Jun 2016 03:25:27 +0000 (23:25 -0400)]
tests: update nitunit results
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 11 Jun 2016 20:04:01 +0000 (16:04 -0400)]
nitunit: add --no-time to avoid time and improve reproductible results
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 11 Jun 2016 03:23:46 +0000 (23:23 -0400)]
nitunit: move compilation errors to `<testcase>` as they are ignored in `<testsuite>`
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 11 Jun 2016 03:21:06 +0000 (23:21 -0400)]
nitunit: use shorter names in the XML
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 11 Jun 2016 03:20:00 +0000 (23:20 -0400)]
nitunit: use `message` attribute in XML to store the error message.
Doing so make it visible by defaukt.
The content is displayed as `stack trace`
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 11 Jun 2016 01:45:27 +0000 (21:45 -0400)]
nitunit: add time information
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 11 Jun 2016 00:09:08 +0000 (20:09 -0400)]
makefiles: simplify them and assume that Nit tools are in the PATH
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 18:17:09 +0000 (14:17 -0400)]
tests: update light .res
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 18:10:48 +0000 (14:10 -0400)]
highlight: highlight ids in a qualified id
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 18:10:15 +0000 (14:10 -0400)]
highlight: add two configuration, show_messages and show_infobox
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 18:08:45 +0000 (14:08 -0400)]
highlight: always decorate children token
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 16:07:05 +0000 (12:07 -0400)]
pnacl: update because `compute_nit_dir` was renamed
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 16:06:32 +0000 (12:06 -0400)]
src: add examples/nitlight_as_a_service.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 14:00:59 +0000 (10:00 -0400)]
toolcontext: disable error messages if `opt_warn.value` is negative
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 14:00:15 +0000 (10:00 -0400)]
toolcontext: make `nit_dir` more robust and client-definable
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 13:46:21 +0000 (09:46 -0400)]
highlight: can hightlight a full source file (not a specific node)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 01:58:40 +0000 (21:58 -0400)]
Merge: lib/core: Renamed `Text::bytelen` to `Text::byte_length`
As one famous man once said: "Je vous ai compris!".
So, I understood that some of us (@xymus, @ppepos, @BlackMinou, etc.) did not like the `bytelen` name, since it was not that explicit.
Well, its days are numbered and it is replaced by the longer but more explicit `byte_length`.
Pull-Request: #2173
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 10 Jun 2016 01:55:27 +0000 (21:55 -0400)]
Merge: Added contributing guidelines and link from readme
As discussed in #2133, contribution guidelines are hard to find.
This PR is an attempt to ease the process by giving newcomer friendly advices and some more insight on the contribution process for Nit.
@tonygaetani, do you think a document like this one would have been helpful for you ? Is there anything you would change to make it friendlier/clearer ?
Close #2133
Pull-Request: #2134
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Jun 2016 01:55:20 +0000 (21:55 -0400)]
Merge: Base64: Revamped base64_decode and added a strict mode
As talked with @ppepos, base64_decode now supports either `strict` or `non-strict`
modes when decoding a base64 string.
The `strict` mode is inspired from the `-i` option from the Unix `base64` command, which ignores non-compliant characters and non-padded `base64` strings.
This is more or less what we do now, `strict` being the default.
Since only one allocation and copy is done now, performance should be better.
There is however one pitfall of this implementation due to the `nullable Object` contract from `Collection[K]`, causing multiple boxings, some further optimization could be done on that front.
Pull-Request: #2086
Reviewed-by: Jean Privat <jean@pryen.org>
Lucas Bajolet [Wed, 8 Jun 2016 19:52:02 +0000 (15:52 -0400)]
tests: Updated old tests sav
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Wed, 8 Jun 2016 15:07:43 +0000 (11:07 -0400)]
tests: Improved base64 test for edge strict cases
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Mon, 16 May 2016 15:36:51 +0000 (11:36 -0400)]
lib/base64: Revamped `decode_base64` for better performances and introduction of a strict mode
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Wed, 8 Jun 2016 18:48:42 +0000 (14:48 -0400)]
lib/core: Renamed `Text::bytelen` to `Text::byte_length`
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Wed, 8 Jun 2016 15:06:40 +0000 (11:06 -0400)]
lib/core: Added `is_whitespace` method to `Byte`
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 27 May 2016 18:06:33 +0000 (14:06 -0400)]
nit: Added link to `CONTRIBUTING.md` from the README
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 27 May 2016 18:05:58 +0000 (14:05 -0400)]
nit: Added `CONTRIBUTING.md` file to repository
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Wed, 8 Jun 2016 13:00:50 +0000 (09:00 -0400)]
Merge: nitweb: add misc features
A little of everything in this PR:
* show all properties of a class: http://nitweb.moz-code.org/class/core::Array (see all props tab)
* show code into linearization card: http://nitweb.moz-code.org/class/core::Array (see linearization tab)
* show class definitions for modules: http://nitweb.moz-code.org/module/core::array
Pull-Request: #2172
Reviewed-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Wed, 1 Jun 2016 03:08:17 +0000 (23:08 -0400)]
nitweb/angular: show mclass all properties
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 17:09:25 +0000 (13:09 -0400)]
nitweb/angular: show module definitions
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 17:07:58 +0000 (13:07 -0400)]
nitweb/angular: load mentity definitions for classes and properties
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 17:06:10 +0000 (13:06 -0400)]
nitweb: add /api/defs/:entity to list definitions
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 17:54:53 +0000 (13:54 -0400)]
nitweb/angular: show code in definition cards
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 7 Jun 2016 19:11:11 +0000 (15:11 -0400)]
Merge: nitweb: add `code` tab for modules, classdefs and propdefs.
Interesting demos:
* http://nitweb.moz-code.org/module/array_debug::array_debug
* http://nitweb.moz-code.org/classdef/core$Array
* http://nitweb.moz-code.org/propdef/core::abstract_text$Object$to_s
Only the two last commits are relevant since the rest belongs to #2170
Pull-Request: #2171
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 7 Jun 2016 19:11:09 +0000 (15:11 -0400)]
Merge: nitweb: list linearized definitions
Display linearization lists:
* Mclass linearize all the class definitions
* linearization of `core::Array` mclassdefs: http://nitweb.moz-code.org/class/core::Array
* MProperty linearize all the prop definitions
* linearization of `core::Object::hash`: http://nitweb.moz-code.org/property/core::Object::hash
* MClassDef linearize to intro
* linearization of `core::flat$Array`: http://nitweb.moz-code.org/classdef/core::flat$Array
* MPropdef linearize to intro
* linearization of `core$Array$Object::SELF`: http://nitweb.moz-code.org/propdef/core$Array$Object::SELF
Pull-Request: #2170
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 7 Jun 2016 19:10:59 +0000 (15:10 -0400)]
Merge: catalog: only render the asked packages (not the imported ones)
Imported packages where always shown. Not a good behavior on most command-line cases.
Pull-Request: #2168
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 7 Jun 2016 19:10:53 +0000 (15:10 -0400)]
Merge: nitunit: testsuites are explicit
nitunit do no more try to be clever and find test-suites.
Previously, `nitunit foo.nit` caused the execution of the test suite `test_foo.nit` if it exist.
This behavior had some drawbacks:
* the test suite must follow a strict naming convention `test_*`
* the test suite must be in the same directory
* there must a an associated module. no way to create a test-suite out of thin air
* nitunit do nothing if you give the test suite instead of the module
* `-t` used to precise the location of the test suite did not work with more than one module
The proposed solution is to remove all this test-suite association with a module and asks the used to use the test-suite instead.
nitunit test_foo.nit
Because nitunit in intended to work with more than one module, there is basically no change for client that do
nitunit .
Pull-Request: #2167
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 7 Jun 2016 19:10:44 +0000 (15:10 -0400)]
Merge: popcorn: use nitunit for blackbox testing
Pull-Request: #2153
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 7 Jun 2016 16:05:52 +0000 (12:05 -0400)]
nitrpg: `test_helper` is not a test_suite. just an helper.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 6 Jun 2016 18:22:35 +0000 (14:22 -0400)]
loader: make module name mismatch a false error so nitunit can test them
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 6 Jun 2016 18:29:56 +0000 (14:29 -0400)]
tests: update niunit .sav
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 6 Jun 2016 18:21:58 +0000 (14:21 -0400)]
nitunit: update man page about test-suite
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 6 Jun 2016 17:44:38 +0000 (13:44 -0400)]
nitunit: drop -t option
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 6 Jun 2016 17:43:38 +0000 (13:43 -0400)]
nitunit: just process test_suite when given
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 6 Jun 2016 17:26:20 +0000 (13:26 -0400)]
nitunit: compile with -q to silent warnings
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Tue, 7 Jun 2016 16:45:20 +0000 (12:45 -0400)]
nitweb/angular: show code tab for modules, classdefs, propdefs
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 16:45:13 +0000 (12:45 -0400)]
nitweb/angular: add code to model
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 7 Jun 2016 16:07:41 +0000 (12:07 -0400)]
Merge: nitunit: Fix documentation to reflect actual test discovery algorithm
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Pull-Request: #2166
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 7 Jun 2016 16:07:37 +0000 (12:07 -0400)]
Merge: escape_to_c: Escape trigraphs
Produce more standard-compliant code instead of relying on the default behaviour of gcc (or on its `-Wno-trigraphs` flag).
See also: https://github.com/nitlang/nit/pull/1949/commits/
000ac8de3c64790b0fbb0e868e406a6a280f3fa9
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Pull-Request: #2151
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Tue, 7 Jun 2016 16:07:22 +0000 (12:07 -0400)]
Merge: lib/nitcorn: fix last warnings
Pull-Request: #2147
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexandre Terrasa [Tue, 7 Jun 2016 16:00:46 +0000 (12:00 -0400)]
.gitattributes: add *.res to ignore whitespaces
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 13:40:24 +0000 (09:40 -0400)]
nitweb/angular: fix some bootstrap components
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 13:40:07 +0000 (09:40 -0400)]
nitweb/angular: show linearization for mclasses, mclassdefs, mproperties, mpropdefs
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 13:39:10 +0000 (09:39 -0400)]
nitweb/angular: add linearization directives
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 13:38:38 +0000 (09:38 -0400)]
nitweb/angular: add linearization to model
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 13:37:33 +0000 (09:37 -0400)]
nitweb: add /api/linearization/:full_name service
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 7 Jun 2016 15:56:14 +0000 (11:56 -0400)]
model_collect: introduce `collect_linearization` service
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean-Christophe Beaupré [Mon, 6 Jun 2016 16:09:17 +0000 (12:09 -0400)]
text: Test all implementations of `escape_to_c`
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Mon, 6 Jun 2016 16:04:00 +0000 (12:04 -0400)]
escape_to_c: Escape trigraphs
Produce more standard-compliant code instead of relying on the default
behaviour of gcc (or on its `-Wno-trigraphs` flag).
See also: https://github.com/nitlang/nit/pull/1949/commits/
000ac8de3c64790b0fbb0e868e406a6a280f3fa9
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Alexandre Terrasa [Tue, 7 Jun 2016 12:29:24 +0000 (08:29 -0400)]
popcorn: remove useless tests/ dir
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Mon, 6 Jun 2016 20:10:12 +0000 (16:10 -0400)]
catalog: only render the asked packages (not the imported ones)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean-Christophe Beaupré [Mon, 6 Jun 2016 17:31:54 +0000 (13:31 -0400)]
nitunit: Fix documentation to reflect actual test discovery algorithm
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean Privat [Mon, 6 Jun 2016 15:12:57 +0000 (11:12 -0400)]
Merge: nitweb: use ConsoleLog middleware
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2163
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 6 Jun 2016 15:12:12 +0000 (11:12 -0400)]
Merge: nitweb: use catalog as homepage
Used the Catalog API with Nitweb to provide a homepage.
Demo: http://nitweb.moz-code.org/
Pull-Request: #2162
Reviewed-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Wed, 25 May 2016 03:58:18 +0000 (23:58 -0400)]
nitweb: use ConsoleLog middleware
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 6 Jun 2016 13:02:43 +0000 (09:02 -0400)]
nitweb/angular: display Catalog as homepage
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 6 Jun 2016 13:01:34 +0000 (09:01 -0400)]
nitweb/angular: introduce Catalog model
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 6 Jun 2016 13:00:49 +0000 (09:00 -0400)]
nitweb: introduce API catalog route
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 6 Jun 2016 11:46:41 +0000 (07:46 -0400)]
nitweb: move APIRouter to nitweb.nit
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 6 Jun 2016 11:46:04 +0000 (07:46 -0400)]
nitweb: move APIHandler to web_base
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Sun, 5 Jun 2016 16:12:49 +0000 (12:12 -0400)]
Merge: nitls: fix tree representation of nested groups
nitls wrongly detached some nested groups in tree-mode.
Before:
~~~
$ nitls -tp lib/nitcorn/examples/src/nitcorn_hello_world.nit lib/nitcorn/http_response.nit
lib/nitcorn/examples
`--lib/nitcorn/examples/src
`--lib/nitcorn/examples/src/nitcorn_hello_world.nit
lib/nitcorn
`--lib/nitcorn/http_response.nit
~~~
After:
~~~
$ nitls -tp lib/nitcorn/examples/src/nitcorn_hello_world.nit lib/nitcorn/http_response.nit
lib/nitcorn
|--lib/nitcorn/examples
| `--lib/nitcorn/examples/src
| `--lib/nitcorn/examples/src/nitcorn_hello_world.nit
`--lib/nitcorn/http_response.nit
~~~
Pull-Request: #2161
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Sun, 5 Jun 2016 16:10:23 +0000 (12:10 -0400)]
Merge: Honor `source.exclude` in ini files
`source.exclude` is used in very specific cases to prevent some .nit file of directory to belong to a package.
This means two things:
* when the loader is scanning/loading a full package or group, and finds an excluded group or module, then the excluded entity will be not included in the package (and not scanned/loaded)
* when the loader is explicitly requested to load an excluded entity, then it will be detached from the parent package. The excluded modules will be considered as standalone modules.
Pull-Request: #2160
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Sun, 5 Jun 2016 16:10:19 +0000 (12:10 -0400)]
Merge: nitunit with black boxes: alternative sav files and --autosav
Two new things:
* alternative .res location for better scalability
* option --autosav to create/update the .res files
For each TestCase `test_bar` of a TestSuite `test_mod.nit`, a corresponding file with the expected output is looked for:
* "test_mod.sav/test_bar.res". I.e. test-cases grouped by test-suites.
This is the default and is useful if there is a lot of test-suites and test-cases in a directory
* "sav/test_bar.res". I.e. all test-cases grouped in a common sub-directory.
Useful if there is a lot of test-suites OR test-cases in a directory.
* "test_bar.res" raw in the directory.
Useful is there is a few test-suites and test-cases in a directory.
All 3 are exclusive. If more than one exists, the test-case is failed.
If a corresponding file then the output of the test-case is compared with the file.
To helps the management of the expected results, the option `--autosav` can be used to automatically create and update them.
With the option, if a black block test fails because a difference between the expected result and the current result then the expected result file is updated (and the test is passed).
If a test-case of a test-suite passes but that some output is generated, then an expected result file is created.
It is expected that the created/updated files are checked since the tests are considered passed.
A VCS like `git` is often a good tool to check the creation and modification of those files.
Pull-Request: #2158
Jean Privat [Sat, 4 Jun 2016 16:42:41 +0000 (12:42 -0400)]
code: add some `source.exclude` to remove errors in the catalog
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 4 Jun 2016 15:06:07 +0000 (11:06 -0400)]
tests: add test for source.exclude ini entry
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 4 Jun 2016 17:38:20 +0000 (13:38 -0400)]
tests: update sav/test_basename_perf_args1.res that rely on project1
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 4 Jun 2016 16:18:28 +0000 (12:18 -0400)]
tests: improve nitls tests
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 4 Jun 2016 16:17:51 +0000 (12:17 -0400)]
nitls: fix broken group tree when there is a chain of empty groups
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 4 Jun 2016 14:56:29 +0000 (10:56 -0400)]
loader: honor `source.exclude` config in the package.ini
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 4 Jun 2016 14:54:21 +0000 (10:54 -0400)]
modelbuilder: stop reporting hints again and again. It could be time consuming.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Jun 2016 00:34:02 +0000 (20:34 -0400)]
nitunit: update manpage with multiple .res and --autosav
Signed-off-by: Jean Privat <jean@pryen.org>