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

11195 Commits

Author SHA1 Message Date
Delyan Angelov
9f1239c56e vweb,net: fix vweb crash when the connection was closed prematurely (tested with Chrome on windows, refreshing as fast as possible) 2022-12-17 19:08:59 +02:00
yuyi
e83a8416d5
ast, parser: fix generic struct init with inconsistent generic types (#16697) 2022-12-17 18:17:43 +02:00
Felipe Pena
9921598c91
cgen: fix struct field initialisation with a fixed array (#16692) 2022-12-17 18:15:17 +02:00
Delyan Angelov
1aec40a126
vweb: flush stdout after the Running app on message, fix potential invalid map value access in serve_if_static 2022-12-17 18:04:50 +02:00
Felipe Pena
65a020e385
cgen: fix comptime checking optional type with IS operator (#16688) 2022-12-16 16:53:04 +03:00
l-m
f0a252d0e6
builtin: apply .nogrow flags to gcboehm array (#16689) 2022-12-16 07:57:50 +02:00
Delyan Angelov
0a11955284
parser: support an unambiguous sizeof[T]() and isreftype[T]() (part 1) (#16684) 2022-12-15 19:21:52 +02:00
Ikko Ashimine
e5e73ebbfa
regex: fix typo in regex.v (#16683) 2022-12-15 18:54:07 +02:00
Swastik Baranwal
bd1d96de0e
cgen: add support for alias map keys (#16682) 2022-12-15 18:53:23 +02:00
Delyan Angelov
3643785981
pref: deprecate -error-limit in favour of the documented -message-limit option. 2022-12-15 10:37:57 +02:00
yuyi
fd472d2d41
toml: minor cleanup in toml tests (#16679) 2022-12-15 10:16:42 +02:00
Makhnev Petr
db2111235e
tests: add a teamcity output format for V's test runner (#16681) 2022-12-15 09:29:09 +02:00
Felipe Pena
c3ee26f15f
checker,cgen: fix dump when using comptime variable val.${field.name} (#16671) 2022-12-14 20:45:28 +02:00
Delyan Angelov
f762d46c84
pg: add compatibility.h, using a PG_VERSION_NUM check in the preprocessor, to just hardcode the missing CONNECTION_ numbers 2022-12-14 18:27:42 +02:00
Delyan Angelov
3b683f11e0
pg: comment out C.CONNECTION_GSS_STARTUP, which is not available on Debian 10 (PG 11) 2022-12-14 16:39:29 +02:00
yuyi
8e3a90ae79
cgen: minor cleanup in struct_init() (#16676) 2022-12-14 15:25:09 +02:00
yuyi
8ab4c7742c
ast, checker: fix generic struct init with inconsistent generic types (#16675) 2022-12-14 14:57:12 +02:00
Delyan Angelov
173b1895d6
pg: cleanup implementation, make -cstrict pass with both gcc-11 and clang-12 (by tightening the C wrapper declarations) 2022-12-14 13:17:00 +02:00
Hitalo Souza
70bb989537
doc: update the README for json2 (#16657) 2022-12-14 10:21:29 +02:00
l-m
acbd93b54c
builtin: add .nogrow and .nofree flags to array (#16661) 2022-12-14 09:44:14 +02:00
Subhomoy Haldar
b07e447764
encoding.html: add escape() function (#16666) 2022-12-13 22:10:57 +02:00
yuyi
69f7c45bec
builtin: fix array init with array default (#16664) 2022-12-13 18:05:33 +02:00
Felipe Pena
738fe77300
cgen: fix short circuiting behaviour of logical expressions, when several PrefixExpr's are used in if conditions (#16660) 2022-12-13 13:09:03 +02:00
Delyan Angelov
992621bd91
bench: add a small performance comparison script bench_json_vs_json2.v 2022-12-12 10:26:04 +02:00
Hitalo Souza
b682e9ec0b
json2: decode time.Time, supporting unix timestamps (like json), as well as rfc3339 datetimes (#16653) 2022-12-12 10:06:29 +02:00
yuyi
8225622da5
checker: check smartcasting requires either an immutable value, or an explicit mut keyword before the value (#16654) 2022-12-12 09:22:56 +02:00
yuyi
d87e400e77
transformer: clean up expr_stmt_match_expr() (#16655) 2022-12-12 08:41:02 +02:00
Felipe Pena
1e7208d28b
parser: fix initialization for array of Option type - []?Cell{} (#16652) 2022-12-12 08:40:05 +02:00
Hitalo Souza
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
Delyan Angelov
ad24c22250
time: add more UTC/local time conversion functions, make Time.format_rfc3339 more stable 2022-12-11 13:34:01 +02:00
yuyi
73e886eafe
checker: fix generic fn returning result (#16646) 2022-12-11 12:34:58 +02:00
Delyan Angelov
94098eef79
time: use UTC time in Time.format_rfc3339, make test more robust 2022-12-11 10:36:29 +02:00
Delyan Angelov
2ecb892985
time: add Time.format_rfc3339() method 2022-12-11 10:23:05 +02:00
Hitalo Souza
e8c0b098b0
x.json2: add encode_pretty/1 (#16634) 2022-12-10 20:44:23 +02:00
Delyan Angelov
4b2699fddd
cgen: fix copying of a fixed array parameter to a function (fix #16640) 2022-12-10 20:10:01 +02:00
Hitalo Souza
30b39bebde
x.json2: refactor json tests (#16638) 2022-12-10 18:44:20 +02:00
lemon
799af2adad
native: support simple multi return (#16628) 2022-12-10 16:26:43 +02:00
Alexander Medvednikov
42a9eaac0e regex: make match_string() receiver immutable 2022-12-10 13:03:42 +03:00
Delyan Angelov
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
Felipe Pena
1ba1f99b9c
orm: declare missing functions to handle literal types (#16627) 2022-12-09 20:34:34 +02:00
Hitalo Souza
b6c2aab092
json2: support encoding of optional struct fields (#16521) 2022-12-09 18:08:24 +02:00
Felipe Pena
ba8e61ebf3
cgen: fix return typeof[T]() in generic functions (#16626) 2022-12-09 17:24:47 +02:00
yuyi
6c0f22416f
cgen: fix if cond with result or optional in infix expr (#16625) 2022-12-09 12:01:14 +02:00
yuyi
68fb4e9fe5
cgen: fixevaluation order for match expressions inside boolean ones (fix #16554) (#16616) 2022-12-09 11:56:38 +02:00
Carter
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
Delyan Angelov
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
Felipe Pena
f365771499
cgen: fix nested struct generation for globals for gcc (#16614) 2022-12-08 21:38:01 +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
Felipe Pena
2261606b56
checker: disallow Bar{...foo} when Bar needs more fields, than what foo has (#16609) 2022-12-07 16:56:07 +02:00
Delyan Angelov
458e68e196
orm,sqlite,mysql,pg: cleanup import v.ast, using typeof[Type]() 2022-12-07 13:40:46 +02:00