1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

14471 Commits

Author SHA1 Message Date
d7c244e5ec x.json2: support time.Time values in encode (#16643)
* feat: json2 time.Time encode

* refactor: best var name

* fix: use 'RFC 3339' as pattern in json encode

* fix: unused var for unaliased_typ

* fix: improve test

* use the clearer test after V ad24c22, that made format_rfc3339 more stable

Co-authored-by: Delyan Angelov <delian66@gmail.com>
2022-12-11 16:54:28 +02:00
ad24c22250 time: add more UTC/local time conversion functions, make Time.format_rfc3339 more stable 2022-12-11 13:34:01 +02:00
73e886eafe checker: fix generic fn returning result (#16646) 2022-12-11 12:34:58 +02:00
94098eef79 time: use UTC time in Time.format_rfc3339, make test more robust 2022-12-11 10:36:29 +02:00
2ecb892985 time: add Time.format_rfc3339() method 2022-12-11 10:23:05 +02:00
3ea9e3aba9 github: make Environment field in feature request match bug report (#16645) 2022-12-11 09:06:37 +02:00
e8c0b098b0 x.json2: add encode_pretty/1 (#16634) 2022-12-10 20:44:23 +02:00
4b2699fddd cgen: fix copying of a fixed array parameter to a function (fix #16640) 2022-12-10 20:10:01 +02:00
30b39bebde x.json2: refactor json tests (#16638) 2022-12-10 18:44:20 +02:00
44a539f186 github: change bug template Envionment field to textarea (#16641) 2022-12-10 18:39:22 +02:00
799af2adad native: support simple multi return (#16628) 2022-12-10 16:26:43 +02:00
42a9eaac0e regex: make match_string() receiver immutable 2022-12-10 13:03:42 +03:00
7c4f45a375 docs: change <> to [] in docs.md part2 (#16633) 2022-12-10 11:36:59 +02:00
ad5290677c docs: change <> to [] in docs.md (#16632) 2022-12-10 10:47:03 +02:00
7c02274754 v.pkgconfig: support PKG_CONFIG_PATH_DEFAULTS for overriding the default search path list too (enable easier -m32 with a custom tcc cross compiler) 2022-12-10 00:50:24 +02:00
1ba1f99b9c orm: declare missing functions to handle literal types (#16627) 2022-12-09 20:34:34 +02:00
b6c2aab092 json2: support encoding of optional struct fields (#16521) 2022-12-09 18:08:24 +02:00
ba8e61ebf3 cgen: fix return typeof[T]() in generic functions (#16626) 2022-12-09 17:24:47 +02:00
6c0f22416f cgen: fix if cond with result or optional in infix expr (#16625) 2022-12-09 12:01:14 +02:00
68fb4e9fe5 cgen: fixevaluation order for match expressions inside boolean ones (fix #16554) (#16616) 2022-12-09 11:56:38 +02:00
eb88f7e255 builtin: fix bug with string.split_into_lines, when lines have extra CR's at their end (#16620) 2022-12-09 09:15:50 +02:00
7091010a53 arrays: add map_of_counts/1, map_of_indexes/1 as well as index_of_first/2, index_of_last/2 utilities (#16618) 2022-12-09 00:37:07 +02:00
f365771499 cgen: fix nested struct generation for globals for gcc (#16614) 2022-12-08 21:38:01 +02:00
d62fc777c9 ci: add a 'Build AdventOfCode' step in the v-apps-compile job weekly.2022.49 2022-12-08 11:15:07 +02:00
32c80c53b3 cgen: fix generic functions returning none or error values with generic result types (#16613) 2022-12-08 11:08:39 +02:00
2261606b56 checker: disallow Bar{...foo} when Bar needs more fields, than what foo has (#16609) 2022-12-07 16:56:07 +02:00
458e68e196 orm,sqlite,mysql,pg: cleanup import v.ast, using typeof[Type]() 2022-12-07 13:40:46 +02:00
4eb81d2f05 checker: improve error messages of missing generic type names (#16610) 2022-12-07 11:29:18 +02:00
48a7de643e all: support typeof[ T ]().idx and typeof[ T ]().name, where T can be any type, including ![]&string (#16513) 2022-12-07 11:26:27 +02:00
bb705c01d2 parser: add proper error msg for := used in const decl (#16607) 2022-12-06 22:44:33 +03:00
921416d821 parser: fix parsing generic types using '[]' in anon fn decl (#16605) 2022-12-06 18:15:59 +02:00
cf015e5073 checker: add clearer errors for break/continue used within a $for loop (#16600) 2022-12-06 17:27:59 +02:00
ada8643ac5 checker: disallow using builtin type names for const names (#16599) 2022-12-06 15:44:25 +02:00
5fc7b6d3d6 tools: add tests for vcomplete (#16587) 2022-12-06 13:02:32 +02:00
e35f5f290e cgen: fix string of map with generic struct value (#16595) 2022-12-06 12:38:05 +02:00
a96e2e7093 parser: fix parsing embedded generic interface using '[]' (#16603) 2022-12-06 12:37:36 +02:00
46bb62955b cgen: fix generic array init with fields (#16601) 2022-12-06 09:33:26 +02:00
edfaa76b3e checker: fix panic caused by compile-time code within or block (#16602) 2022-12-06 09:26:04 +02:00
94dc3c1c36 ci: fix the platform image for gg-regressions to ubuntu-20.04 (github is migrating ubuntu-latest to 22.04) 2022-12-06 09:13:02 +02:00
70fed41660 ci: override VTMP to /tmp for the jobs gg-regressions and doom-regressions 2022-12-05 17:07:48 +02:00
5288c613ef json2: decode refactor/fix (#16588) 2022-12-05 16:58:44 +02:00
50110d4c19 all: replace generic '<>' with '[]' in .vv files (#16593) 2022-12-05 16:32:15 +02:00
7e9e2ff459 cgen: fix if expr with multiple array call (fix #16583) (#16589) 2022-12-05 12:07:39 +02:00
59c979c8d2 checker: check generic interface type specifing type names (fix #16576) (#16591) 2022-12-05 10:05:32 +02:00
349ce08a11 tools: fix vcompletion for single-file directories (#16586) 2022-12-05 09:15:43 +02:00
ce06c2818d checker: add disallow none operations and range (#16584) 2022-12-05 08:50:36 +02:00
ffc73bf643 builder: fix v builder error (#16590) 2022-12-05 08:48:45 +02:00
d8d75ee67e v.builder: fix v -os wasm32_emscripten examples/2048 on windows 2022-12-04 17:49:33 +02:00
f5d0ba318e testing: support new events in the output modules of v test: .cmd_begin sent right before a _test.v execution, and .cmd_end sent right after a _test.v execution 2022-12-03 20:06:46 +02:00
5acd855525 term: add format_esc/1 (#16574) 2022-12-03 14:01:39 +02:00