The breaking changes affecting this library are:
* Macro arguments of type typedesc are now passed to the macro as
NimNode like every other type except static. Use typed for a behavior
that is identical in new and old Nim. See the RFC Pass typedesc as
NimNode to macros for more details.
(https://github.com/nim-lang/RFCs/issues/148)
* case object branch transitions via system.reset are deprecated.
Compile your code with -d:nimOldCaseObjects for a transition period.
The solution here is to compile with '-d:nimOldCaseObjects' for the
time being. I didn't understand how to modify the code to adhere to
the new way of initializing/changing variant objects.
* The compiler now enforces range checking which exposed a bug in the
fieldCount proc. For variant objects where one of the branches is
given on one line, e.g.
...
of akDog: barkometer: int
...
the field wasn't counted and the total field count was not accurate.
Extens the `Level` type in `tojson` by a `expKey` field, which is used
to indicate whether a node still expects a key or not.
NOTE: not sure if the `expKey = true` statements in lines 163 and 183
are necessary / correct. Tests work this way though.
Since the null terminator is not available anymore we need to be
careful how we access strings in the lexer.
This should probably be solved in a nicer and more scalable way! :/
Now check for content *and* length of the strings in
`tserialization`. Also adds a test case for the case with which the
old version would have failed (one string longer than the other, thus
being different).
This version tries to keep the error reporting mechanism the same as
the old version.
Converting an integer via `T(number)` to some integer will cause a
range error, if it doesn't fit. Maybe it didn't in the past, which is
why the code worked before? Some other error was thrown?
With this code anyway it crashed, because it threw an internal error.