Alexis Laferrière [Fri, 8 Sep 2017 00:53:57 +0000 (20:53 -0400)]
serialization: test the inspect serialization engine
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 4 Aug 2017 02:34:02 +0000 (22:34 -0400)]
serialization: redef of `inspect` using a new serializer
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 8 Sep 2017 14:43:32 +0000 (10:43 -0400)]
core: Bytes have a minimum capacity of 16 bytes
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 8 Sep 2017 14:06:31 +0000 (10:06 -0400)]
core: optimize Bytes::append_text using redefs in Text subclasses
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 7 Sep 2017 15:48:34 +0000 (11:48 -0400)]
core: protect access to _items in empty strings
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 8 Sep 2017 00:45:41 +0000 (20:45 -0400)]
serialization: move serialization_core
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 7 Sep 2017 19:04:29 +0000 (15:04 -0400)]
calculator: don't use fonts in the icon source
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 7 Sep 2017 19:11:35 +0000 (15:11 -0400)]
app: add code example to data_store, http_request and ui
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 6 Sep 2017 19:46:59 +0000 (15:46 -0400)]
app: report errors in DataStore and fix a warning
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 6 Sep 2017 19:46:22 +0000 (15:46 -0400)]
app: make DataStore a class and refine on each platform
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 6 Sep 2017 15:50:49 +0000 (11:50 -0400)]
app: tweak UI API doc
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 6 Sep 2017 15:51:00 +0000 (11:51 -0400)]
app: update clients to use `root_window`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 6 Sep 2017 13:37:15 +0000 (09:37 -0400)]
app: intro `root_window` to select the first visible window
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 25 Jul 2017 14:20:27 +0000 (10:20 -0400)]
stream: intro `BytesWriter` and `BytesReader`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 4 Sep 2017 22:21:57 +0000 (18:21 -0400)]
app: update UI example language and android style
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 7 Sep 2017 15:16:52 +0000 (11:16 -0400)]
highlight: optionally print errors when highlighting
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 7 Sep 2017 14:49:00 +0000 (10:49 -0400)]
Merge: Nitmetric fixes
Avoid some nitmetric crashes
Pull-Request: #2533
Jean Privat [Thu, 7 Sep 2017 14:48:58 +0000 (10:48 -0400)]
Merge: Nitweb: boost response time and some improvements
The main objective of this PR is to shorten the frontend response time.
The major culprit was that the full documentation was serialized in each response.
This PR makes nitweb return only the synopsis and lets the frontend ask for the full documentation if needed.
Also uniformizes and cleans tabs for entities:
* Moved data between tabs (such as inheritance data to the inheritance tab)
* Added missing tabs for packages and groups (http://nitweb.moz-code.org/doc/core%3Ecollection%3E/defs)
Demo: http://nitweb.moz-code.org/
Pull-Request: #2536
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 7 Sep 2017 14:48:56 +0000 (10:48 -0400)]
Merge: json: move up general services, support Byte and more
This PR is a general clean up of the `json` package to prepare the support of two new serialization engines, add small new features and fix some issues in code. It should not change its behavior for existing clients.
* Move up some general deserialization services from `json` to `serialization` in order to make them available to other engines. This includes the class name manipulation services and safety services controlling which types are deserialized, including `class_inheritance_metamodel`.
* Support writing and reading `Byte` as either a plain JSON string or a special object with metadata.
* Support reading `Char` and `Byte` from plain JSON input using simple heuristics.
* Test the deserialization of plain generated JSON and fix a typo in the tests.
* Fix other minor issues in code.
Pull-Request: #2538
Jean Privat [Thu, 7 Sep 2017 14:48:53 +0000 (10:48 -0400)]
Merge: gamnit: shadow mapping
Intro a basic API and the shaders for 3D actors to cast shadows. This feature is off by default, it can be activated by using a sun-like light with: `app.light = new ParallelLight`. This will require additional work to improve the performance, add more kind of lights (point, spotlight, ambient, etc.), support many lights and accept colored lights.
Many values can be tweaked to achieve the best performance tradeoff:
* `ParallelLight` is always centered on the `world_camera` to show shadows only around the player. Its attributes `width, height, depth` are in world coordinates and identify a prism where shadows are computed. Higher values show shadows further away and lower values show shadows in higher resolution.
* `App::shadow_resolution` sets the resolution of the depth texture. Higher is prettier but slower, there's also an upper limit depending on the hardware configuration. It is now hardcoded (but refinable) to 4096x4096 pixels, with is probably too high for some mobiles devices. More experimentation is needed to find a safe default value.
* For softer shadow edges, the shader applies a kind of antialiasing by tapping the depth texture many times for each fragment. It is currently hardcoded to 4 taps per fragment but it could be changed for better performances or smoother edges. I don't know where to expose this value in the API, it could be on the light, the material or even global. It can also be optimized by the hardware.
### Screenshots from Jump 'n' Gun
Looking down at the player's shadow:
![screenshot from 2017-08-29 10-31-48](https://user-images.githubusercontent.com/208057/
29829419-
62b27cfa-8cad-11e7-9d95-
696e594f4490.png)
Complex shadows from a turret and a shield projector:
![screenshot from 2017-08-29 10-35-45](https://user-images.githubusercontent.com/208057/
29829415-
5f08d5c2-8cad-11e7-87ca-
5e4566d2432b.png)
Pull-Request: #2543
Alexandre Terrasa [Tue, 6 Jun 2017 05:18:45 +0000 (01:18 -0400)]
nitunit: update documentation for annotations
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 18:57:58 +0000 (14:57 -0400)]
tests: update syntax tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 05:18:01 +0000 (01:18 -0400)]
nitunit: migrate test generation to annotations
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 05:16:27 +0000 (01:16 -0400)]
frontend: disable warnings for test modules
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 05:17:38 +0000 (01:17 -0400)]
src: migrate nitunits to annotations
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 05:19:51 +0000 (01:19 -0400)]
lib: migrate nitunits to annotations
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexis Laferrière [Thu, 31 Aug 2017 17:23:30 +0000 (13:23 -0400)]
json: fixme interpreter bug in constructors with return (#2546)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 27 Jul 2017 03:30:10 +0000 (23:30 -0400)]
serialization: move StrictHashMap related services
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 26 Jul 2017 15:01:52 +0000 (11:01 -0400)]
serialization: move up deser. safety services from `json`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 31 Aug 2017 19:44:15 +0000 (15:44 -0400)]
Merge: nitc: loader skip dot (hidden) directory
This will improve the loading time when there is a very
deep .git directory around.
Pull-Request: #2534
Jean Privat [Thu, 31 Aug 2017 19:44:13 +0000 (15:44 -0400)]
Merge: gamnit audio: control sound channels and don't crash if there's no sound card
Desktop clients can now control playing sounds with the new services from SDL2 mixer. The equivalent was already implemented for Android but not GNU/Linux. The new services still need to be fully exposed in the `app::audio` API.
This PR also removes the requirement to have a working sound card to launch a gamnit game.
Pull-Request: #2537
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 31 Aug 2017 19:44:12 +0000 (15:44 -0400)]
Merge: json: remove the old nitcc parser
Improve performances of the `json` package by removing the old nitcc parser to use only the custom string parser. It is faster at runtime and the nitcc parser classes were included with the JSON serialization services, slowing down compilation time even when not used.
The nitcc parser was still used only by a few clients, the only differences for the clients should be the error message, conflicts on the `Location` class, and improved performances.
It may be hard to see in the diff but the only differences in the `json` package are: the removal of the nitcc parser, move the string_parser in `static` (they are highly coupled), and make a few services private.
Note that the JSON nitcc grammar is still available in the nitcc project folder.
Warning: Until there's a service like `full_class_name`, deserializing classes with a name conflict is broken. I don't think that the 2-3 cases in the PR deserialize the generated JSON, so it should be OK for now.
Pull-Request: #2540
Jean Privat [Thu, 31 Aug 2017 19:44:11 +0000 (15:44 -0400)]
Merge: dom: fix two possible out of bounds string accesses
Pull-Request: #2542
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Thu, 31 Aug 2017 19:43:59 +0000 (15:43 -0400)]
Merge: lib/markdown: fix crash of the parser when parsing unfinished refs
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2544
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 31 Aug 2017 19:43:58 +0000 (15:43 -0400)]
Merge: lib/mongodb: fix database_names test
Pull-Request: #2545
Alexis Laferrière [Sat, 29 Jul 2017 11:31:44 +0000 (07:31 -0400)]
gamnit: don't crash if there is no sound
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 13 Jul 2017 01:44:58 +0000 (21:44 -0400)]
linux::audio: extract `play_channel`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 12 Jul 2017 13:16:39 +0000 (09:16 -0400)]
sdl2: add more `mixer` services
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 26 Jul 2017 12:05:02 +0000 (08:05 -0400)]
serialization: move up type name manipulation services out of `json`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 27 Jul 2017 16:03:58 +0000 (12:03 -0400)]
json: test deser. from plain JSON and fix typo
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 19 Aug 2017 18:57:19 +0000 (14:57 -0400)]
gamnit: intro basic shadow mapping
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 31 Aug 2017 13:52:15 +0000 (09:52 -0400)]
tests: udate more tests testing or depending on the JSON parser
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 22 Aug 2017 22:52:02 +0000 (18:52 -0400)]
model & neo: fix ambiguity in the use of Location
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 22 Aug 2017 17:50:18 +0000 (13:50 -0400)]
neo_doxygen: fix a few "type repetition" warnings
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 22 Aug 2017 17:49:08 +0000 (13:49 -0400)]
neo_doxygen: remove ambiguity in the use of Location
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 22 Aug 2017 19:50:34 +0000 (15:50 -0400)]
json: update expected error in unit test
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 3 Aug 2017 16:46:30 +0000 (12:46 -0400)]
json: remove the old nitcc parser
And move the content of `string_parser` to `static` because of high
coupling.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 30 Aug 2017 18:38:42 +0000 (14:38 -0400)]
lib/mongodb: fix database_names test
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Tue, 29 Aug 2017 17:02:05 +0000 (13:02 -0400)]
lib/markdown: fix crash of the parser when parsing unfinished refs
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexis Laferrière [Fri, 18 Aug 2017 17:49:35 +0000 (13:49 -0400)]
gamnit: add camera parameter to `draw` method
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 21 Aug 2017 15:25:58 +0000 (11:25 -0400)]
gamnit: intro UniformInt
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 21 Aug 2017 13:22:09 +0000 (09:22 -0400)]
gamnit: cull back faces
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 18 Aug 2017 14:31:27 +0000 (10:31 -0400)]
gamnit: fix 3D objects in dynamic resolution
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 17 Jul 2017 02:43:49 +0000 (22:43 -0400)]
dom: fix two possible out of bounds string accesses
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 29 Aug 2017 12:00:25 +0000 (08:00 -0400)]
git: restrict -diff attributes to specific files
Fix an issue where all `parser.nit` files didn't show a diff.
It wrongly caught lib/dom/parser.nit.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 22 Aug 2017 23:20:25 +0000 (19:20 -0400)]
nitc: serialization phase use the qualified class name in code gen
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 25 Jul 2017 20:51:02 +0000 (16:51 -0400)]
bytes: tweak doc to put forward the copy behavior of the slices
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 16 Aug 2017 02:29:22 +0000 (22:29 -0400)]
gamnit: print current config and list extensions
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 19 Aug 2017 20:33:16 +0000 (16:33 -0400)]
glesv2 & gamnit: fix typos and minor issues
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 16 Aug 2017 02:28:02 +0000 (22:28 -0400)]
glesv2: intro glGetString
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexandre Terrasa [Sat, 17 Jun 2017 22:27:01 +0000 (18:27 -0400)]
nitdoc: set icons for each kind of cards
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 17 Jun 2017 21:45:38 +0000 (17:45 -0400)]
nitweb: display defs tab for mpackages and mgroups
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 17 Jun 2017 21:45:01 +0000 (17:45 -0400)]
nitdoc: api returns defs for packages and groups
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 17 Jun 2017 20:51:13 +0000 (16:51 -0400)]
nitweb: do not show inheritance data in doc tab
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 17 Jun 2017 20:49:21 +0000 (16:49 -0400)]
nitweb: show parents and children in inheritance tab
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 17 Jun 2017 20:48:41 +0000 (16:48 -0400)]
nitweb: serialize POSetElement to JSON
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 17 Jun 2017 20:23:39 +0000 (16:23 -0400)]
nitweb: remove doc tab from entity card
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 17 Jun 2017 20:23:11 +0000 (16:23 -0400)]
nitweb: do not return full html doc in entity json
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 17 Jun 2017 20:10:15 +0000 (16:10 -0400)]
nitweb: frontend load full mdoc
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 17 Jun 2017 20:04:58 +0000 (16:04 -0400)]
nitweb: api serves full mdoc
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 05:14:13 +0000 (01:14 -0400)]
lib/popcorn: migrate nitunits to annotations
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 05:13:23 +0000 (01:13 -0400)]
contrib: migrate nitunits to annotations
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 04:12:52 +0000 (00:12 -0400)]
lib/core: remove useless test_suite
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 04:11:16 +0000 (00:11 -0400)]
nitunit: update tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 19 Jun 2017 15:54:29 +0000 (11:54 -0400)]
lib/core: introduce `test` annotation
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 19 Jun 2017 16:10:25 +0000 (12:10 -0400)]
nitunit: use `intern` constructor
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 01:25:23 +0000 (21:25 -0400)]
nitunit: use `before`, `after` annotations for test cases
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 17:00:59 +0000 (13:00 -0400)]
nitunit: use `before_all`, `after_all` annotations for propdefs in Sys
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 01:02:21 +0000 (21:02 -0400)]
nitunit: use `test` annotation for propdefs
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 18:00:31 +0000 (14:00 -0400)]
nitunit: use `test` annotation for classdefs
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 00:23:45 +0000 (20:23 -0400)]
nitunit: use `test` annotation for modules
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 6 Jun 2017 05:17:30 +0000 (01:17 -0400)]
loader: use `test` annotations for modules
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 17:48:15 +0000 (13:48 -0400)]
parse_annotations: parse nitunit related annotations
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 17:47:55 +0000 (13:47 -0400)]
model: introduce nitunit annotations in mentities
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexis Laferrière [Thu, 27 Jul 2017 16:05:13 +0000 (12:05 -0400)]
json: deser. chars serialized as strings and bytes as ints
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 26 Jul 2017 12:21:34 +0000 (08:21 -0400)]
json: support `Byte` in a similar way to `Char`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 25 Jul 2017 15:27:12 +0000 (11:27 -0400)]
serialization: fix typo and warning
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 3 Aug 2017 16:46:42 +0000 (12:46 -0400)]
json: avoid repeating if condition
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 25 Jul 2017 15:26:50 +0000 (11:26 -0400)]
json: don't reserve an id when not using it
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 3 Aug 2017 13:48:23 +0000 (09:48 -0400)]
nitc: loader skip dot (hidden) directory
This will improve the loading time when there is a very
deep .git directory around.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 3 Aug 2017 13:20:18 +0000 (09:20 -0400)]
nitmetrics: dont crash if nclassdef.mclassdef is null
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 3 Aug 2017 13:19:48 +0000 (09:19 -0400)]
nitmetrics: backport some code of subtype test
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 2 Aug 2017 18:17:26 +0000 (14:17 -0400)]
Merge: Nitsmell : Adding new code smells and print console updated
Add :
- New "no abstract implementation" code smell
- Toolcontext option to print one by one a detected codesmell
Update :
- Print console improve
- Feature envy codesmell prepose a move help
Pull-Request: #2514
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>
Jean Privat [Wed, 2 Aug 2017 18:17:06 +0000 (14:17 -0400)]
Merge: serialization: safe formal types, fix warnings in generated code and more
* Use `GetName` to better restrict the accepted static type for attributes with formal types. This should complete the protection against the injection of unexpected types through deserialization (reported by @ppepos).
* Update `nitserial` to intrude import modules with private serializable classes, instead of skipping them. Serializing private classes from the lib should probably be avoided, but at least now we support them and we can see them.
* Fix the deserialization of maps from JSON with metadata and cycles. A difference in the deserialization order could cause a reference to be read before the referenced object. This issue may still be caused by versionning, so a foolproof solution should probably be added to the JSON deserializer.
* Fix a warning in generated code, it was generated for each `serialize` class (quite a lot). It caused 25 warnings just in lib/github/api.nit.
* Implement serialization for the private classes of `core::queue` and don't crash on deserialization errors in `a_star`.
Pull-Request: #2531
Reviewed-by: Jean Privat <jean@pryen.org>
Florian Deljarry [Fri, 23 Jun 2017 15:17:24 +0000 (11:17 -0400)]
Nitsmell : Adding new code smells and print console updated
Add :
- New "no abstract implementation" code smell
- Toolcontext option to print one by one a detected codesmell
Update :
- Print console improve
- Feature envy codesmell prepose a move help
Signed-off-by: Florian Deljarry <deljarry.florian@gmail.com>
Jean Privat [Wed, 2 Aug 2017 13:30:28 +0000 (09:30 -0400)]
Merge: gamnit: misc fixes
Fix various bugs and issues related to gamnit :
* Expose the previously private class `SpriteSet` for clients to access `time` and set `time_mod` (as intended).
* Fix two bugs with animations: a div by zero in the shader that hid non-animated sprites on Android (a div by zero never crashes, but the return value is unspecified in OpenGL ES 2.0), and an array out of bounds error when an animation has a single frame.
* Cache `GamnitDisplay::aspect_ratio` as it appears to be a performance bottleneck.
* Fix the virtual gamepad not being interactive in Asteronits.
* `UICamera::camera_to_ui` returns a `Point3d` that can be used directly as a `Sprite::center`.
Pull-Request: #2532
Reviewed-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Tue, 18 Jul 2017 01:35:48 +0000 (21:35 -0400)]
asteronits: fix virtual gamepad
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 20 Jul 2017 18:44:22 +0000 (14:44 -0400)]
gamnit: don't remap sprites removed from a set after their modification
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 17 Jul 2017 18:06:56 +0000 (14:06 -0400)]
gamnit: fix div by zero when there is no animation
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 14 Jul 2017 16:21:17 +0000 (12:21 -0400)]
gamnit: fix animations with a single frame
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>