Commit Graph

85 Commits (master)

Author SHA1 Message Date
yuyi de136f6baf
checker: improve pub struct check (fix #14446) (#14777) 2022-06-19 17:42:22 +03:00
yuyi abf35270cf
checker: fix json decoder with generic struct (#14700) 2022-06-06 19:25:02 +03:00
yuyi 5d429140a4
json: fix json decode with missing map type field (#14678) 2022-06-04 20:27:11 +03:00
Delyan Angelov 8c969efe6b
tests: make json_test.v less noisy, to see errors easier 2022-05-26 15:27:54 +03:00
StunxFS 11bdb04d0c
json: fix struct field default value support (#14304) 2022-05-20 11:22:17 +03:00
Daniel Däschle d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
Alexander Medvednikov af73e195da net: byte fixes 2022-04-15 15:55:39 +03:00
Alexander Medvednikov d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
yuyi 2d6d6c9ac9
json: fix json decode with sumtype of multi array type (#14035) 2022-04-14 15:36:24 +03:00
yuyi dc08105022
json: fix error for json decode with sumtype (#14025) 2022-04-13 18:06:28 +03:00
yuyi 617608b23d
cgen: fix optional struct declarations for empty structs (#13970) 2022-04-08 14:51:37 +03:00
yuyi c9dcdf6744
cgen: fix json decode with optional argument (fix #13943) (#13958) 2022-04-06 19:34:22 +03:00
Delyan Angelov f5e4d17cf3
json: return errors with more context, on failed json.decode() calls. 2022-04-05 12:06:08 +03:00
Tim Basel 9d0a5942ac
builtin: change IError `msg` and `code` to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
Delyan Angelov 9ebd56caa7
cgen,json: bugfix for json.decode; now `[skip]` fields are initialised 2022-01-22 19:29:38 +02:00
yuyi e66e35ced1
json: fix error for json encoding sumtype value (#13248) 2022-01-22 17:55:19 +02:00
jeffmikels a60b381d5e
docs: adding skeleton README.md files for all vlib modules (#13034) 2022-01-05 18:06:08 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Anton Zavodchikov 80c15607da
json: assert encoded struct with a sumtype (#11970) 2021-09-25 20:29:52 +03:00
Anton Zavodchikov c75271fcb7
cgen: json sumtype inlining (#11961) 2021-09-24 16:49:00 +03:00
Anton Zavodchikov d51f8ed878
v.gen.c: use unmangled variant name for encoding sumtype values in json (#11554) 2021-09-20 21:19:16 +03:00
Rémi 2534946ead
json: support sumtypes (#11549) 2021-09-19 21:36:26 +03:00
Alexander Medvednikov d00808660f json: omitempty 2021-09-16 07:02:43 +03:00
Alexander Medvednikov c9d6242c6d json: top level array test 2021-08-20 11:41:09 +03:00
Hualin Song 4fb570522a
json: fix json.decode bug for u64 values greater than 2^31 (#11238) 2021-08-20 09:14:55 +03:00
Daniel Däschle 800c0e5092
vlib: remove deprecated map{} usages as well as deprecated functions (#11035) 2021-08-04 12:44:41 +03:00
Delyan Angelov 684c10af1f
json: support for a [required] field attribute (#10955) 2021-07-25 17:27:37 +03:00
Delyan Angelov 8a380f4699
tools: make `v test-cleancode` test everything by default (#10050) 2021-05-08 13:32:29 +03:00
Delyan Angelov d4f31412b7
v: deprecate `@VROOT` in favour of `@VMODROOT` (#9795) 2021-04-19 19:01:47 +03:00
Delyan Angelov 3e297bced4
ci: remove some tests from skip_with_werror in `v test-self` 2021-04-14 12:47:24 +03:00
Delyan Angelov accd4d83bf
ci: fix compilation 2021-04-04 20:14:51 +03:00
Alexander Medvednikov 57e6138a61 all: remove byteptr and charptr; replace them with &byte and &char 2021-04-04 17:43:32 +03:00
Delyan Angelov 7bbcf02134
ci: fix failing -Werror steps for code generated by json.encode(map{'a': []string{}}) 2021-03-18 12:13:06 +02:00
spaceface b712af56fd
all: bring back `panic(err.msg)` -> `panic(err)` (#9022) 2021-03-01 00:18:14 +01:00
spaceface d63b7bc35a
all: update repo to use the new error handling syntax (#8950) 2021-02-28 23:20:21 +03:00
spaceface b9a381f101
all: migrate to the new Option (p. 1) (#8924) 2021-02-28 22:24:29 +03:00
Nick Treleaven 4a0367a63c
vlib: add [unsafe] tag to more functions: tos, string_from_wide, strings.Builder: write_bytes, free (#8766) 2021-02-15 17:15:52 +02:00
Alexander Medvednikov 035a163454 json: encode_pretty (p. 2) + tests 2021-02-10 10:17:29 +01:00
Alexander Medvednikov f67e4ab57c json: encode_pretty (p. 1) 2021-02-10 10:13:06 +01:00
Nick Treleaven 64d12cdc8d
checker: check number of C function arguments for some cases (#8444) 2021-01-30 18:33:36 +01:00
Lukas Neubert ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
yuyi 2ad2d68d7c
json: fix decoding of null map/array (#7936) 2021-01-07 20:21:22 +01:00
Alexander Medvednikov b3e0926601 json: decode/encode time.Time 2020-12-22 07:24:44 +01:00
Seven Du 4a35a75b64
json: fix raw json string decoding crash when expected key is missing (#7206) 2020-12-09 20:10:41 +01:00
Xavier B fafe30b6aa
json: add support for aliased struct fields (#6556) 2020-12-05 16:13:18 +01:00
Alexander Medvednikov c7cefa9ce6 json: fix encoding pointers 2020-11-29 17:45:22 +01:00
Daniel Däschle 25912673a9
cgen: fix generic json bug (#6731) 2020-11-04 10:21:30 +02:00
Ned Palacios 1aec041371
json: fix encode/decode support for generic structs (#6489) 2020-09-29 03:15:00 +02:00
Vinicius Rangel bf065674cc
json: maps, memory leak, and error forwarding (#6116) 2020-08-16 02:30:37 +02:00
Delyan Angelov 0af415fa28 vlib: add unsafe{} wrappers to C. fn calls, to allow compiling with -prod again 2020-07-21 09:05:31 +03:00