Merge: Serialization fixes and hardening
authorJean Privat <jean@pryen.org>
Mon, 8 Aug 2016 22:23:42 +0000 (18:23 -0400)
committerJean Privat <jean@pryen.org>
Mon, 8 Aug 2016 22:23:42 +0000 (18:23 -0400)
Improve the serialization services on multiple points:

* Fix JSON serialization of `DefaultMap` by writing its attributes. (Not only the "special" length, keys and values)
* Remove type casts and the like that would crash the program on invalid format of collections and maps, raise errors instead and return an empty instance.
* Improve (from horrible to bad) the type name used in deserialization errors when the type of an attribute is not in the AST. (This is pretty much the best we can do without moving the serialization phase after the model has been built.)
* Fix a test which failed on silent errors, and print errors so it doesn't happen again. Note that the errors with nitce are expected as it doesn't have the same `class_name` than the other engines.
* Update nitserial to silence `property-conflict` warnings in the generated module. This effectively hides the conflicts between the JSON and binary serialization because all conflicts are on generic types.

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


Trivial merge