Commit Graph

34 Commits

Author SHA1 Message Date
Jacek Sieka 11a8aa64d2 enable --styleCheck:usages 2021-12-07 00:33:04 +02:00
Jacek Sieka fcd0eadadd clean up imports, unittest2 2021-08-16 15:09:31 +03:00
Zahary Karadjov f9a1121b87
Make the flavors support optional when defining formats
Other changes:

* The format declarations have been broken down in multiple
  parts. This makes it possible to structure the implementation
  libraries in a way such that the format name is accessible even
  when importing only reader or writer modules.

* Flavors lead to more complicated Reader and Writer types.
  Instead of requiring the user to write down long type names
  such as `JsonReader[DefaultFlavor]`, it's now possible to refer
  to the reader and writer type of each format using expressions
  such as `Json.Reader` and `Json.Writer`.

* Fixed a typo (PreferredOutput)
2021-03-19 04:04:14 +02:00
Zahary Karadjov 84ffa54554
Add support for Format flavors 2021-03-18 12:55:50 +02:00
Zahary Karadjov 261de741b7
Revert "Handle record types with when statements"
This reverts commit dfd6e349a6.
2021-02-18 23:08:21 +02:00
Zahary Karadjov 32fce5df8d
Revert "Support when statements in records that reuse the same field name in different branches"
This reverts commit 4e2ffe3f6d.
2021-02-18 23:07:52 +02:00
Jacek Sieka 293a987c51 work around broken gc during global init 2021-02-18 22:31:23 +02:00
Zahary Karadjov 4e2ffe3f6d
Support when statements in records that reuse the same field name in different branches 2021-01-06 15:27:28 +02:00
Zahary Karadjov dfd6e349a6
Handle record types with when statements 2020-12-22 20:24:54 +02:00
jangko 474bdbf49c silence declared but not used warning 2020-08-05 10:08:27 +03:00
Zahary Karadjov 5b11c41731
Handle updates in nim-stew 2020-07-08 00:31:20 +03:00
Zahary Karadjov e0e51015b7
Handle pragma-annotated field names; Fix #28 2020-06-24 14:08:56 +03:00
Zahary Karadjov 5498b62dbd
Stricter error handling 2020-06-16 00:59:35 +03:00
Zahary Karadjov d8ca3daf3a
raises annotations for some generated procs 2020-05-30 22:37:23 +03:00
Zahary Karadjov 8a013591bd
Add a pragma for customizing the field names in formats such as Json 2020-05-20 13:48:14 +03:00
Zahary Karadjov b61fcb51ad
Work-around a scary issue affecting the SSZ serialization 2020-05-19 13:42:56 +03:00
Zahary Karadjov 1989a55145
Remove a warning triggered by not nil types 2020-04-23 01:50:25 +03:00
Zahary Karadjov 68e9ef7901 More comprehensive test suite; Depends on Fixes in Nim 1.2 2020-04-09 19:25:07 +03:00
Zahary Karadjov ae60eef4e8
Reduce warnings in Nim 1.0.2; Fix #16 2019-11-04 18:55:12 +00:00
Ștefan Talpalaru 43ff99a809
CI: update script path 2019-08-24 05:14:20 +02:00
Alexander Ivanov 034a6c8efe
Implement unnamed tuple support 2019-08-08 23:18:36 +03:00
Zahary Karadjov b42502b512
Some needed support for custom field serialization in Json 2019-08-07 01:19:32 +03:00
Zahary Karadjov 56ad4b18de
Transfer some of the complexity in handling case objects from SSZ to the general serialization lib 2019-08-05 16:54:17 +03:00
Zahary Karadjov 8e907c46fc
Fix a build issue affecting Nim 0.20.2 2019-08-05 16:54:17 +03:00
Zahary Karadjov 99daa96284
Custom serialization for object fields (initial version) 2019-08-05 16:54:17 +03:00
Zahary Karadjov e126d48e6c
Use the new fixed hasCustomPragma definition 2019-08-05 16:54:17 +03:00
Zahary Karadjov 60613bac5d
Better support for case objects; Some internal documentation 2019-08-05 16:54:17 +03:00
Jacek Sieka 5c2d0c7253
std_shims -> stew 2019-07-07 11:50:26 +02:00
Zahary Karadjov 6804ea2537 Improved custom serialization error handling 2019-03-20 03:16:27 +02:00
Zahary Karadjov 030c8e2cbe Use the latest OutputStream; Needed helpers for the SSZ support 2019-03-11 11:34:04 +02:00
Zahary Karadjov 65184697ff Fix a compiler error when using T.totalSerializedFields 2018-12-28 03:01:24 +02:00
Zahary Karadjov 94224f6e18 More comprehensive APIs; Tests 2018-12-19 12:44:18 +02:00
Zahary Karadjov 36cf03f7a9 temporary work-around for a Nim bug 2018-11-29 03:34:06 +02:00
Zahary Karadjov c8c8e3b7e2 Initial simple/naive implementation of the field enumeration logic 2018-11-11 13:41:04 +02:00