Delyan Angelov
692624b47c
parser: add error for typeof(T), suggesting typeof[T]() instead
2023-06-06 11:27:17 +03:00
Felipe Pena
d3c679bdcb
cgen: fix fixed array of map ( #18347 )
2023-06-05 16:46:48 +03:00
yuyi
254ed1766c
ast: minor cleanup in generic_insts_to_concrete() ( #18349 )
2023-06-05 16:46:23 +03:00
Felipe Pena
169627722a
cgen: circular reference limit to auto_str for interface ( #18340 )
2023-06-05 16:45:44 +03:00
Swastik Baranwal
48c256bf3b
checker: allow casted enum val and const as fixed array size ( #18321 )
2023-06-05 16:44:55 +03:00
Felipe Pena
5440657364
fmt: fix alias type stripped comments ( #18346 )
2023-06-05 01:53:17 +02:00
yuyi
325f64bc60
ast: fix for in iterator with generic structs ( #18344 )
2023-06-04 18:15:15 +02:00
Ulises Jeremias Cornejo Fandos
02ea6028af
vlib: improvements to the context module ( #18318 )
2023-06-04 18:12:52 +02:00
yuyi
0e106c9062
checker: fix generic fn infering map argument ( #18341 )
2023-06-04 18:10:41 +02:00
Felipe Pena
8d2a0ffe37
cgen: fix option handling with auto heap variable ( #18336 )
2023-06-04 18:10:22 +02:00
Alexander Medvednikov
9dcd95ee34
examples: use printf in the coroutines example for now
2023-06-03 23:56:07 +02:00
Alexander Medvednikov
6fe6fe887d
coroutines: $if is_coroutine? {
2023-06-03 19:05:50 +02:00
Felipe Pena
4e21b2ab4e
parser: detect wrong usage of Option as concrete type ( #18334 )
2023-06-03 13:24:25 +02:00
kbkpbot
0fc33c6fa3
datatypes: add Bloom filter ( #18327 )
2023-06-02 10:56:22 +03:00
Lenni0451
9764342dbe
vweb: add support for host specific static files ( #18322 )
2023-06-02 10:55:59 +03:00
Felipe Pena
a8ea1f9d50
cgen, checker, parser: fix fixed array with channel ( #18315 )
2023-06-02 10:55:08 +03:00
Felipe Pena
82035f7610
repl: fix comparison operator treated as statement ( #18304 )
2023-06-02 10:54:43 +03:00
yuyi
5e12d3483c
checker: fix generic fn with nested generic fn call ( fix #18285 ) ( #18314 )
2023-06-02 10:52:29 +03:00
Alexander Medvednikov
a647a71c52
roadmap: remove any
2023-05-30 18:39:37 +02:00
yuyi
4dc338863c
checker: fix json decode with generic array of struct ( fix #18300 ) ( #18308 )
2023-05-30 14:25:33 +02:00
yuyi
ac6289301c
ast, cgen: fix generic struct with inconsistent generic types ( fix #18254 ) ( #18301 )
2023-05-30 14:24:54 +02:00
Turiiya
af05cfcbbc
toml, semver: minor optimization of conditions ( #18299 )
2023-05-30 14:24:27 +02:00
Felipe Pena
0b71cef78a
cgen: fix generic comptimeselector array resolution ( #18296 )
2023-05-30 14:23:37 +02:00
Turiiya
e9fb5b3fcc
.editorconfig: do not specify an indent size for tabs ( #18297 )
2023-05-30 14:23:13 +02:00
Felipe Pena
f430c0b67a
parser: fix for select parsing ( #18306 )
2023-05-30 14:22:47 +02:00
Casper Kuethe
4174048f96
vweb: add host option to controller ( #18303 )
2023-05-30 14:22:23 +02:00
Felipe Pena
05b832a317
cgen: fix none initialization to struct member ( #18295 )
2023-05-29 15:35:41 +03:00
Delyan Angelov
ae8e9af11f
ci: skip building examples/coroutines/simple_coroutines.v for now
2023-05-29 13:35:46 +03:00
Delyan Angelov
d47c722c1f
builtin: fix byte deprecation warnings for v test-all (the -freestanding compilation)
2023-05-29 13:20:29 +03:00
Lenni0451
2904c399b5
vweb: host attribute ( #18288 )
2023-05-29 02:11:10 +02:00
Alexander Medvednikov
f22ba836fd
prealloc: use u8 instead of byte
2023-05-29 01:42:52 +02:00
Alexander Medvednikov
3f62487409
examples: add a simple coroutine example
2023-05-29 01:35:38 +02:00
Turiiya
1be539d20f
checker: add byte deprecation warning ( #18287 )
2023-05-28 23:30:32 +02:00
Alexander Medvednikov
3ac63cce86
fmt: fix a shared test
2023-05-28 18:23:07 +03:00
Alexander Medvednikov
f8422738bb
vfmt: no longer replace go with spawn
2023-05-28 16:03:39 +02:00
Alexander Medvednikov
786865d349
coroutines: init() that runs automatically
2023-05-28 15:54:57 +02:00
Turiiya
80d404c220
checker: replace as cast with a safer type check is (smart cast) ( #18286 )
2023-05-28 05:41:46 +02:00
Alexander Medvednikov
9db10c8f61
all: coroutines (part 2)
2023-05-28 05:30:23 +02:00
Alexander Medvednikov
2162230086
cgen: move spawn and go logic to a separate file
2023-05-28 02:52:38 +02:00
Alexander Medvednikov
50247d5093
gen.golang: handle spawn/go
2023-05-28 02:44:47 +02:00
Alexander Medvednikov
45f16a2640
all: coroutines (part 1)
2023-05-27 23:33:46 +02:00
Felipe Pena
5812579d53
checker: remove check for option being initialized ( #18280 )
2023-05-27 20:43:54 +02:00
Felipe Pena
16ef1d95fb
cgen: fix fixed array ret with anon fn ( #18279 )
2023-05-27 20:42:31 +02:00
Felipe Pena
6bfa6ec93c
cgen: fix comptime interpolation ( #18281 )
2023-05-27 20:41:40 +02:00
xiusin
43bc85d3bb
http: add workers to improve the server's concurrent capacity. ( #18271 )
2023-05-27 01:57:32 +03:00
Turiiya
f9efbdff10
semver: refactor, simplify, fix typo ( #18272 )
2023-05-27 01:57:02 +03:00
Turiiya
3e08487198
checker: disallow multiple return values in const declarations ( #18273 )
2023-05-27 01:55:14 +03:00
yuyi
6db62e43d3
parser: fix array method using it in defer ( fix #18246 ) ( #18267 )
2023-05-26 02:29:52 +02:00
Casper Kuethe
79657a1a2f
vweb: update middleware docs ( #18270 )
2023-05-26 02:26:00 +02:00
Mark aka walkingdevel
b698a0f459
mysql: add the ability to commit transactions, some code improvements ( #18268 )
2023-05-26 02:16:02 +02:00
Felipe Pena
8a856cc36d
checker: adjust fix for struct anon assigning to typed struct ( #18264 )
2023-05-25 20:40:20 +03:00
Felipe Pena
e8289dd4d5
changelog: add entry about heap usage api ( #18265 )
2023-05-25 17:27:49 +02:00
Mark aka walkingdevel
c2fa45c24d
cgen, orm: fix typo, and wrap the fkey attribute into quotes in errors ( #18266 )
2023-05-25 17:27:25 +02:00
Turiiya
993546a0a2
examples: fix typos ( #18229 )
2023-05-25 16:54:46 +03:00
yuyi
caee3935a5
os: fix truncate() on windows ( #18262 )
2023-05-25 14:37:53 +03:00
Felipe Pena
bc88183318
cgen: fix struct fn ptr call ( #18260 )
2023-05-25 10:52:05 +03:00
Felipe Pena
dc16e50d55
regex: fix find() when using anchors (start / end) ( #18259 )
2023-05-25 10:51:41 +03:00
Felipe Pena
fc6a34355d
parser: fix missing sync auto import when only declaring shared type and not using it ( #18255 )
2023-05-25 02:54:04 +02:00
Felipe Pena
9d56432e55
checker: add missing check for mismatch anon struct to typed struct ( #18250 )
2023-05-25 02:53:14 +02:00
Felipe Pena
64a4a3316a
checker, cgen: fix fixed array return on assigning, arg pass and dumping ( #18216 )
2023-05-25 02:52:45 +02:00
yuyi
f1c647cbbe
parser: make most of parser methods private ( #18249 )
2023-05-25 02:51:59 +02:00
yuyi
190f5c69ea
os: fix open_file() on windows ( fix #18245 ) ( #18253 )
2023-05-25 02:50:52 +02:00
Mark aka walkingdevel
351b2e0e42
mysql: refactor, comments, simplify ( #18258 )
2023-05-25 02:50:15 +02:00
xy3
010a5c26a0
vpm: increment vpm downloads, use new endpoints ( #18202 )
2023-05-25 02:47:58 +02:00
Alexander Medvednikov
c45c36ccce
orm: improve an fkey error a bit
2023-05-24 18:30:44 +02:00
Felipe Pena
e8dbd2c0c7
parser: fix enum attr with default value ( #18248 )
2023-05-24 17:25:27 +03:00
yuyi
099d4fc06f
parser: clean up in parser.v ( #18247 )
2023-05-24 06:51:15 +03:00
Turiiya
e8046439f0
cgen: include float kind in struct field type defaults ( #18228 )
2023-05-24 06:50:45 +03:00
Felipe Pena
598673314b
json.decode: add check for shared variable ( #18237 )
2023-05-24 06:47:09 +03:00
yuyi
6698fe4f60
checker, cgen: fix contains() with array of interfaces ( #18241 )
2023-05-23 14:46:14 +02:00
Felipe Pena
37618c9465
cgen, checker: fix comptime assigning to sumtype or indexexpr ( #18240 )
2023-05-23 14:42:53 +02:00
yuyi
e2f18fc9cc
checker, cgen: fix array of interfaces index() ( #18232 )
2023-05-22 16:31:22 +03:00
Alexander Medvednikov
a33ffcedfb
parser: remove attributes from anonymous structs ( fixes #18233 )
2023-05-22 14:13:34 +02:00
Delyan Angelov
c382f4d310
rand: add missing rand.u16(), update doc comments, add test
2023-05-22 13:20:52 +03:00
Alexander Medvednikov
3a09142ace
doc: update memory management info
2023-05-22 08:36:38 +02:00
Turiiya
1be798be49
net.html: remove unnecessary comment ( #18230 )
2023-05-22 07:46:26 +03:00
kbkpbot
a10690b934
net.conv: use a pure v implementation instead of C.hton etc ( #18226 )
2023-05-22 06:59:33 +03:00
Mark aka walkingdevel
ce0591da8d
mysql: allocate memory for each string and blob dynamically depending on its value length ( #18214 )
2023-05-21 15:24:43 +02:00
sandbankdisperser
f833188234
vweb: return 404 on file not found ( #18219 )
2023-05-21 15:23:43 +02:00
xiusin
e4c769d072
net.http: add remote-addr header ( #18208 )
2023-05-21 15:23:24 +02:00
Felipe Pena
38a155ac81
cgen: make comptime call works with or-block ( #18215 )
2023-05-21 15:22:40 +02:00
Akhil Binoy
30e02cfa3d
examples: fix typo in bellman-ford.v ( #18223 )
2023-05-21 15:22:27 +02:00
Swastik Baranwal
4b22ea7803
parser: disallow all array usage outside of builtin ( #18222 )
2023-05-21 15:21:57 +02:00
Ikko Eltociear Ashimine
abcbba1e81
builtin: fix typo in string.js.v ( #18213 )
2023-05-21 02:46:11 +03:00
Casper Kuethe
d0214a254e
vweb: vweb.csrf re-implementation ( #18220 )
2023-05-21 01:56:17 +03:00
yuyi
adcf47dcce
checker: appending to an array of sumtype ( #18201 )
2023-05-20 02:25:26 +03:00
Mark aka walkingdevel
1e9dcb9b9e
checker: refactor, comments, simplify. ( #18203 )
2023-05-20 02:24:30 +03:00
yuyi
94217571cd
parser, checker, cgen: fix swapping arrays ( #18204 )
2023-05-20 02:23:50 +03:00
yuyi
332235548e
checker: clean up in array_init() ( #18205 )
2023-05-20 02:21:52 +03:00
Petr Makhnev
9d0a1d8496
builtin: speed up string methods with vmemcpy instead of for loop for copying data ( #18211 )
2023-05-19 21:24:23 +03:00
Turiiya
aded6088e9
vet: allow vetting files with global variables ( #18195 )
2023-05-19 16:28:01 +03:00
Petr Makhnev
a39c26507c
builtin: speed up string concatenation and repeat() method with vmemcpy instead of for loop for copying data ( #18206 )
...
These changes almost do not speed up the program with the `-prod` flag,
since modern С compilers can do such optimization on their own, but in
normal mode, the performance gain is from 1.6 (concatenation) to 1.8 (repeat) times.
Concatenation:
Old (`for` loop):
Time (mean): 3.699 s +- 0.071 s [User: 3.629 s, System: 0.069 s]
Range (min ... max): 3.548 s ... 3.741 s 10 runs
New (vmemcpy):
Time (mean): 2.305 s +- 0.065 s [User: 2.263 s, System: 0.041 s]
Range (min ... max): 2.172 s ... 2.355 s 10 runs
`vmemcpy version` ran 1.60 +- 0.05 times faster than 'for loop version'
2023-05-19 16:18:23 +03:00
Alexander Medvednikov
f67952fe84
doc: use u8 instead of byte
2023-05-18 12:24:00 +02:00
Alexander Medvednikov
cc47c78f39
net.mbedtls: make compile with -prod
2023-05-18 11:31:53 +02:00
Felipe Pena
9d9785cc05
all: allow fixed array returns ( #17931 )
2023-05-18 11:30:49 +02:00
kbkpbot
c8d2098a14
net.websocket: make thread safe/concurrent ( #18179 )
2023-05-18 11:27:00 +02:00
Felipe Pena
1e88b1ab3e
cgen: fix missing panic message for 'option not set' on debug ( #18168 )
2023-05-18 11:25:19 +02:00
Felipe Pena
273f46f810
checker: fix generic argument resolution when mixed order on next call ( #18192 )
2023-05-18 11:24:06 +02:00
Leon Arndt
2c95b9be32
examples: removed unused line of code ( #18194 )
2023-05-18 11:23:37 +02:00
yuyi
2bb24ee739
fmt: implement comments inside sumtype declaration ( #18189 )
2023-05-18 11:22:26 +02:00
yuyi
ddb8e09fec
parser, checker: fix generic fn variable assignment in generic fn ( #18180 )
2023-05-17 03:06:33 +03:00
yuyi
35f2a0fb66
fmt: fix formating of fn decl with end comments ( #18181 )
2023-05-17 03:05:59 +03:00
Swastik Baranwal
ee7d34e650
checker: allow i32 in enum MyEnum as i32 { ( #18172 )
2023-05-16 08:09:13 +03:00
Felipe Pena
a7f84e79f8
cgen: fix option unwrap from ovoid function ( #18173 )
2023-05-14 14:38:14 +03:00
Felipe Pena
d4072bfc22
cgen: fix option with multi return assign ( #18174 )
2023-05-14 13:50:04 +03:00
Felipe Pena
bfb5a770b2
changelog: update CHANGELOG.md ( #18175 )
2023-05-14 12:57:31 +03:00
yuyi
814d6823b4
checker: check generic undefined operation ( fix #18162 ) ( #18166 )
2023-05-13 06:54:08 +03:00
Alexander Medvednikov
1aadd3e59c
ci: build news fetcher with -prod
2023-05-13 02:15:58 +02:00
Felipe Pena
47761a42e9
all: attr for enum fields (+ json encode/decode) ( #18163 )
2023-05-13 01:08:30 +02:00
yuyi
8482bc4626
ast, parser: fix generic fntype to concrete types with later generic fn definition ( fix #18156 ) ( #18157 )
2023-05-12 15:52:41 +03:00
yuyi
2351856fc3
checker: clean up in struct_init() ( #18154 )
2023-05-12 09:34:55 +03:00
Turiiya
67e3061ea1
net: fix typos ( #18164 )
2023-05-12 09:31:27 +03:00
acimnotes
790afbce94
time: add new method year_day and the tests for it ( #18107 )
2023-05-12 09:27:20 +03:00
Swastik Baranwal
447b45ca8c
checker: disallow non-ptr elem in init ptr array ( #18161 )
2023-05-12 08:56:22 +03:00
Swastik Baranwal
d8cf65df1a
checker: only allow &u8 with byteptr and itself ( #18146 )
2023-05-11 18:28:49 +10:00
yuyi
a87f2d9d11
checker: fix generic struct init with generic struct items ( #18152 )
2023-05-10 19:06:34 +03:00
yuyi
492a93ecd9
vweb: make controllers of struct Controller public ( #18153 )
2023-05-10 18:31:43 +03:00
Felipe Pena
d62c4c9fc1
checker: add missing check for global var on assignment to shared var ( #18125 )
2023-05-10 18:30:57 +03:00
Mark aka walkingdevel
61a5fbea35
autofree: fix cross var assigns with strings ( #18147 )
2023-05-10 00:06:31 +02:00
Felipe Pena
0be74aa613
cgen: fix option ptr default struct initialization ( #18141 )
2023-05-09 21:40:51 +03:00
yuyi
9aa5e3fe4b
cgen: clean up in index_of_map() ( #18145 )
2023-05-09 21:12:29 +03:00
yuyi
89f3288fb0
cgen: fix nested map of fn call ( #18142 )
2023-05-09 16:19:25 +03:00
Turiiya
e2e6c9660c
net.html: add &Tag get_tag methods to find first occurrence ( #18139 )
2023-05-09 00:22:52 +03:00
Felipe Pena
1e56a69c02
checker, parser: save shared/atomic specifier for ast.Param ( #18124 )
2023-05-09 00:22:22 +03:00
Mark aka walkingdevel
6ac09e605e
orm: allow structs without the id field, more flexible primary keys ( #18140 )
2023-05-09 00:21:42 +03:00
yuyi
72b2f22057
cgen: fix generics array of threads with multiple types ( #18137 )
2023-05-08 13:24:28 +03:00
yuyi
87623b367c
parser: clean up parse_ident() ( #18138 )
2023-05-08 13:19:03 +03:00
l-m
3a06b55388
wasm: add basic debuginfo through name section ( #18130 )
2023-05-08 09:31:36 +03:00
Swastik Baranwal
5bdf94a7bc
checker: disallow mut for blank idents ( #18114 )
2023-05-08 01:26:36 +02:00
Alexander Medvednikov
b50dac5e9a
changelog: upcoming 0.3.5 changelog
2023-05-07 19:55:27 +02:00
yuyi
a0a8b7e47a
ast, parser, checker, cgen, fmt: implement generic fn params ( fix #14937 ) ( #18126 )
2023-05-07 19:53:56 +02:00
Turiiya
39ec1134fa
net.html: fix parsing of nested quoted strings in code tags ( #18123 )
2023-05-07 03:55:02 +03:00
Felipe Pena
1c3af091f7
cgen, json: fix option ptr declaration and dumping ( #18119 )
2023-05-07 03:54:43 +03:00
Jacques Supcik
a82fc5bea0
os: make SignalHandler public ( #18115 )
2023-05-06 14:59:06 +03:00
squidink7
787d774523
checker: warn instead of error, for unnecessary brackets on if/match ( #18117 )
2023-05-06 14:17:45 +03:00
Petr Makhnev
134e781965
changelog: split items into separate topics ( #18112 )
2023-05-04 21:24:13 +03:00
Swastik Baranwal
5bcc04e66a
checker: disallow _ = <- quit ( #18104 )
2023-05-04 21:23:34 +03:00
Ikko Eltociear Ashimine
43093311b6
flag: fix typo in flag.v ( #18109 )
2023-05-04 21:23:02 +03:00
Petr Makhnev
d27b48b7fe
changelog: mark encoding enums with their names in json as breaking and that [json_as_number] can be used to get the old behaviour ( #18108 )
2023-05-04 12:59:46 +03:00
Felipe Pena
5008515b03
builtin: heap memory usage api ( #18103 )
2023-05-03 20:33:52 +03:00
Mark aka walkingdevel
40a97aed1a
docs, orm: update examples ( #18106 )
2023-05-03 20:33:16 +03:00
Felipe Pena
2c123dffbb
cgen: fix comptimeselector option propagation ( #18092 )
2023-05-03 08:31:48 +03:00
Mark aka walkingdevel
458132b1b2
checker: make undefined ident error for closures more friendly ( #18100 )
2023-05-03 08:02:59 +03:00
Thomas Peißl
353de60158
examples: fix unset reader notice for the smtp/mail example ( #17998 )
2023-05-02 22:54:57 +03:00
Casper Kuethe
d3dbd7b743
vweb: add docs for [vweb_global] and shared attributes. ( #18098 )
2023-05-02 22:49:55 +03:00
Felipe Pena
063dfa0ab9
checker: missing mutability check for array.delete calls ( #18096 )
2023-05-02 22:48:40 +03:00
Delyan Angelov
5631e2f01d
ci,cgen,orm: fix CI failures after 9f118ba
2023-05-02 21:29:58 +03:00
Alexander Medvednikov
9f118ba3f1
orm: skip via the "-" attribute
2023-05-02 17:00:54 +02:00
Alexander Medvednikov
b9f5cc830b
json: skip via the "-" attribute
2023-05-02 16:41:32 +02:00
Felipe Pena
638f0f69ed
checker: fix wrong error message about missing shared on parameter signature ( fix #18087 ) ( #18091 )
2023-05-02 15:52:40 +03:00
Delyan Angelov
f25ad18851
.cirrus.yml: only run slow FreeBSD builds on changes to .v and .vsh files, not .md ones
2023-05-02 15:42:19 +03:00
Petr Makhnev
c8568a29dc
changelog: fix wording about backends and C++20 support ( #18097 )
2023-05-02 15:26:19 +03:00
Swastik Baranwal
c4cce3bc00
checker: disallow matching type with primitive vars ( #18084 )
2023-05-02 11:40:38 +03:00
Mark aka walkingdevel
ca2820da5f
checker, orm: don't insert an uninitialized struct in the related table. ( #18093 )
2023-05-02 11:14:42 +03:00
Christopher Fore
b255fef686
tools: update v share to work with the playground redesign ( #18090 )
2023-05-01 09:10:52 +02:00
Alexander Medvednikov
e4e94acf15
changelog: fix typos
2023-05-01 00:02:29 +02:00
Alexander Medvednikov
046dd5481c
V 0.3.4
2023-05-01 00:58:10 +03:00
Alexander Medvednikov
2f441a8102
changelog: 0.3.4 (p.2)
2023-04-30 22:57:17 +03:00
Casper Kuethe
0898f57995
net.html: fix text parsing for inline tags ( #18085 )
2023-04-30 16:20:24 +03:00
Felipe Pena
d086cc26cd
cgen: fix it variable casting on map call when arr is a comptime variable #18083
2023-04-30 16:18:44 +03:00
Alexander Medvednikov
580e079b1e
changelog: 0.3.4 (p.1)
2023-04-29 22:37:27 +03:00
Felipe Pena
e738d671a5
checker: fix [noinit] attr checking with multiple attr ( #18079 )
2023-04-29 17:07:24 +03:00
Mark aka walkingdevel
e8df5a7861
checker: check db type implements orm.Connection and isn't an Option. ( #18078 )
2023-04-29 10:36:21 +02:00
Mark aka walkingdevel
9eee131423
checker: make type_implements() return false if methods of interface didn't implement ( #18076 )
2023-04-28 22:18:23 +03:00
Felipe Pena
2f48288a25
checker: fix generic argument resolution for multiple generic args ( #18073 )
2023-04-28 17:06:28 +03:00
Felipe Pena
b6bbd2463c
cgen: fix shared struct field initialization with default value ( #18075 )
2023-04-28 16:59:18 +03:00
Hitalo Souza
b0589c645d
json2: encode reference fields too ( #17058 )
2023-04-28 16:24:27 +03:00
Spydr
433208ea7e
native: make code generation logic platform-independant ( #18057 )
2023-04-28 16:00:23 +03:00
Turiiya
27e1c20e3d
toml: fix multiline array bool scanner, add test ( #18068 )
2023-04-28 01:30:47 +03:00
Mark aka walkingdevel
b767c7d6f5
cgen: orm: refactor, comments, simplify ( #18070 )
...
* cgen: refactor, comments, simplify
* fix: misc-tooling
2023-04-28 01:30:23 +03:00
Swastik Baranwal
30ac2e8763
checker: disallow assigning anon struct to typed struct ( #18017 )
2023-04-27 16:54:26 +02:00
Felipe Pena
9fb52c4c9c
cgen: fix code generated for or-block for void result return function + code generated for indirection comptime checking for logical operators ( #18066 )
2023-04-27 17:37:29 +03:00
Felipe Pena
ee9cfb6df4
checker: add check for mixing multi-return results with other types in return statements ( fix #17501 ) ( #18067 )
2023-04-27 16:50:09 +03:00
Turiiya
bbfa25a17b
toml: fix scanner floating point detection ( #18062 )
2023-04-27 06:43:00 +03:00
Turiiya
8f767c9189
toml: update returns from option to result type ( #18065 )
2023-04-27 06:41:40 +03:00
Felipe Pena
c63902baf0
checker, cgen: fix generic resolution for comptimeselector and indirection checking on generic funcs ( #18043 )
2023-04-26 22:49:50 +03:00
yuyi
f4b7f83121
parser, checker: fix generic struct init with field struct init ( #18052 )
2023-04-26 22:22:15 +03:00
Felipe Pena
13b4cd9d58
os: fix memleak from getline on Linux ( #18022 )
2023-04-26 22:02:09 +03:00
yuyi
e1e5076d94
cgen: fix cross assign with generic fn call ( #18050 )
2023-04-26 20:41:20 +03:00
Felipe Pena
28f85371b1
cgen: fix comptime ptr comparison generated code ( #18048 )
2023-04-26 20:40:28 +03:00
squidink7
4bfe270c41
wasm: add support for [export]ed functions ( #18055 )
2023-04-26 20:39:58 +03:00
Jacques Supcik
c4b34c9482
docs: fix copy/paste leftover in the output of v help build-c ( #18056 )
2023-04-26 08:59:20 +03:00
Turiiya
b87ddf68ae
docs: add concise control flow example for if x := expr { ( #17983 )
2023-04-25 07:07:28 +03:00
Spydr
3622544695
native: implement miscellaneous features ( #18044 )
2023-04-25 01:19:15 +03:00
Arnaud Moura
88b29ae178
doc: create custom problemMatcher in VSCode ( #18047 )
2023-04-25 01:18:57 +03:00
Swastik Baranwal
ac58eca015
checker: disallow deferencing a nil pointer ( #18038 )
2023-04-25 01:10:01 +03:00
yuyi
f598bbde4e
tests: clean up c_struct_with_reserved_field_name_test.v ( #18026 )
2023-04-24 11:04:13 +02:00
yuyi
79819c4fcb
parser: check generic fntype declaration without type name ( #18033 )
2023-04-24 11:03:29 +02:00
Spydr
7ac7020192
native, markused: implement -skip-unused ( #18036 )
2023-04-24 10:41:12 +02:00
yuyi
d8167b8966
ast, parser: fix generic fntype to concrete types ( fix #17982 ) ( #18025 )
2023-04-23 03:44:16 +03:00
Hitalo Souza
cd90bc65b8
tools/vcreate: fix web app ( #18019 )
2023-04-23 03:43:40 +03:00
Mark aka walkingdevel
3fb32a866c
all: like operator/keyword for V ORM ( #18020 )
2023-04-23 03:40:54 +03:00
Casper Kuethe
5f870f41b5
vweb: implement database pool ( #18010 )
2023-04-23 03:37:15 +03:00
Felipe Pena
6f85384f7f
checker, cgen: fix infering type for comptimeselector when using ptr type ( #18005 )
2023-04-22 11:04:08 +03:00
Felipe Pena
3d50663bcf
json: fix omitempty for alias, struct, sumtype, array and map ( #18012 )
2023-04-22 10:58:21 +03:00
Felipe Pena
89b7bebc3c
json: fix option sumtype with int types ( #18013 )
2023-04-22 10:58:01 +03:00
Felipe Pena
c43ea09d87
json: fix -cstrict build + optional map ( #18014 )
2023-04-22 10:55:25 +03:00
Artem Yurchenko
4c54f36a70
github: add Copilot summary and walkthrough to PR template ( #18016 )
2023-04-22 10:54:26 +03:00
Felipe Pena
c339ea2ce2
checker, cgen: make comptime field.indirections working with logical operators ( #17990 )
2023-04-21 19:43:47 +03:00
Felipe Pena
59d91e0514
cgen: fix auto_str for fn type ( #17988 )
2023-04-21 19:42:45 +03:00
Petr Makhnev
d48aa15514
tools/vcheck-md: add -skip_line_length_check flag and fix vmod handling in '```vmod' ( #17997 )
2023-04-21 19:42:21 +03:00
yuyi
95d1beb008
cgen: fix c struct with reserved field name ( fix #17993 ) ( #17996 )
2023-04-21 19:41:13 +03:00
Felipe Pena
488e14bf99
json: allow decode/encode of alias to primitive type ( #18003 )
2023-04-21 19:39:40 +03:00
Swastik Baranwal
456968b07d
checker: disallow []array{} ( #17994 )
2023-04-21 19:33:23 +03:00
yuyi
eb410bf283
checker: minor cleanup in return_stmt() ( #17995 )
2023-04-21 19:32:59 +03:00
Felipe Pena
adcd16b198
cgen: fix generic return for option ptr ( #17987 )
2023-04-18 17:51:43 +02:00
Felipe Pena
377c2e25ff
all: allow recursive struct with option ptr (?&Node) ( #17682 )
2023-04-18 13:07:21 +02:00
yuyi
6cc420880f
ast, checker, cgen: fix generic array of threads ( fix #17976 ) ( #17986 )
2023-04-18 12:43:30 +03:00
Felipe Pena
df3ee9a64a
cgen: fix concat with matchexpr + option string ( #17985 )
2023-04-18 12:40:37 +03:00
Felipe Pena
8445642567
cli: fix a panic and an infinite loop, when command flag descriptions have multiple lines ( #17981 )
2023-04-18 12:37:26 +03:00
Turiiya
a84fddbb91
toml: fix trailing comma in inline toml, add test ( #17977 )
2023-04-18 12:35:55 +03:00
Mehmet Ali Şipi
04dabb5485
v.builder: add support for cross-compilation from termux to other platforms ( #17984 )
2023-04-18 09:20:17 +03:00
Delyan Angelov
8275dc5a73
db.pg: add support for -d trace_pg_error
2023-04-17 21:49:05 +03:00
Felipe Pena
3b2e58eace
checker: fix missing check for or-block on selectorexpr ( #17975 )
2023-04-17 16:11:34 +02:00
yuyi
fe4ccbc4cf
cgen: fix strings builder shift array.reverse() ( #17979 )
2023-04-17 14:06:57 +03:00
Delyan Angelov
4a22d4a65d
checker: fix v -shared vlib/json on windows
2023-04-17 09:12:05 +03:00
Delyan Angelov
bf749b3559
ci: add test jobs for the wasm module, for macos, linux and windows ( #17972 )
2023-04-16 14:52:00 +03:00
Felipe Pena
a49cecc2b4
cgen: fix array map with it selector expr, used as an it method closure ( #17968 )
2023-04-16 14:41:07 +03:00
Felipe Pena
8e959ae5b5
parser: fix wrong nodes generated for $something ( #17969 )
2023-04-16 14:36:51 +03:00
Turiiya
6e0204a614
regex: remove outdated examples in README.md ( #17971 )
2023-04-16 13:17:24 +03:00
yuyi
6db904fb8f
cgen: correct comments and cleanup in comptime_for() ( #17964 )
2023-04-16 08:01:36 +03:00
Swastik Baranwal
d3de7adcc0
builtin: add C.scanf fn decl to cfns.c.v ( #17965 )
2023-04-16 08:00:19 +03:00
Delyan Angelov
75ddcb02fc
tests: fix warnings and failure on macos for closure_generator_test.v
2023-04-16 07:45:05 +03:00
yuyi
a938dcddb5
ast: minor cleanup in ast.v ( #17962 )
2023-04-15 14:29:15 +03:00
yuyi
7c9f273e33
parser: fix comptime_for in repl (script mode) ( fix #5976 ) ( #17963 )
2023-04-15 14:28:01 +03:00
James Hegedus
2179db37ee
flag: fix typo in uknown flag struct ( #17375 )
2023-04-14 14:42:11 +03:00
SolarWolf-Code
7981d2854a
net: fix typo give => given ( #17955 )
2023-04-14 11:15:16 +03:00
Delyan Angelov
e0656ad1b1
term.ui: cleanup of meaningless comment
2023-04-14 11:13:50 +03:00
Alexander Medvednikov
9f5e2aeea9
backtrace: use unsafe { nil }
2023-04-14 08:28:22 +02:00
yuyi
c59a5bbf05
parser: clean up array_init() ( #17947 )
2023-04-14 07:36:57 +02:00
Casper Kuethe
76fd55a693
vweb: fix multipart_form parsing ( #17953 )
2023-04-14 07:07:48 +02:00
l-m
8b2887d80b
wasm module: globals, constant expressions and function reference types ( #17950 )
2023-04-13 19:39:55 +02:00
Delyan Angelov
093e5c68b9
ci: bump performance-regressions max_time limit to 1701, to reduce chance of false positive failures from slow CI runners
2023-04-13 19:10:00 +03:00
Delyan Angelov
c6947fde57
os: implement Process.set_work_folder/0 to set the initial working folder of the new child process ( #17946 )
2023-04-13 14:48:32 +03:00
Turiiya
489ac892b9
regex: fix formatting inconsistencies in README.md ( #17940 )
2023-04-13 14:44:45 +03:00
Felipe Pena
524f7c3ead
json: fix json with option struct ( #17942 )
2023-04-13 08:17:40 +02:00
Swastik Baranwal
3d99f1f2c2
checker: disallow struct int to ptr outside unsafe ( #17923 )
2023-04-13 07:38:21 +02:00
yuyi
92cb7468ce
ast: minor optimization of clear_flags() ( #17938 )
2023-04-13 07:27:26 +02:00
yuyi
87ca877c83
parser: correct comments in comptime_for() ( #17944 )
2023-04-13 07:26:43 +02:00
SolarWolf-Code
f41ca48ab9
doc: one hour => one weekend ( #17937 )
2023-04-12 06:53:07 +03:00
Casper Kuethe
838083e610
vweb: add an overridable .not_found() method, for making a custom 404 page + tests fixes ( #17936 )
2023-04-12 00:50:03 +03:00
lapingenieur
f9c186a400
builtin: correct a small documentation mistake ( #17935 )
2023-04-11 12:37:14 +02:00
yuyi
8b37694760
cgen: fix generic method on embed struct ( fix #17929 ) ( #17932 )
2023-04-11 10:04:00 +03:00
Hitalo Souza
91874f3244
json2: encode array ( #17926 )
2023-04-10 19:54:43 +03:00
Felipe Pena
319ad5bae2
json: fix json.decode with map alias ( #17925 )
2023-04-10 19:50:35 +03:00
Hitalo Souza
624f1592a8
examples: create readme.md for vweb_fullstack ( #17928 )
2023-04-10 19:20:03 +03:00
Hitalo Souza
4d4d76d65b
json2: fix encoding of nested maps like map[string]map[string]int ( #17924 )
2023-04-10 18:57:02 +03:00
yuyi
4e498b4303
cgen: fix printing array of recursive reference struct ( fix #17858 ) ( #17922 )
2023-04-10 17:09:27 +03:00
Felipe Pena
6a60db8768
cgen, checker: fix generic/comptime parameter concrete type resolution in some cases ( #17762 )
2023-04-10 10:42:49 +03:00
Felipe Pena
063f4023c5
checker: allow mut var.$(field.name) ( #17911 )
2023-04-10 10:37:02 +03:00
Felipe Pena
5c439b6621
cgen: fix auto_str for option values ( #17910 )
2023-04-10 05:56:57 +02:00
Alexander Medvednikov
220b31bfba
roadmap: 64/32 bit int
2023-04-10 05:01:01 +02:00
Alexander Medvednikov
83afa1009e
checker: fix immutable deref check
2023-04-10 04:59:36 +02:00
Artem Yurchenko
88f89bde4e
doc: improve in documentation for maps ( #17918 )
2023-04-09 13:43:13 +02:00
Swastik Baranwal
6acf01a4a0
checker: disallow more reserved types to be used as variable names ( #17917 )
2023-04-09 13:42:21 +02:00
Surman The Dead
b772731b98
leb128: make decoding return the number of decoded bytes, in addition to the decoded value ( #17912 )
2023-04-09 10:32:49 +03:00
Delyan Angelov
abe0ad886b
ci: workaround flakyness of array_test.v on windows, with the default GC mode
2023-04-09 09:48:15 +03:00
Delyan Angelov
9267e41337
cgen: fix v -prealloc file_test.v
2023-04-09 09:35:43 +03:00
l-m
d2f69472b2
vlib: add a wasm module, implementing a pure V webassembly seralisation library ( #17909 )
2023-04-09 07:55:02 +03:00
penguindark
9658d20f03
strconv.atoi: optimization ( #17913 )
2023-04-09 05:54:38 +02:00
Delyan Angelov
fdc22b9020
ci: mark array_access_optimisation_test.v as flaky, and retry it 3 times
2023-04-09 06:32:28 +03:00
Delyan Angelov
cd629cfeab
cgen: do not generate the stringified values for assert x in y, for the pass case ( #17908 )
2023-04-08 18:51:46 +03:00
Delyan Angelov
ebfc4b4663
builtin: remove test for the deprecated []int.reduce/2
2023-04-08 18:47:04 +03:00
l-33ter
756e5d931e
examples/vweb_fullstack: fix wrong db ORM-fields ( #17907 )
2023-04-08 17:18:48 +03:00
Delyan Angelov
48d42287a9
v.markused: enable v -skip-unused -live run examples/hot_reload/bounce.v
2023-04-08 14:36:01 +03:00
yuyi
e70084f203
ast: clean up ast.v, table.v and types.v ( #17906 )
2023-04-07 16:58:34 +03:00
lemon
e300fb428a
math: add maxof[T]() and minof[T]() ( #17905 )
2023-04-07 15:48:37 +03:00
yuyi
237f9446e2
checker, cgen: fix type alias of pointer ( #17904 )
2023-04-07 10:19:25 +02:00
Alexander Medvednikov
eb6dd82d72
doc: simplify custom error example
2023-04-07 07:12:13 +02:00
Swastik Baranwal
65abfa8219
checker: disallow printing void ( #17901 )
2023-04-07 06:40:11 +02:00
Alexander Medvednikov
bb280121e3
sokol: bring back command q on macos
2023-04-07 04:08:28 +02:00
Petr Makhnev
812a17fb43
tests: use isreftype[T]() and sizeof[T]() syntax, fix vfmt to support them, when written explicitly ( #17103 )
2023-04-06 20:02:55 +03:00
Felipe Pena
1113205376
json: fix [raw] for option string ( #17899 )
2023-04-06 18:26:17 +03:00
Subhomoy Haldar
a773e44430
rand: update documentation for normal and normal_pair ( #17898 )
2023-04-06 17:52:09 +03:00
Ikko Eltociear Ashimine
7838ef366a
crypto.pem: fix typo in decode.v ( #17896 )
...
seperator -> separator
2023-04-06 12:12:45 +03:00
yuyi
31ffbc7a87
scanner: fix string interpolation string literal with fmt ( #17895 )
2023-04-06 12:11:15 +03:00
Casper Kuethe
930bdd935b
vweb: fix static files copying ( #17891 )
2023-04-06 03:10:23 +02:00
walking devel
9957356a84
encoding.base32: change ? to ! ( #17892 )
2023-04-06 03:09:05 +02:00
Felipe Pena
b4e8e812fe
json: fix encode/decode fixed array ( #17887 )
2023-04-06 01:15:23 +03:00
Delyan Angelov
dce65c7f46
tools: make v watch webserver.v monitor files used through $tmpl as well
2023-04-06 00:45:25 +03:00
Felipe Pena
7334f673a0
cgen: fix cast option ptr ( #17884 )
2023-04-05 22:29:18 +03:00
Swastik Baranwal
902d0dc93d
checker: allow ~T(0) where T is int ( #17886 )
2023-04-05 13:05:18 +03:00
Surman The Dead
39b3a0ca17
encoding: add an encoding.leb128 module with tests ( #17880 )
2023-04-05 11:53:25 +03:00
ChAoS_UnItY
b2cf6d0af4
cgen: fix wrong indent generation in anon fn decl ( #17879 )
2023-04-05 11:22:36 +03:00
Swastik Baranwal
d30e1a52e2
checker: disallow unwrapped option/result with in operator ( #17875 )
2023-04-05 11:20:42 +03:00
walking devel
fc4c431d83
v: rename sql.v -> orm.v for consistency ( #17877 )
2023-04-04 22:35:52 +03:00
yuyi
467a1b4435
fmt: remove redundant parenthesis in the complex infix expr ( #17873 )
2023-04-04 13:47:48 +03:00
walking devel
8452644ec3
orm: enforce that queries always return a Result, a query-resulting array can be used as a V array in place. ( #17871 )
2023-04-04 08:23:06 +03:00
l-33ter
9addede0ea
readline: README.md change '?' to '!' ( #17868 )
2023-04-04 02:51:30 +03:00
yuyi
4f532c0830
checker: fix fn returning alias of pointer ( fix #17861 ) ( #17864 )
2023-04-03 19:32:55 +03:00
Swastik Baranwal
1dcec62c19
checker: disallow top level decl builtin fn ( #17857 )
2023-04-03 17:30:05 +03:00
yuyi
22afdb5cbf
cgen: fix gen_str_for_map() ( #17862 )
2023-04-03 14:42:01 +03:00
yuyi
a9bb6865fd
scanner: fix checking comments not terminated ( fix #17842 ) ( #17855 )
2023-04-03 14:37:52 +03:00
yuyi
33ba24e933
scanner: fix nested multiline comments ( #17859 )
2023-04-03 14:35:27 +03:00
Delyan Angelov
88de0decf6
v.pref: allow passing file names to v scripts, that use -raw-vsh-tmp-prefix, without showing a Too many targets error message.
2023-04-03 05:07:12 +03:00
ChAoS_UnItY
de34e15df7
cgen: fix multi return variable ignore in if guard ( #17853 )
2023-04-02 15:47:54 +02:00
Swastik Baranwal
01caecc284
checker: add check for unwrapped option in array cap ( #17851 )
2023-04-02 15:47:08 +02:00
Casper Kuethe
b2735bf937
vweb: add controllers ( #17840 )
2023-04-02 15:46:43 +02:00
ChAoS_UnItY
c7237b1c58
cgen: fix result of typeof function returns result type ( #17849 )
2023-04-02 02:25:34 +02:00
Josh Montoya
51ad565ed6
vweb: implement worker pool ( #17298 )
2023-04-02 01:24:33 +02:00
Felipe Pena
1471ba4678
checker: fix missing check for initializer with function returning options ( #17820 )
2023-04-02 00:03:42 +03:00
Delyan Angelov
6aec8244f0
strings: simplify Builder.drain_builder; add test ( #17846 )
2023-04-02 00:03:00 +03:00
Delyan Angelov
58dd9ee6a2
tests: make the flaky array_access_optimisation_test.v failures on the macos CI, more easily diagnosable
2023-04-01 17:33:44 +03:00
Felipe Pena
5b8d6c0a60
cgen: fix match tmp var needing check when working with option on branches ( #17837 )
2023-04-01 08:19:23 +03:00
Delyan Angelov
e56e4b3e90
tools: use os.symlink(vexe, vsymlink) on Windows too ( #17838 )
2023-04-01 08:18:24 +03:00
Spydr
fedf0f7939
native: rune type literals/printing, pointer comparison and some missing branches in functions ( #17839 )
2023-04-01 01:09:02 +03:00
yuyi
e1b8617c94
ast, cgen: fix generic closures with different generic types ( fix #17829 ) ( #17834 )
2023-03-31 18:08:42 +03:00
yuyi
6ff1c0a0b2
checker: fix generic struct init with update expr ( fix #17824 ) ( #17827 )
2023-03-31 10:59:52 +03:00
ChAoS_UnItY
ff0adba8a9
tests: fix file partially not fmt, caused by fixed vfmt bug ( #17828 )
2023-03-31 10:22:31 +03:00
Felipe Pena
cd6cc65ece
json: fix [omitempty] with string ( #17813 )
2023-03-30 23:09:47 +03:00
Delyan Angelov
57aa4def62
net.html: do not inject <text> tags for text that contains only newlines and spaces
2023-03-30 23:02:57 +03:00
Delyan Angelov
822acd78cb
tools: add test for VDOC_SORT=false ./v doc file.v
2023-03-30 16:53:12 +03:00
yuyi
b40aa4ffa9
cgen: fix embed struct with sumtype field ( #17823 )
2023-03-30 15:59:06 +03:00
Delyan Angelov
214f72ba03
tools: support VDOC_SORT=false ./v doc time
2023-03-30 14:35:54 +03:00
yuyi
b9352ce834
ast, parser, fmt: fix fmt error of generic fntype ( #17814 )
2023-03-30 13:30:10 +02:00
yuyi
d0702f3897
checker: fix if cond with alias ( fix #17818 ) ( #17821 )
2023-03-30 13:29:08 +02:00
Delyan Angelov
4ef6e16e3b
bitfield: add [inline] for very commonly used simple methods
2023-03-30 11:53:02 +03:00
Delyan Angelov
ae6fc64fb3
ci: bump the timeout to 181 minutes for the windows-msvc and windows-gcc jobs
2023-03-30 09:01:15 +03:00
Thomas Mangin
580d9cedc7
termios: new termios module ( #17792 )
...
* termio: new termio module
move the tcgetattr and tcsetattr functions in a new termio module.
The code needed refactoring as different OS have different fields
size, position and number for the C.termios structure, which
could not be correctly expressed consitently otherwise.
It has the positive side effect to reduce the number of unsafe calls.
New testing code was also added for the readline module as it is
relying of the feature.
* apply 2023 copyright to the new files too
2023-03-30 08:58:52 +03:00
Alexander Medvednikov
0826102e0a
sokol: enable VALIDATE_NON_FATAL
2023-03-30 00:10:49 +02:00
Alexander Medvednikov
d60ceb45cd
gg: make create_image() return !Image
2023-03-29 19:04:41 +02:00
Felipe Pena
75deb66fd4
json: fix decode option string ( #17812 )
2023-03-29 18:45:41 +02:00
yuyi
dd0b68ac90
checker: check if guard returning non-propagate option or result ( fix #17742 ) ( #17794 )
2023-03-29 14:51:29 +03:00
Alexander Medvednikov
6756d28595
all: 2023 copyright
2023-03-28 22:55:57 +02:00
Alexander Medvednikov
ed21097a91
doc: document json anonymous struct fields
2023-03-28 22:55:28 +02:00
Casper Kuethe
1f613a082a
vweb: use net.http.Cookie ( #17807 )
2023-03-28 22:27:01 +02:00
Artem Yurchenko
53e4085ddc
doc: fix documentation examples ( #17804 )
2023-03-28 22:26:22 +02:00
Delyan Angelov
ff5df2ce07
cgen: small cleanup in comments (init: it -> init: index)
2023-03-28 15:06:06 +03:00
yuyi
4007c6cf89
checker: check generic struct infering error ( #17802 )
2023-03-28 15:00:08 +03:00
Felipe Pena
db8331da24
cgen: fix fixed array of string item concatenation ( #17801 )
2023-03-28 14:56:54 +03:00
yuyi
da153aa780
checker, cgen: fix asserting if guard expr ( #17793 )
2023-03-28 11:40:33 +03:00
Alexander Medvednikov
5e48817dc8
parser: remove duplicated pascal case check
2023-03-27 13:38:21 +02:00
Heptalon
6b4fb0fc3e
checker: fix missing check for option value on non-optional struct field assignment ( #17785 )
2023-03-27 04:11:56 +02:00
yuyi
f08b88223d
checker: fix returning error in if expr ( #17783 )
2023-03-26 18:10:06 +02:00
yuyi
130f35c776
checker: fix embedded struct field with default value ( #17777 )
2023-03-26 11:33:01 +03:00
ChAoS_UnItY
34f5f05efa
ast: fix concrete fn type that returns pair type as generic type ( #17780 )
2023-03-26 11:29:52 +03:00
Subhomoy Haldar
8759409a69
math.big: fix min i32 value bug ( #17775 )
...
* attempt big int min value fix
* cast value for correct comparison
* update edge case
* add one more test
2023-03-26 08:45:42 +03:00
Casper Kuethe
1fe5aca782
vweb: middleware implementation ( #17730 )
2023-03-26 00:57:42 +01:00
Artem Yurchenko
713c95fcc8
Fix: vet false warning on brackets in documentation ( #17767 )
2023-03-25 21:51:45 +02:00
Delyan Angelov
db97630117
examples, orm: fix orm example; add -d trace_orm option to see all ORM generated queries ( #17770 )
...
* orm: add tracing of the generated queries by the orm module, when a program is compiled with `-d trace_orm`
* examples: fix examples/database/orm.v, add comments, and ensure that the example can be run several times with no errors
The example demonstrates connecting to all 3 DBs in the same program, and will be added to the CI very soon,
to serve both as a regression test, if it fails, and as an example to how to use the ORM in combination with
raw SQL queries to the DBs (which are driver/wrapper specific, unlike the ORM, but can be more convenient in some situations).
2023-03-25 21:46:17 +02:00
ChAoS_UnItY
f5f45d846e
ast: fix concrete function type used as generic type ( #17769 )
2023-03-25 21:45:19 +02:00
penguindark
3d2d330478
regex: fix issue with multiple repetitions out of the groups ( #17774 )
2023-03-25 20:49:01 +02:00
Felipe Pena
24cc5920e6
cgen: multiple auto equality func generated fixes ( #17756 )
2023-03-25 20:45:18 +02:00
Swastik Baranwal
0a8a0fdb0e
checker, cgen: fix check and cgen for match x { StructName {} } and match x { y {} }, where x is a mutable receiver ( #17755 )
2023-03-25 14:38:47 +02:00
yuyi
17c4eb49fb
parser: clean up in parse_generic_inst_type() ( #17766 )
2023-03-25 08:39:23 +02:00
yuyi
a9f55de352
checker: fix generic array delete in skip_unused mode ( #17759 )
2023-03-25 08:31:25 +02:00
Felipe Pena
ca198ace7d
cgen: fix nested fn call with result/option propagation ( #17738 )
2023-03-24 17:36:37 +02:00
Hitalo Souza
dc11f1fe05
json2: fix decode to map doesn't work ( #17757 )
2023-03-24 17:30:32 +02:00
Hitalo Souza
979066856b
json2: encode map ( #16928 )
2023-03-24 13:45:26 +02:00
Delyan Angelov
bfb0932588
net.http.mime: execute v run vlib/net/http/mime/build.vsh to update db.v with the latest official mime types
2023-03-24 08:29:32 +02:00
Delyan Angelov
37a79624fc
cgen: fix println(value.name) inside $for value in Test.values{ ( #17746 )
2023-03-23 19:18:25 +02:00
Felipe Pena
8693da4d36
parser: fix parsing cast array syntax from another module ( fix #17704 ) ( #17739 )
2023-03-23 18:26:12 +02:00
yuyi
6b5c746146
ci: fix comptime_concrete_type_register_test.v after 9a9cfe4 ( #17744 )
2023-03-23 16:42:35 +02:00
Felipe Pena
9a9cfe425c
all: comptime type lowercase ($int, $enum, $option, etc) ( #17732 )
2023-03-23 00:02:42 +01:00
Felipe Pena
0afb41f7e1
checker: fix missing type mismatch with ptr types ( #17695 )
2023-03-22 23:49:02 +01:00
Felipe Pena
a552a79ca8
checker: fix comptime concrete type register ( fix #17657 ) ( #17659 )
2023-03-22 16:16:19 +02:00
Alexander Medvednikov
828b8097d0
roadmap: vweb
2023-03-22 13:02:20 +03:00
Felipe Pena
278e747c7a
json: make enums work with json encode+decode (serialised as string names by default; the old integer one is supported too, using [json_as_number]) ( #17696 )
2023-03-22 10:33:32 +02:00
Felipe Pena
c9345be6de
ast: fix embed name with enum as generic struct type ( fix #17721 ) ( #17727 )
2023-03-22 09:50:58 +02:00
walking devel
d0e78b1da6
parser: breaking change, let V ORM queries return arrays for *all* non-count queries, including limit = 1 ( #17719 )
2023-03-22 09:48:01 +02:00
Swastik Baranwal
93b7cc4888
cgen: allow using of original operation if alias is number and no custom method is defined ( #17718 )
2023-03-21 11:39:58 +02:00
Felipe Pena
326e43385b
cgen: fix match with option type ( #17713 )
2023-03-21 11:38:30 +02:00
d3c0d3d.exe
54a1b66b94
os: add create_no_window parameter to Process ( #17726 )
2023-03-21 11:24:40 +02:00
yuyi
e1d4539a14
cgen: clean up comments in cgen.v ( #17725 )
2023-03-21 12:07:25 +03:00
yuyi
968b519be5
checker: implement infering generic struct types ( #17717 )
2023-03-20 20:42:53 +02:00
Louis Brunner
977cd0d8df
cgen: better alias handling for references/shared ( #17656 )
2023-03-20 17:35:45 +01:00
DJ-Dav
e7996a0792
tools: fix vls error unexpected token U in JSON ( #17709 )
2023-03-20 14:40:52 +02:00
Felipe Pena
17fe76368a
regex: fix simple char match ( #17701 )
2023-03-20 10:37:09 +02:00
Felipe Pena
74eac1de4e
parser: fix parsing array of options from a submodule ( #17714 )
2023-03-20 10:36:22 +02:00
Alexander Medvednikov
f1e9a8ff37
tests: remove unnecessary v_printf test
2023-03-19 15:30:52 +03:00
Alexander Medvednikov
47e10a9fcd
strconv: make v_printf private
2023-03-19 15:03:49 +03:00
Alexander Medvednikov
7939ca2997
strconv: deprecate v_sprintf
2023-03-19 11:30:56 +03:00
yuyi
c18bf48833
cgen: fix closure with fixed array variable ( #17707 )
2023-03-19 10:11:11 +02:00
Casper Kuethe
37af8bbd27
vweb.assets: add option for custom href and src attribute values ( #17703 )
2023-03-19 10:02:59 +02:00
yuyi
9275161d0f
strconv: fix v_sprintf with '%%' ( #17708 )
2023-03-19 09:52:45 +02:00
Delyan Angelov
3793bf1c99
builtin: optimise the common case of s.contains("x") add s.contains_byte(x) ( #17702 )
2023-03-19 01:10:13 +03:00
yuyi
14148f3e52
toml: clean up autocast in parser.v ( #17662 )
2023-03-18 23:15:00 +03:00
Felipe Pena
2df23a6698
json: fix ptr field access ( #17690 )
2023-03-18 14:47:40 +02:00
Brandon
aee76c5819
net: update new_request ( #17618 )
2023-03-17 22:17:22 +01:00
yuyi
268cee82fc
cgen: fix map of complex array ( #17660 )
2023-03-17 22:12:59 +01:00
yuyi
24ea00da0c
checker: clean up infer_struct_generic_types() and infer_fn_generic_types() ( #17668 )
2023-03-17 21:46:56 +01:00
Felipe Pena
9e7aeec215
sql: fix wrong field name on generated code ( #17684 )
2023-03-17 21:45:52 +01:00
Felipe Pena
68955bb26c
cgen: fix indexexpr with complex index expr ( #17693 )
2023-03-17 21:44:14 +01:00
yuyi
45c0a21f46
checker: clean up assign_stmt() ( #17664 )
2023-03-17 21:43:38 +01:00
yuyi
88ab947440
cgen: fix spawn method on generic struct ( #17691 )
2023-03-17 21:43:04 +01:00
Artem Yurchenko
608c194325
doc: [packed] and [minify] attributes documentation ( #17692 )
2023-03-17 21:41:48 +01:00
ArthurZhou
8c35ee0722
vweb: add an option to disable startup message ( #17645 )
2023-03-17 21:41:25 +01:00
Felipe Pena
2c349247e1
checker: fix anon fn initialization as struct-like ( #17652 )
2023-03-17 21:41:00 +01:00
Delyan Angelov
6e1e406288
vweb: implement live page reload in development, based on polling (useful with watch) ( #17683 )
2023-03-16 21:00:47 +01:00
Felipe Pena
658b116d07
checker: fix wrong struct warn about inited fields ( #17678 )
2023-03-16 21:42:00 +02:00
Felipe Pena
6709b2de0f
cgen: fix selector expr with alias to ptr ( #17649 )
2023-03-16 21:32:52 +02:00
Felipe Pena
25eabf8e2d
cgen: fix argument dereference for str method when receiver is ptr ( #17648 )
2023-03-16 21:28:14 +02:00
Felipe Pena
f5b67802fd
cgen: fix push operation on array of option ( #17658 )
2023-03-16 21:24:48 +02:00
yuyi
d349c1d86d
checker: check generic fn call argument type mismatch ( #17680 )
2023-03-16 21:19:03 +02:00
Felipe Pena
b345d77805
json: support field &Type ( #17655 )
2023-03-16 21:15:14 +02:00
Felipe Pena
5eb331ed89
cgen: fix option ptr printing ( #17651 )
2023-03-16 13:02:39 +02:00
Felipe Pena
7e8723d603
cgen: fix multi return assignment with option ( #17676 )
2023-03-16 12:59:49 +02:00
Felipe Pena
93a2ffa9ef
cgen: fix fixed array assignment from unsafe block ( #17647 )
2023-03-15 20:30:49 +02:00
Felipe Pena
39e80afab0
checker: fix missing check for wrong assignment: non-option to option type ( #17628 )
2023-03-15 20:24:36 +02:00
yuyi
d290f432d1
ast: clean up resolve_init() ( #17663 )
2023-03-15 17:20:04 +02:00
Felipe Pena
2656ce9522
checker: fix missing check for [export] attr on a fn, without parameter ( #17653 )
2023-03-15 17:17:45 +02:00
yuyi
aa50f4ebf7
checker: clean up sum_type_decl() ( #17669 )
2023-03-15 16:56:41 +02:00
Delyan Angelov
2e7dd8543a
ci: fix failing vlang/vpm test jobs
2023-03-15 16:54:16 +02:00
Delyan Angelov
8e9e91be7e
builder: add a separate ALL_FRONT_STAGES timing metric
2023-03-15 15:14:58 +02:00
Felipe Pena
b71c131678
cgen: fix map with comp-time reflection, improve comptime var handling ( #17603 )
2023-03-14 13:49:29 +02:00
yuyi
2643d6645f
ast, parser, cgen: fix generic struct init with inconsistent generic types ( #17639 )
2023-03-14 13:24:52 +02:00
Delyan Angelov
cb7e25e47e
sokol.gfx: update the C.sg_pass_attachment_desc declaration to match the one from the Sokol headers
2023-03-14 09:02:03 +02:00
Heptalon
618c92a13b
urllib: change Values.get to return an option type ( #17636 )
2023-03-14 08:44:40 +02:00
Delyan Angelov
daa9034583
os: return the long path for os.temp_dir() on windows, even for folders like c:\someth~1 ( #17623 )
2023-03-14 00:51:52 +02:00
Felipe Pena
d1d26893f5
parser: fix option struct init decl with module prefix ( #17615 )
2023-03-14 00:50:06 +02:00
Artem Yurchenko
f18cc6ebb0
vfmt: remove spurious src. prefix, from import name becoming import src.name ( #17633 )
2023-03-14 00:00:41 +02:00
Delyan Angelov
42732138c6
v: support -ldflags in addition to -cflags (allow adding C options *after* other C option, similar to LDFLAGS) ( #17630 )
2023-03-13 21:38:48 +02:00
Felipe Pena
9ad1c2f922
checker: fix missing option function field checking ( #17601 )
2023-03-13 15:05:56 +01:00
Alexander Medvednikov
733ac05bbd
roadmap: c2v, autofree
2023-03-13 14:51:58 +01:00
Felipe Pena
d00237f02c
cgen: fix code generated to option fn ( fix #17604 ) ( #17614 )
2023-03-13 11:56:13 +02:00
Delyan Angelov
4ba7ad9446
tools: make v doctor more informative
2023-03-13 11:44:03 +02:00
yuyi
5cb1f8965a
cgen: fix option struct init with reference option ( #17617 )
2023-03-13 09:58:45 +02:00
Thomas Mangin
0bd094292f
v: add support for _qnx.c.v overriding _default.c.v ( #17611 )
2023-03-12 19:48:36 +02:00
Felipe Pena
3197ec1a41
v: add compile-time enum evaluation with $for item in MyEnum.fields { dump(item.value) dump(item.name) } ( #17517 )
2023-03-12 12:46:54 +02:00
Delyan Angelov
b2a71ecab2
pref: support v -e "println(2+5)" ( #17605 )
2023-03-12 00:42:36 +01:00
yuyi
95a9f0e29b
ast, parser, fmt: fix fmt error of infix expr with comments ( fix #17560 ) ( #17583 )
2023-03-12 01:07:13 +02:00
Thomas Mangin
8490ea318b
readline: add more readline support to macos too (not simply os.get_raw_line based, but arrow key navigation, history etc too) ( #17602 )
2023-03-12 01:06:35 +02:00
ChAoS_UnItY
f02b423f80
builtin: string test refactor, string functions inlining ( #17598 )
2023-03-11 20:44:45 +02:00
Felipe Pena
ddcc22fe08
checker: fix parenexpr checking on assignment ( #17593 )
2023-03-11 14:56:47 +02:00
Alexander Medvednikov
dc24df9510
cbuilder: change order of functions to improve readability
2023-03-11 14:19:18 +03:00
yuyi
6e4dc82f28
sync: fix error of empty struct channel ( fix #17556 ) ( #17597 )
2023-03-11 12:02:51 +02:00
Felipe Pena
a98376025e
checker: fix missing re-check of recursive generic function ( fix #16962 ) ( #17592 )
2023-03-11 11:57:41 +02:00
Swastik Baranwal
48a03a4874
checker: check wrapped Option types before comparison ( #17590 )
2023-03-11 11:16:12 +02:00
yuyi
b691e1e24a
checker: check struct embed required field ( #17595 )
2023-03-11 11:12:26 +02:00
Petr Makhnev
0370116562
readme: add section about editor plugins and IntelliSense ( #17596 )
2023-03-11 11:00:10 +02:00
ChAoS_UnItY
9fa49da9d5
builtin: add rsplit functions ( #17577 )
2023-03-11 00:07:02 +01:00
Felipe Pena
ee4150f213
v: add a $Option comp-time type, to enable: $for f in Test.fields { $if f.typ is $Option { } } ( #17546 )
2023-03-10 12:17:25 +02:00
yuyi
09c9cbcef9
cgen: fix assign option value using propagate option ( #17578 )
2023-03-10 11:30:46 +02:00
yuyi
038fa6c8ab
checker: remove warning of casting same reference type ( #17579 )
2023-03-10 11:07:09 +02:00
jmdyck
368604f9a5
docs: fix some minor mistakes ( #17582 )
2023-03-10 11:04:14 +02:00
Felipe Pena
23e385ee8a
json: fix json decode/encode with option type ( #17393 )
2023-03-10 10:49:26 +02:00
yuyi
b42a3f43a5
crypto, math: change option to result ( #17580 )
2023-03-10 10:31:05 +02:00
Felipe Pena
32d09544d7
cgen, checker: fix dump() to return option values ( #17563 )
2023-03-09 20:29:25 +02:00
yuyi
71c3b66ecf
datatypes: fix linked list of map ( fix #17570 ) ( #17573 )
2023-03-09 14:26:01 +01:00
Felipe Pena
d353dd6e8a
cgen: fix selector accessing field ( #17567 )
2023-03-09 14:24:43 +01:00
yuyi
737e7f6410
cgen: fix generic array of alias ( #17571 )
2023-03-09 13:57:14 +01:00
Felipe Pena
638805be63
cgen: fix code for unwrap option on print ( #17545 )
2023-03-08 20:55:19 +01:00
Felipe Pena
785546f277
json2: fix decode result with option fields ( #17561 )
2023-03-08 20:54:28 +01:00
Felipe Pena
b19052949f
cgen: fix array initialization with options ( #17562 )
2023-03-08 20:54:00 +01:00
Felipe Pena
a0b3379d4a
cgen: fix fn option-only return print ( #17547 )
2023-03-08 20:53:23 +01:00
Felipe Pena
e253256c30
cgen: fix option unwrap on assignment ( #17551 )
2023-03-08 20:52:24 +01:00
ChAoS_UnItY
ae6a48c0e3
all: rename it to index in array inits ( #17543 )
2023-03-08 20:51:45 +01:00
Felipe Pena
2597efa7f6
cgen: fix struct initialization with option value ( #17539 )
2023-03-07 23:53:56 +03:00
Felipe Pena
b4f0bb247d
cgen: fix default initialization of option array with none values ( #17536 )
2023-03-07 23:53:07 +03:00
yuyi
b6c4e88462
checker: check error of casting to interface ( fix #17522 ) ( #17531 )
2023-03-07 23:49:53 +03:00
Felipe Pena
b85f71d00f
cgen: fix default init value for an array of option ( #17538 )
2023-03-07 20:04:16 +02:00
Felipe Pena
792b822091
cgen: fix dump(option_value) inside a generic function ( #17537 )
2023-03-07 18:13:19 +02:00
Felipe Pena
32751440b6
checker: fix missing check for none type on or block on non-option ( #17529 )
2023-03-07 18:11:03 +02:00
Felipe Pena
68cab00ded
cgen: fix or-block with return void statement ( #17527 )
2023-03-07 15:01:46 +01:00
Felipe Pena
9826310882
cgen: fix struct initialization for nested option struct ( fix #17524 ) ( #17525 )
2023-03-07 09:30:45 +01:00
Felipe Pena
1e416de627
checker: fix const init with comptime ( #17528 )
2023-03-07 09:15:46 +01:00
Ikko Eltociear Ashimine
784592af83
os: fix typo in os.v ( #17519 )
2023-03-07 08:30:37 +01:00
ChAoS_UnItY
6e670ec908
v: support interface field compile time reflection ( #17503 )
2023-03-07 08:52:40 +02:00
Alexander Medvednikov
d7a418fbb5
pref: no-skip-unused
2023-03-06 14:13:29 +01:00
yuyi
65a627d72b
checker: allow aa := AA{}, when AA has an option field, that is a struct, that has a [required] tag on its fields ( #17516 )
2023-03-06 10:16:05 +02:00
Wertzui123
77b6bc1c1a
net.websocket: fix a typo (allready -> already) ( #17512 )
2023-03-06 10:05:17 +02:00
Felipe Pena
7de3485bd2
cgen: fix multi return with option type ( #17489 )
2023-03-05 11:41:19 +01:00
Petr Makhnev
c1f249af6c
test: handle compilation errors when running tests specially in the teamcity runner ( #17511 )
2023-03-05 10:14:23 +02:00
Petr Makhnev
1a48d08d7a
cgen: add calls to all typeof functions for interfaces and sum-types ( #17490 )
2023-03-04 14:59:00 +02:00
Tim Marston
3f8821b8d8
cgen: unwrap and c-mangle field selectors in or blocks ( #17495 )
2023-03-04 11:52:08 +02:00
yuyi
6944d54257
parser, cgen: fix option variable error ( fix #17460 ) ( #17479 )
2023-03-04 11:47:49 +02:00
yuyi
30c205ef2c
cgen: fix printing map reference value ( #17496 )
2023-03-04 11:35:38 +02:00
l-m
6f7192359a
wasm: bug fixes and memory based changes ( #17497 )
2023-03-04 11:24:33 +02:00
Felipe Pena
72cbca9653
checker: fix and improve return stmt error messages ( #17477 )
2023-03-04 09:32:55 +02:00
Felipe Pena
c5832379e7
checker, cgen, parser: fix Option/Result error messages (capitalized) ( #17486 )
2023-03-04 09:02:57 +03:00
Alexander Medvednikov
0ba0fb256f
checker: check the type of SizeOf
2023-03-03 18:45:18 +01:00
Petr Makhnev
3c23a7ebba
roadmap: tooling and web section for 1.0 ( #17488 )
2023-03-03 15:34:37 +01:00
Alexander Medvednikov
7876593eaf
roadmap: 1.0
2023-03-03 14:58:49 +01:00
walking devel
5454562d2c
checker, parser, orm: remove redundant & for sum type value arguments to functions with expr &ast.Expr parameters ( #17482 )
2023-03-03 14:35:12 +02:00
l-m
9c9adb125b
doc: ignore builtin/wasm ( #17480 )
2023-03-03 12:35:21 +02:00
walking devel
5e2ff246c8
cgen: pass sum type values automatically by reference too, when functions require that ( #17476 )
2023-03-03 09:11:15 +02:00
Felipe Pena
904f984367
checker: fix or-block expected type checking ( #17469 )
2023-03-03 08:30:44 +02:00
Wertzui123
e8dbcd96bd
readme: minor improvements ( #17474 )
2023-03-03 08:28:07 +02:00
yuyi
17000ef7b6
checker: check option fn returning error ( fix #17423 ) ( #17438 )
2023-03-02 15:49:50 +02:00
Felipe Pena
8f7c35552d
fmt: fix formatting for $compile_warn ( #17450 )
2023-03-02 15:40:53 +02:00
Delyan Angelov
9fc2860074
checker: fix compiler panic for for k, mut val in app.field[x].values { ( #17468 )
2023-03-02 15:40:14 +02:00
Samuel Šulovský
7497d8457f
docs: fix incorrect struct literal and interface smart cast errors ( #17457 )
2023-03-02 13:31:12 +02:00
Delyan Angelov
e2daa84a33
ci: add windows and macos jobs for checking the wasm backend too ( #17451 )
2023-03-01 21:53:03 +02:00
l-m
cdc0159c6e
wasm: update the compile flags in binaryen.c.v to assist darwin ( #17449 )
2023-03-01 14:21:08 +02:00
Felipe Pena
bba7cfee0b
checker: check or-block used on non-option value ( #17444 )
2023-03-01 02:08:18 +02:00
walking devel
3682a9cf88
orm: allow use of mut db orm.Connection ( #17439 )
2023-03-01 00:49:30 +02:00
Felipe Pena
5f4b34ef12
eval: add host API, for passing and receiving values, to/from code, ran by the eval.Eval instances ( #17426 )
2023-03-01 00:42:19 +02:00
Haren S
acfd21e4e0
os: add #include <sys/types.h> to debugger_darwin.c.v, to fix bootstrapping on macOS <= 11 ( #17446 )
2023-03-01 00:06:12 +02:00
l-m
0625caad56
wasm: add a webassembly compiler backend, based on using binaryen ( #17368 )
2023-02-28 23:58:53 +02:00
yuyi
b9a8a21094
cgen: fix nested option struct init ( fix #17415 ) ( #17425 )
2023-02-28 14:02:17 +02:00
Alexander Medvednikov
ebeb652348
readme: 4 ways to do memory management
2023-02-28 09:58:52 +01:00
Alexander Medvednikov
d5ad96f876
readme: minor fixes
2023-02-28 09:55:57 +01:00
walking devel
b7b6c2368e
orm: allow using connections, that were explicitly casted to orm.Connection too ( #17427 )
2023-02-27 23:54:03 +02:00
Petr Makhnev
864e1994b0
vlib/time: format table for custom_format() ( #17428 )
...
* vlib/time: format table for `custom_format()`
* small fix
* small fix
2023-02-27 21:48:05 +02:00
Delyan Angelov
607649b44d
builder: add small diagnostic and instructions for when the C cross compiler for linux->windows is not installed.
2023-02-27 16:59:56 +02:00
Delyan Angelov
91e0f7a3af
tools/fast: add 2023.html link to the header, used by fast.v
2023-02-27 11:40:22 +02:00
paul-elesin
15cb18cbd2
os: make hostname and loginname functions return Result ( #17414 )
2023-02-27 05:21:23 +03:00
Delyan Angelov
9c511e03f6
tools: remove import v.pref, just for pref.vexe_path(), to compile tools faster ( #17411 )
2023-02-26 07:56:14 +02:00
yuyi
45d4849b0f
checker: fix returning match expr with custom error ( #17413 )
2023-02-26 07:54:53 +02:00
Delyan Angelov
00aecf92e7
tools: make v self compile with tcc on Apple M1, since it is faster, and tcc now can handle it ( #17409 )
2023-02-26 01:26:33 +02:00
Delyan Angelov
4c13a4c22c
ci: make websocket_test.v more robust (wait till the websocket server are open for connections, instead of relying on fixed time.sleep delays, which are not enough on the CI)
2023-02-25 19:39:14 +02:00
Delyan Angelov
524c500146
cgen: add requires to c_reserved, so that V generated code, can be compiled with -cc g++-11 -no-std -cflags -std=c++20 as well ( #17404 )
2023-02-25 16:50:48 +02:00
Delyan Angelov
cf47a5f978
ci: fix websocket_test.v after a7ae3bf
2023-02-25 14:46:31 +02:00
Felipe Pena
12ec0e9fe1
cgen: support option pointer values - ?&Type ( #17397 )
2023-02-25 14:44:41 +02:00
Petr Makhnev
51bb8cda15
test: fix teamcity runner message escapes ( #17405 )
2023-02-25 14:39:09 +02:00
Delyan Angelov
a7ae3bfa78
ci: fix all ports for the servers started in websocket_test.v
2023-02-25 14:36:54 +02:00
Delyan Angelov
e7bf33b206
ci: replace node-version: 12.x with node-version: 16 too
2023-02-25 14:29:00 +02:00
Delyan Angelov
2327f0781b
ci: replace actions/setup-node@v1 with actions/setup-node@v3
2023-02-25 14:25:58 +02:00
Delyan Angelov
85b81ea9bb
thirdparty: fix compilation of thirdparty/stb_image/stb_image.h with latest tcc on macos
2023-02-25 13:03:46 +02:00
Felipe Pena
9a8f3025f5
cgen: implement option fixed array ( #17400 )
2023-02-24 19:25:31 +02:00
yuyi
2836544978
cgen: minor cleanup of leftover comments in expr() ( #17390 )
2023-02-24 11:03:07 +02:00
Felipe Pena
6b20bddd15
cgen, json2: fix auto str option type generator, and json2 option type handling ( #17388 )
2023-02-24 10:54:45 +02:00
Alexander Medvednikov
94ce753df3
Update LICENSE
2023-02-24 04:37:43 +03:00
yuyi
acd903484d
parser: fix channel pop with or expression: ch := <-self.item or { return none } ( #17392 )
2023-02-23 16:45:15 +02:00
Felipe Pena
248e9538ca
parser: check for anonymous function param redefinitions ( #17382 )
2023-02-23 16:34:42 +02:00
Artem Yurchenko
d3870a0c7e
README: update gg/sokol Ubuntu dependencies (add libgl-dev) ( #17385 )
2023-02-22 22:01:43 +02:00
Felipe Pena
2879afadd4
cgen, checker: fix none checking ( #17364 )
2023-02-22 16:13:02 +02:00
Swastik Baranwal
c173104295
cgen: add & before ptr arr elements ( #17379 )
2023-02-22 14:10:07 +02:00
Felipe Pena
6682911bc3
cgen: fix print fn + cycle const error message ( #17355 )
2023-02-22 13:38:08 +02:00
Delyan Angelov
b1ed1d3b32
ci: upgrade to actions/checkout@v3 to avoid deprecation warnings in the CI about that action using Node.js 12
2023-02-21 13:40:24 +02:00
Delyan Angelov
4a81272914
ci: upgrade sdl_ci.yml and native_backend_tests_ci.yml, to ubuntu-20.04, to avoid ci failures, due to the brownout period, for the deprecated ubuntu-18.04
2023-02-21 13:35:35 +02:00
Delyan Angelov
612ac69486
ci: fix bootstrapping on macos/freebsd etc
2023-02-21 12:30:35 +02:00
Felipe Pena
82c4338b76
os: move pub fn debugger_present() bool{ to platform-specific files (better ptrace portability handling) ( #17373 )
2023-02-21 10:55:03 +02:00
R cqls
cd00beb099
gg: add toggle_fullscreen and is_fullscreen ( #17371 )
2023-02-20 21:58:04 +02:00
Sanath Kumar U
269462425a
tools: prevent v init from overwriting an already existing src/main.v file ( fix #17362 ) ( #17363 )
2023-02-20 12:54:38 +02:00
Felipe Pena
cb976c7e17
os: fix the declaration of C.ptrace (the 4th parameter is a pointer, not an integer) ( #17366 )
2023-02-20 12:29:49 +02:00
yuyi
fcef8c98ee
cgen: fix map of array initialisation, with len and no default ( fix #17358 ) ( #17367 )
2023-02-20 12:26:48 +02:00
Swastik Baranwal
e9a3817aed
checker: disallow enum initalization ( #17361 )
2023-02-19 22:22:07 +01:00
JalonSolov
79b2c34f97
arrays: replace C.memcpy with vmemcpy calls, to make v -shared -Wimpure-v vlib/arrays/ pass ( #17357 )
2023-02-19 19:01:18 +02:00
Felipe Pena
8a1e90fff1
checker: allow none to be casted to all option types, including aliases ( #17348 )
2023-02-19 18:56:14 +02:00
Felipe Pena
ce1978ecde
parser: disallow defining methods on option receivers - fn (x ?Type) method() { ( #17351 )
2023-02-19 15:00:29 +02:00
Petr Makhnev
d971d93066
vccheck-md: add play and play-test command ( #17350 )
2023-02-18 20:55:10 +02:00
yuyi
93a3f5ff7d
builtin, cgen: fix array of struct with map field initialize ( fix #17325 ) ( #17340 )
2023-02-18 20:34:15 +02:00
Artem Yurchenko
8011121d43
README: fix twitter badge ( fix #17166 ) ( #17339 )
2023-02-18 14:33:30 +02:00
Artem Yurchenko
d616fb0a43
docs: add a Disabling the formatting locally section, about // vfmt off and // vfmt on ( #17341 )
2023-02-18 14:26:28 +02:00
Felipe Pena
2879c5110c
cgen, check, parser: implement first-class option type ( #17017 )
2023-02-18 11:45:01 +02:00
Felipe Pena
e066d1d3df
cgen: fix missing aggregate rec_type ( #17335 )
2023-02-16 16:36:16 +01:00
Artem Yurchenko
936bced29e
readme: improve the sections about the installation of dependencies ( #17336 )
2023-02-16 12:25:51 +02:00
Felipe Pena
7f5cba1a38
cgen: add comptime field.name checking ( #17318 )
2023-02-16 11:46:27 +02:00
Ahmad Yasser
cad2cd5583
docs: fix typos using codespell ( #17332 )
2023-02-16 11:43:39 +02:00
walking devel
580dbc3f0e
orm: allow inserting empty objects with db.sqlite (SQLite uses a slightly different SQL dialect) ( #17334 )
2023-02-16 11:34:16 +02:00
yuyi
289993ad7f
checker: fix printing address of integer variable ( #17327 )
2023-02-15 20:05:26 +02:00
Ikko Eltociear Ashimine
2382549df3
math: fix typo in factorial.v ( #17322 )
2023-02-15 19:57:37 +02:00
walking devel
5d4c9dc9fc
checker: allow using struct field as ORM limit and offset. ( #17330 )
2023-02-15 19:47:35 +02:00
zakuro
f5423ed26b
checker: fix warning of unnnecessary default none value for option struct fields ( #17305 )
2023-02-15 11:42:00 +02:00
Felipe Pena
039c9b2550
cgen, checker: fix comptimeselector resolution + if comptime branching improvement + comptimeselector cleanup ( #17302 )
2023-02-15 11:40:11 +02:00
yuyi
5a8c433548
cgen: fix printing a reference to a function ( #17307 )
2023-02-15 11:27:21 +02:00
irishgreencitrus
4691c5d637
doc: add a section documenting #preinclude ( #17304 )
2023-02-15 11:25:13 +02:00
yuyi
d0a873ca02
checker: fix printing the address of a struct value with println('${&value:p}') ( #17321 )
2023-02-15 11:20:25 +02:00
yuyi
b6ecd634e3
tests: change option to result in vscript_using_generics_in_os.vsh ( #17306 )
2023-02-14 13:01:35 +02:00
Delyan Angelov
b13f7118ab
os,term: fix C.tcsetattr declaration (add missing int return type)
2023-02-13 15:16:23 +02:00
starryskye
2d3508c872
net.websocket: call close event ( #17300 )
2023-02-13 14:28:41 +02:00
Felipe Pena
16344cfc28
checker: fix sumtype cast of comptime var ( #17287 )
2023-02-13 13:24:36 +01:00
Felipe Pena
fbcb1f3711
checker: disallow &nil ( #17283 )
2023-02-13 13:24:11 +01:00
Felipe Pena
04e00a46d4
cgen, checker: allow array decompose on non-variadic func call (e.g call(...arr)) ( #17284 )
2023-02-13 13:13:52 +02:00
Makhnev Petr
d907ceb50f
docs: format with IDEA formatter other .md files ( #17293 )
2023-02-13 12:49:13 +02:00
Makhnev Petr
c8c70de87d
docs: unify format of notes ( #17294 )
2023-02-13 10:29:02 +02:00
zakuro
e7fcf66095
tests: add more tests for struct option fields in vlib/v/tests/option_test.v ( #17297 )
2023-02-13 10:02:47 +02:00
Makhnev Petr
65d218e005
docs: format with IDEA formatter ( #17291 )
2023-02-12 17:25:04 +02:00
Felipe Pena
eb7e1b4712
cgen: fix cast with comptime var ( #17286 )
2023-02-12 07:54:09 +01:00
yuyi
6883561d6d
cgen: fix c_fn_name() for mongo module ( #17282 )
2023-02-11 20:33:41 +02:00
yuyi
90591eb813
checker: check nested struct field with required attr ( fix #10913 ) ( #17277 )
2023-02-11 11:22:31 +02:00
walking devel
03be525c82
orm: allow using reference objects in ORM insert. ( #17279 )
2023-02-11 10:02:55 +02:00
MatejMagat305
ac381f5e5b
docs: add git to the list of installed prerequisites for V on Termux ( #17276 )
2023-02-10 17:02:02 +02:00
walking devel
0a742a6690
docs: add new line before tables ( #17272 )
2023-02-10 11:53:38 +02:00
MatejMagat305
c003bfd5d4
docs: add make to the list of installed prerequisites for V on Termux ( #17269 )
2023-02-10 01:00:33 +02:00
yuyi
7cfbc1cc5f
checker: fix generic array of sumtype push operation ( #17268 )
2023-02-10 00:27:07 +02:00
Felipe Pena
3aecd01d05
tests: add empty_struct_compare_test.v too ( #17270 )
2023-02-10 00:26:41 +02:00
Riccardo
ba9a9fdc2a
builder: fix bug for incorrectly detecting tcc as icc, when V was installed in a path containing icc ( #17271 )
2023-02-10 00:24:03 +02:00
MatejMagat305
dcb9c3beb3
cgen: support [spawn_stack: 131072] fn attribute, for controlling the max size of the stack, of the spawned threads ( #17222 )
2023-02-09 15:57:53 +02:00
yuyi
19ba7c5ceb
parser: fix fn attrs with anon struct param ( #17266 )
2023-02-09 14:10:28 +02:00
fanlia
4c33a92aac
examples: fix missing products table in v run examples/vweb_fullstack/ ( #17253 )
2023-02-09 12:03:23 +02:00
yuyi
34efc9c427
checker: fix returning if expr with custom error ( #17265 )
2023-02-09 11:45:46 +02:00
Felipe Pena
47e8d967e6
v.reflection: add type symbol info metadata ( #17188 )
2023-02-08 21:30:44 +02:00
Felipe Pena
fbfdab9e2d
cgen: remove unused generated func ( #17258 )
2023-02-08 21:27:24 +02:00
ChAoS_UnItY
404a9aa442
v: forbid function parameter names, shadowing imported module names ( #17210 )
2023-02-08 20:37:04 +02:00
Delyan Angelov
c16549b6fd
ci: fix VLS compilation after 36dc7fa
2023-02-08 14:04:03 +02:00
Delyan Angelov
6b0b7a9e4f
cgen: fix compilation of vlang/sdl examples
2023-02-08 13:27:59 +02:00
Delyan Angelov
36dc7faf2c
net.openssl: add manual .str() methods for C.SSL and C.SSL_CTX, fix a bug in the V auto str generation as well.
2023-02-08 13:14:12 +02:00
Delyan Angelov
522a9f5908
net.openssl: add V side declaration for C.SSL_CTX too (fix auto .str() method generation for V structs containing references to C.SSL_CTX)
2023-02-08 12:33:21 +02:00
yuyi
6136b62220
cgen: fix method calls to nonarray methods, named first, last or repeat ( #17252 )
2023-02-08 10:45:17 +02:00
Mehmet Ali
0b17865c3d
examples: use -Wl,-rpath=. instead of LD_LIBRARY_PATH=. in the call_v_from_c example ( #17244 )
2023-02-08 09:44:10 +02:00
Delyan Angelov
9794a239b1
sokol.sgl: add wrapper for scissor_rectf too
2023-02-07 12:53:59 +02:00
yuyi
a173f2964e
cgen: minor cleanup in stmt() ( #17240 )
2023-02-07 09:17:10 +02:00
yuyi
223c752460
cgen: fix for in mut array with infix expr ( #17233 )
2023-02-07 00:10:07 +02:00
MatejMagat305
954843c486
os: fix default result of os.temp_dir() for termux ( #17237 )
2023-02-07 00:07:35 +02:00
yuyi
e76e93d230
ast: add comments for ast.AssertStmt and ast.IfGuardExpr ( #17235 )
2023-02-06 16:39:03 +02:00
yuyi
7090e905f7
checker: fix array filter of fn mut argument ( #17231 )
2023-02-06 16:37:37 +02:00
Mehmet Ali
791ef4b4a6
gg: fix gg.scissor_rect behavior on Android ( #17229 )
2023-02-06 12:26:20 +02:00
yuyi
242d6fa1ff
checker: disallow for mut letter in 'abc' { ( #17234 )
2023-02-06 11:58:03 +02:00
yuyi
858ce4e35d
cgen: correct comments for expr_with_tmp_var() ( #17227 )
2023-02-05 14:16:29 +02:00
yuyi
fc65de9bba
checker: check sumtype in unknown type ( #17225 )
2023-02-05 12:02:30 +01:00
yuyi
c40e25b028
cgen: fix assigning option of struct fntype field ( #17224 )
2023-02-05 09:13:19 +02:00
Delyan Angelov
d349648cda
vfmt: fix typename DecompressParams -> DezParams in function parameters, on import compress as z ( fix #17216 )
2023-02-05 00:25:14 +02:00
yuyi
e8ca2e62a7
checker: fix if guard with struct option fntype field ( #17220 )
2023-02-04 11:38:07 +02:00
Makhnev Petr
804065a0fa
docs: remove note illustrating shadowng of import name, due to 0b7a1cd ( #17208 )
2023-02-03 09:17:56 +02:00
ChAoS_UnItY
0b7a1cd7ce
v: forbid local variable names, shadowing imported module names ( #17197 )
2023-02-03 09:09:41 +02:00
Tim Marston
603469b856
cgen: don't voidptr cast option/result functions ( fix #17204 ) ( #17207 )
2023-02-03 08:50:20 +02:00
Swastik Baranwal
6d63b27c26
checker: disallow function calls returning void, in () expressions, in assignments ( #17205 )
2023-02-03 08:47:52 +02:00
walking devel
8cdc554c63
net.html: fix panic in html.parse() called with empty string, remove replacement of \n in the original content ( #17206 )
2023-02-03 00:32:03 +02:00
Delyan Angelov
a8102f14be
make: use git clone --filter=blob:none for vc/ and thirdparty/tcc/ , which minimises the amount of transferred data (especially for doing v up after a few weeks/months)
2023-02-02 18:33:51 +02:00
yuyi
b5b1efbb7b
cgen: fix sumtype as cast with calling twice ( #17196 )
2023-02-02 13:57:37 +02:00
Delyan Angelov
6572d597f9
Revert "cgen: fix sumtype as cast with calling twice ( fix #17156 ) ( #17183 )"
...
This reverts commit 90ae3c82c9 .
2023-02-02 10:49:15 +02:00
yuyi
90ae3c82c9
cgen: fix sumtype as cast with calling twice ( fix #17156 ) ( #17183 )
2023-02-02 09:31:11 +02:00
Delyan Angelov
988aed0353
ci: fix broken tests after 322eb81
2023-02-01 23:30:48 +02:00
Alexander Medvednikov
322eb8197d
checker: make null warning an error
2023-02-01 18:01:55 +01:00
MatejMagat305
e70848a98b
dl: add more dlopen flags ( #17184 )
2023-02-01 18:32:35 +02:00
Hitalo Souza
ed58b95a9d
json2: encode array of all and verify sum type ( #17051 )
2023-02-01 15:52:58 +01:00
Dennis T Kaplan
9809427f40
README: add Void Linux installation instructions ( #17176 )
2023-02-01 11:48:44 +02:00
Christopher Fore
2029d1830f
tools: remove cmd/tools/modules/vhelp/ & add print to v share ( #17178 )
2023-02-01 11:18:23 +02:00
walking devel
02fc58d124
orm: add type checker for where ( #17179 )
2023-02-01 10:53:34 +02:00
Christopher Fore
10261c427f
tools: add v share file.v ( #17172 )
2023-01-31 20:36:17 +02:00
Tim Marston
26b9464f51
gg: setup ctx.window.user_data and ctx.user_data on ctx.run(), instead of in gg.new_context, to allow for embedding gg.Context in ui ( #17169 )
2023-01-31 18:22:20 +02:00
Delyan Angelov
a932a8b1ea
net.http: make the errors that parse_status_line returns more informative to make diagnosing problems easier
2023-01-31 15:26:08 +02:00
Alexander Medvednikov
8009bc3a98
changelog: more 0.3.3 features
2023-01-31 14:17:48 +01:00
Christopher Fore
b3d742d13a
v.help: reorganise the folder layout of the v help topic text files ( #17155 )
2023-01-31 12:04:01 +02:00
walking devel
d563739264
checker: add type checking for ORM limit, offset, and order by. ( #17095 )
2023-01-31 10:22:02 +02:00
Swastik Baranwal
b487c9d38e
parser: add more precise errors, for fn (p Point) += (q Point) Point { ( #17167 )
2023-01-31 09:36:33 +02:00
JalonSolov
0d04104112
docs: change one more Optional to Option ( #17170 )
2023-01-31 09:32:11 +02:00
Ulises Jeremias Cornejo Fandos
40ec2a292e
vlib: add a new dl.loader module, to simplify dynamic library loading, when the DLLs may be in multiple customisable locations ( #17161 )
2023-01-31 09:27:48 +02:00
Alexander Medvednikov
2d51379f00
changelog: more 0.3.3 features
2023-01-30 21:44:22 +01:00
Ahmad Yasser
6b20c57246
docs,sync: separate example code blocks with a newline ( #17165 )
2023-01-30 21:25:33 +02:00
Delyan Angelov
5abca37ff7
parser: add a temporary exception for C.statvfs as well (same name reused for function *and* struct)
2023-01-30 21:11:59 +02:00
Alexander Medvednikov
d1f57ead71
V 0.3.3
2023-01-30 18:20:51 +01:00
Delyan Angelov
62f7e56a18
v.vcache: fix a panic due to a race on creating folders in ~/.vmodules/cache/XY
2023-01-30 19:00:00 +02:00
Delyan Angelov
9c78e3c289
tools: fix v check-md . on windows too (skip thirdparty/ and the CHANGELOG)
2023-01-30 18:56:03 +02:00
Alexander Medvednikov
1470eb6fa4
gg: fix native image rendering with with/height=0
2023-01-30 16:06:18 +01:00
Delyan Angelov
38b02c908d
thirdparty: update stb_image.h to its latest version v2.28
2023-01-30 13:06:09 +02:00
Felipe Pena
11f734296f
checker: fix generic array clone ( #17153 )
2023-01-30 11:27:17 +02:00
walking devel
a489417484
orm: detect type mismatching on inserting an object ( #17157 )
2023-01-30 11:26:10 +02:00
l-m
bb512f782e
checker, ast: add field promoted_type for InfixExpr, filled in by the checker, to save duplicate work in the backends ( #17158 )
2023-01-29 21:06:05 +02:00
walking devel
4747e70d9d
orm: make last_id() return int, instead of orm.Primitive ( fix #12110 ) ( #17151 )
2023-01-29 16:00:23 +02:00
Felipe Pena
e6a4f76f82
cgen: fix returing comptime if expressions within functions with an option result ( #17154 )
2023-01-29 15:59:13 +02:00
anusrnm
5cd01ea494
gzip: fix flag location in header ( #17140 )
2023-01-29 13:27:04 +02:00
Swastik Baranwal
7f5f69a78a
checker: check option and result handling in as casts ( #17133 )
2023-01-29 12:28:14 +02:00
Felipe Pena
cb79e57c1a
cgen: fix generated code for match bar()?.a { (matchexpr with call expr using propagation) ( #17150 )
2023-01-29 12:11:30 +02:00
walking devel
9a86456365
cgen: support string interpolation in ORM queries ( #17141 )
2023-01-29 01:27:34 +02:00
yuyi
d3e4058aec
cgen: fix printing for mut v in arr ( #17137 )
2023-01-28 10:15:28 +02:00
Felipe Pena
b732dd6816
cgen: fix opt member eq operation ( #17134 )
2023-01-28 10:13:11 +02:00
walking devel
e064743c73
parser: recursively search undefined variables in the where parts of SQL statements ( #17136 )
2023-01-28 10:07:02 +02:00
Nahua
1d4fd53344
net.http: add documentation to http, method, server, and status ( #17130 )
2023-01-27 13:58:55 +02:00
MatejMagat305
fe157db0ce
v: support an optional fn cleanup() { in each module, to complement the existing optional fn init() { ( #17119 )
2023-01-27 11:31:03 +02:00
walking devel
a9a04bba55
orm: support fn calls in where ( #17127 )
2023-01-26 22:36:30 +02:00
l-m
c14d15bd3d
ast,checker,parser,cgen: [c:'sym'] rework; allow compiling code from .v files tagged with [translated] without needing -translated too ( #17125 )
2023-01-26 17:47:38 +02:00
Makhnev Petr
6365d9e070
checker: forbid var declaration in post statement of for loop ( #17120 )
2023-01-26 17:40:10 +02:00
Makhnev Petr
15c0a73740
checker: fixed error pointer for "redefinition of key iteration variable" and "redefinition of value iteration variable" errors ( #17121 )
2023-01-26 12:31:35 +02:00
Nahua
21b17fe234
io: add missing documentation and edit existing ones ( #17105 )
2023-01-25 22:03:20 +02:00
Felipe Pena
84b99ceeb2
vlib: add a v.reflection module for reflection done at runtime ( #17072 )
2023-01-25 22:01:22 +02:00
Swastik Baranwal
e32ed368ca
ast, checker, parser: add enum type pos ( #17112 )
2023-01-25 21:59:28 +02:00
Keito Tobichi
6bb930591e
examples: add more graphs examples, fix typo ( #17113 )
2023-01-25 21:58:44 +02:00
Delyan Angelov
86f8c55107
ast: improve the support for #flag comptime_known_define something (support #flag wasm32_emscripten etc)
2023-01-25 17:38:47 +02:00
Delyan Angelov
d2e5c721a0
net: allow more fine grained control over socket shutdowns
2023-01-25 12:34:39 +02:00
walking devel
b34c55ffd6
ast: fix TypeSymbol.is_primitive, add TypeSymbol.is_bool ( #17106 )
2023-01-25 08:38:59 +02:00
Makhnev Petr
0874376db0
builtin: fix wrong module name imported in vlib/builtin/linux_bare/old/.checks/linuxsys/linuxsys.v ( #17102 )
2023-01-24 22:19:30 +02:00
Makhnev Petr
17d65db828
builtin: add string.trim_indent()` method ( #17099 )
2023-01-24 21:41:25 +02:00
Makhnev Petr
5aad0db0f7
parser: improve error for prefix inc/dec statement --a/++mp["id"] ( #17090 )
2023-01-24 10:08:35 +02:00
Makhnev Petr
91799a1742
checker: add error for inc/dec for non lvalue ( #17091 )
2023-01-24 10:03:37 +02:00
Roy Ivy III
5cd074a49e
builtin: improve multi-platform portability for string.split_into_lines() ( #17078 )
2023-01-24 10:02:25 +02:00
Hitalo Souza
0230395062
examples: update examples/js_dom_draw_bechmark_chart/README.md with a chart ( #17084 )
2023-01-24 02:07:13 +02:00
Nahua
da3ad2dca6
gx: add missing documentation or update existing ones for public functions ( #17094 )
2023-01-24 02:02:07 +02:00
walking devel
8b6fceb0a3
cgen: fix -autofree with arr[idx] or { default } ( #17096 )
2023-01-24 00:53:26 +02:00
MatejMagat305
16e2ade9ff
docs: add termux to the list of known supported platforms ( #17093 )
2023-01-24 00:31:34 +02:00
Makhnev Petr
5dde4ce981
docs: improve the operator overload description ( #17085 )
2023-01-24 00:24:50 +02:00
Makhnev Petr
f4289cd302
docs: expand empty <a> tags ( #17092 )
2023-01-24 00:16:01 +02:00
Delyan Angelov
f667600cd5
docs: update count of reserved keywords to 44 after both 828ab47 and 3df231c were merged.
2023-01-23 11:50:20 +02:00
Makhnev Petr
828ab473c1
docs: add __global to keyword list ( #17081 )
2023-01-23 11:45:05 +02:00
MatejMagat305
6d223b9a26
builtin: add a map.reserve/1 method ( #17052 )
2023-01-23 11:07:25 +02:00
Makhnev Petr
3a9355d898
change or{} to or {} as most other places ( #17082 )
2023-01-23 11:05:34 +02:00
Makhnev Petr
3df231c466
doc: add spawn to keyword list ( #17080 )
2023-01-23 03:48:32 +03:00
yuyi
865c0ea8bd
checker: check generic struct no_keys init ( fix #17061 ) ( #17067 )
2023-01-22 19:11:12 +02:00
Thomas Peißl
3aeb6179b7
os: rework mv so it works with different partitions (add fallback to os.mv_by_cp + tests) ( #17065 )
2023-01-22 19:02:04 +02:00
yuyi
a929466130
checker: minor cleanup in infer_fn_generic_types() ( #17068 )
2023-01-22 15:02:08 +02:00
yuyi
b2dac566b0
checker: check fn call using 'none' as argument ( #17070 )
2023-01-22 14:58:34 +02:00
Wenqi Chen
ddf3909fed
docs: improve the README for examples/call_v_from_c/ with instructions for macos ( #17060 )
2023-01-22 13:25:09 +02:00
Delyan Angelov
f69b994c73
os: properly document os.uname, for both nix and windows
2023-01-22 13:18:28 +02:00
Roy Ivy III
dd55365dee
os: cleanup the output of os.uname() on windows ( #17066 )
...
* os: (WinOS) mimic current practices of `busybox` and `coreutils`
* os: trim any possible surounding whitespace
2023-01-22 11:59:42 +02:00
Delyan Angelov
0bafd237ee
ast: fix const dependency order for consts initialised with ast.SelectorExpr ( fix #15049 ) ( #17064 )
2023-01-22 09:34:46 +02:00
Hitalo Souza
0ac6ba9354
json2: encode sumtype ( #17041 )
2023-01-21 20:26:55 +02:00
Hitalo Souza
1d51f3109f
json2: improve the performance of encode ~2x ( #17050 )
2023-01-21 10:45:38 +02:00
yuyi
630fb2af37
cgen: fix generic struct no_key init ( #17059 )
2023-01-21 10:42:15 +02:00
Hitalo Souza
1c6195c1b6
bench: jump to the top level functions in bench_json_vs_json2.v ( #17054 )
2023-01-21 10:40:12 +02:00
Hitalo Souza
9a43fa9668
bench: add more benches of json vs x.json2, separated by type ( #17043 )
2023-01-20 19:11:50 +02:00
yuyi
222eb86e6e
tests: correct the test comment in generic_fn_with_alias_arg.vv ( #17048 )
2023-01-20 18:53:42 +02:00
Delyan Angelov
46e4317643
benchmark: adjust the documentation for Benchmark.measure
2023-01-20 17:22:49 +02:00
MatejMagat305
d2bde39347
v.cflags: use strings.Builder instead of concatenation for constructing flags ( #17049 )
2023-01-20 16:20:36 +02:00
Nahua
90dbf683d5
term: add missing documentation for all remaining public functions ( #17044 )
2023-01-20 11:07:28 +02:00
MatejMagat305
25f1b713aa
crypto.pem: add Block.free() method ( #17045 )
2023-01-20 10:49:45 +02:00
phoebe
fed6524803
vlib: add a crypto.pem module ( #17034 )
2023-01-19 17:01:11 +02:00
Thomas Peißl
ba1b31700e
os: add hint for mv_by_cp to mv ( #17036 )
2023-01-19 16:50:57 +02:00
John
4098612a87
rand: add full precision f32 and f64 random functions; fix f32/f64 multipliers ( #16875 )
2023-01-19 15:21:47 +02:00
Delyan Angelov
550cae931f
bench: add bench_random_number_generation.v
2023-01-19 15:19:29 +02:00
Delyan Angelov
12f9e922bc
ci: rename all github actions workflow files, that are related to CI (run on commits/PRs), to have a _ci.yml postfix
2023-01-19 14:38:33 +02:00
Delyan Angelov
c7a829e74f
ci: split windows/linux/macos jobs from the single ci.yml to 3 separate .yml files
...
This split is needed, so failing jobs on macos/windows, could be restarted
independently from each other more easily, through the web interface on github.
2023-01-19 14:32:55 +02:00
Delyan Angelov
92c7e3f7ff
checker: relax checks on operators done on aliases of primitives like int, u8, string etc.; add tests ( #17029 )
2023-01-19 11:45:56 +02:00
Delyan Angelov
269833b72c
tools: move cmd/tools/vcreate.v and its test, to its own folder cmd/tools/vcreate/ (part 1)
2023-01-19 09:54:08 +02:00
Delyan Angelov
bee355eb65
all: cleanup sqlite.connect statements (do not leave strange test.db or vweb.sql artefacts around, after running common tests)
2023-01-19 09:45:07 +02:00
Minsoo
36834be2ad
all: fix the remaining deprecated import sqlite statements ( #17021 )
2023-01-19 09:37:55 +02:00
Nahua
b69f9419f0
term: add missing documentation for all public functions in colors.v ( #17033 )
2023-01-19 09:09:09 +02:00
Minsoo
d850d3caba
net.html: add get_tags_by_class_name ( #17024 )
2023-01-18 19:00:46 +02:00
yuyi
6688c0f3d7
checker: fix generic fn infering error with alias argument ( #17026 )
2023-01-18 18:59:02 +02:00
Hitalo Souza
525c5e237a
x.json2: add json2.map_from(t T) ( #16797 )
2023-01-18 18:55:04 +02:00
Delyan Angelov
2c78078814
cleanup: fix old usages of os.write_file/2? to os.write_file/2!
2023-01-18 12:28:10 +02:00
yuyi
6a9688ce9d
checker, cgen: fix for mut i in arr { i = i * i } ( #17020 )
2023-01-18 09:22:38 +02:00
Delyan Angelov
1cad788779
checker: add error for type Alias = map[string]Alias ( fix #17008 ) ( #17015 )
2023-01-18 01:34:43 +02:00
yuyi
88dab8fc2d
all: clean up multiple 'is' infix expr ( #17005 )
2023-01-17 20:27:09 +02:00
walking devel
2fb9bdce9a
cgen, checker: add panic in ORM for invalid queries, when there are no or {} blocks, add type checking for the fkey attribute, add tests ( #16977 )
2023-01-17 20:21:10 +02:00
Nahua
93ee6d107a
encoding.base32: add missing documentation for all public functions ( #16998 )
2023-01-17 19:46:43 +02:00
Felipe Pena
5dbdb211dc
cgen: fix assignment from comptime var ( #16999 )
2023-01-17 19:39:19 +02:00
yuyi
a22dfe0ddf
cgen: minor cleanup in dump_expr() ( #17006 )
2023-01-17 17:11:04 +02:00
Delyan Angelov
75d6cb9c3a
checker: protect against unlimited recursion in Checker.ensure_generic_type_specify_type_names
2023-01-17 13:07:27 +02:00
yuyi
2034dcb4ed
ast: fix const values defined in the wrong order ( #17002 )
2023-01-17 12:12:54 +02:00
yuyi
930e629d2e
cgen: fix struct init with chan field ( #17001 )
2023-01-17 05:50:11 +01:00
Felipe Pena
1302dbf02f
checker: fix for..in statement with ComptimeSelector ( #16997 )
2023-01-17 05:49:45 +01:00
yuyi
f57b16a843
all: clean up multiple !is infix expr ( #16993 )
2023-01-17 05:48:44 +01:00
Felipe Pena
f634c6e0a4
checker: fix postfix var checking break ( #16984 )
2023-01-17 05:47:51 +01:00
yuyi
21807f94a2
checker: check unsafe map index operation ( #17000 )
2023-01-17 05:47:16 +01:00
MatejMagat305
6bf6a40e0c
crypto: add .free() and .reset() methods to reduce memory leaks with -autofree ( #16992 )
...
* Fix unsafe pointer
I was compile vab with '-prod' and it was needed to fix and it is of course warning
* Add files via upload
* reduce memory leak s sha512
* add method .free() and .reset() for some
2023-01-16 17:30:40 +02:00
MatejMagat305
92fd12c18a
crypto.sha256: add .free() and .reset() methods to reduce memory leaks with -autofree ( #16991 )
2023-01-16 13:23:46 +02:00
yuyi
e5fb457b19
checker: fix map with reference value ( #16990 )
2023-01-16 11:45:22 +02:00
Hitalo Souza
55787ff78f
json2: refactor, doc, perf, test, errors ( #16986 )
2023-01-15 22:52:48 +01:00
Alexander Medvednikov
7a9a82879b
checker: use a notice for now
2023-01-15 22:38:31 +01:00
Alexander Medvednikov
aba7bcde85
checker: turn the pointer map notice into a warning and fix all code using it
2023-01-15 22:19:25 +01:00
Swastik Baranwal
e8108f21e0
checker: check option and result handling in type-casted aliases ( #16988 )
2023-01-15 23:09:30 +02:00
Nahua
5f30110e2c
hash: document all public functions ( #16987 )
2023-01-15 22:37:09 +02:00
Hitalo Souza
7db7951bd0
x.json2: fix : #16975 ( #16983 )
...
* fix : #16975
* test
* Update vlib/x/json2/json2.v
Co-authored-by: Delyan Angelov <delian66@gmail.com >
* minor refactor
Co-authored-by: Delyan Angelov <delian66@gmail.com >
2023-01-15 22:09:02 +02:00
Delyan Angelov
bfb47005c8
net.openssl, net.mbedtls: add support for -d trace_ssl, for easier tracing of binary protocol problems to https servers
2023-01-15 16:06:46 +02:00
Delyan Angelov
7f3531077d
examples: improve the output of the websocket examples
2023-01-15 14:54:51 +02:00
Delyan Angelov
634f596d27
git: remove cruft
2023-01-15 13:54:26 +02:00
Delyan Angelov
d4320863fe
net: fix compilation with -d trace_tcp_data_write and -d trace_tcp_data_read; add .hex() dumping too for easier diagnosing of binary protocol level problems
2023-01-15 13:25:23 +02:00
Hitalo Souza
28cbaf66b8
json2: refactoring and fixes ( #16893 )
2023-01-15 12:30:33 +02:00
Felipe Pena
4d2c767dcb
checker: fix for $if field.unaliased_typ is $Int { ( #16982 )
2023-01-15 12:27:08 +02:00
Delyan Angelov
e8e1df6df9
tests: make VTEST_ONLY=panic ./v vlib/v/slow_tests/inout/compiler_test.v more useful as a filter
2023-01-15 11:38:37 +02:00
Delyan Angelov
2b4c60d07f
tests: sort the .vv files in vlib/v/slow_tests/inout/compiler_test.v, before testing them, to have more predictable output
2023-01-15 11:34:10 +02:00
Alexander Medvednikov
877a1e511a
checker: require unsafe for accessing a pointer map value
2023-01-15 02:47:13 +01:00
Hitalo Souza
b25c9e8bbf
examples: minor change after #16948 ( #16965 )
2023-01-15 02:39:51 +01:00
yuyi
7fd9b62b34
parser: fix type alias of fn with mut argument ( #16974 )
2023-01-14 21:38:46 +02:00
Hitalo Souza
199db81b23
json2: refactor after #16951 ( #16976 )
2023-01-14 21:30:29 +02:00
Felipe Pena
dbfb9c3a90
cgen, checker: var type checking at compile-time ( #16951 )
2023-01-14 16:20:12 +02:00
Delyan Angelov
b19db3a207
ci,term: add a term.set_tab_title/1 shim for windows too (for now just calling term.set_terminal_title/1)
2023-01-14 15:10:12 +02:00
Felipe Pena
71e8fc8b38
checker: fix comptime if branch checking ( #16938 )
2023-01-14 15:06:38 +02:00
Felipe Pena
80cd9f820a
checker,cgen: allow ?.str() on compile-time fields var ( #16969 )
2023-01-14 15:04:13 +02:00
Delyan Angelov
6adafbb6ea
term: add a separate term.set_tab_title/1 API for controling the current tab title in emulators like Konsole, that support many tabs
2023-01-14 12:00:39 +02:00
l-m
ca000292f1
cgen,js: support [autostr: allowrecurse] attribute, for allowing deep printing of data structures with pointer fields (trees, instead of graphs with cycles) ( #16973 )
2023-01-14 11:30:39 +02:00
Delyan Angelov
7e05545a62
ci: v install pcre too, since it is now needed for gitly
2023-01-14 11:22:25 +02:00
Delyan Angelov
7c571c0945
term: fix set_terminal_title on nix
2023-01-14 11:08:49 +02:00
yuyi
fd07f7df69
cgen: fix printing struct having fields of arrays of anonymous structs ( #16953 )
2023-01-14 00:41:31 +02:00
Felipe Pena
41b9e513ca
parser: add a better error message, for multiple attributes, used on the same struct field ( #16954 )
2023-01-13 23:27:46 +02:00
Ahmad Yasser
3832f076c5
docs: fix all db.pg docs being italic in html format ( #16971 )
2023-01-13 23:25:24 +02:00
Swastik Baranwal
89aa695fba
checker: disallow non ptr struct values to voidptr fields ( #16958 )
2023-01-13 17:05:18 +02:00
yuyi
64558df764
vlib: move the mysql/sqlite/pg/mssql modules under vlib/db ( #16820 )
2023-01-13 17:02:32 +02:00
walking devel
2d8f160ef1
checker: replace the go keyword in error messages with spawn ( #16960 )
2023-01-13 13:23:51 +02:00
zakuro
c766ce4fe5
fmt: fix removal of selective imported types, used as array elements ( #16963 )
2023-01-13 09:30:28 +02:00
Felipe Pena
ba091a36dd
checker: fix unreachable code checking for sql ORM blocks ( #16948 )
2023-01-12 15:36:44 +02:00
Delyan Angelov
33191e4538
ci,pg,net.openssl: fix pkgconfig paths for macos-12
2023-01-12 15:22:08 +02:00
yuyi
148d57827c
parser, fmt: fix fmt in struct declarations with a fields, declared to be arrays of anonymous structs ( fix #16947 ) ( #16952 )
2023-01-12 13:21:29 +02:00
Delyan Angelov
9e78724a41
ci: use brew install libpq for installing the postgresql development libraries on macos
2023-01-12 11:54:55 +02:00
Alexander Medvednikov
22666f4f73
ci: build vpm on macos
2023-01-12 09:54:52 +03:00
yuyi
329b9f1a6a
parser, fmt: fix fmt error in $tmpl(path) ( #16949 )
2023-01-12 06:03:38 +01:00
Delyan Angelov
49a434e11f
pg: fix compilation on macs with clang (libpq installed through brew)
2023-01-12 02:21:32 +02:00
Delyan Angelov
131086b647
ci: workaround for $if prod { not working properly with msvc
2023-01-12 00:02:27 +02:00
Delyan Angelov
00cef70220
ci: fix -prod compilation of sokol apps
2023-01-11 22:37:41 +02:00
Delyan Angelov
60f4654bbe
tools: make fast.v log all executed commands
2023-01-11 21:05:45 +02:00
Delyan Angelov
d9339b09d6
sokol.memory: fix message logs on Android
2023-01-11 16:37:20 +02:00
yuyi
3f8aa77990
parser: fix tmpl using variable or const path argument ( fix #16941 ) ( #16943 )
2023-01-11 13:31:48 +02:00
walking devel
3e9b06031c
doc: fix v wrapper command mention ( #16944 )
2023-01-11 13:31:00 +02:00
Swastik Baranwal
b872487d82
cgen: allow ORM to work with DB aliases (#16939 )
2023-01-11 11:58:55 +02:00
Delyan Angelov
e854051c1f
thirdparty: update all sokol and fontstash headers with their upstream versions ( #16940 )
2023-01-11 11:29:38 +02:00
Hitalo Souza
d1306ffcf5
checker,json2: relax checking of x.enum = integer at comptime; refactor json2 to clean it up ( #16926 )
2023-01-11 10:18:45 +02:00
Felipe Pena
09f48455c5
checker,cgen: allow method.name checking in comptime ( #16931 )
2023-01-10 19:45:06 +02:00
Hitalo Souza
cf95d77584
json2: small refactor after #16896 ( #16911 )
2023-01-10 11:08:11 +02:00
Hitalo Souza
8a986b994e
tools: fix v new abc ( #16933 )
2023-01-10 09:36:21 +02:00
Delyan Angelov
1582db1a0a
comptime: add support for T is $Alias and T is $Function ( #16929 )
2023-01-10 08:49:04 +02:00
Delyan Angelov
6a32c81070
tests: extract slow tests (prod, valgrind, inout, repl etc), from vlib/v/tests/ to vlib/v/slow_tests/ ( #16892 )
2023-01-09 23:47:03 +02:00
Hitalo Souza
33a99fe833
json2: fix encoding of struct fields that are aliases ( #16925 )
2023-01-09 22:43:01 +02:00
Yochem van Rosmalen
0109fe66a6
os: make os.FileMode public ( #16923 )
2023-01-09 22:34:36 +02:00
Felipe Pena
51907618c3
cgen: fix code generated for a match expression, which returns function ( #16922 )
2023-01-09 22:30:35 +02:00
Swastik Baranwal
413a8b5f87
comptime: implement field.is_enum ( #16920 )
2023-01-09 20:12:07 +02:00
yuyi
c2eb4d7065
cgen: fix result or option of multi return ( fix #16873 ) ( #16915 )
2023-01-09 16:20:15 +02:00
yuyi
286350aa9b
cgen: fix json encoding of structs with option fields (skip the fields with a value of none) ( #16916 )
2023-01-09 15:33:08 +02:00
Hitalo Souza
2ec6e2b209
tools: fix v new <name> web ( #16738 )
2023-01-09 09:37:46 +03:00
Wertzui123
956b9f650c
doc: improve the "Getting started" section ( #16910 )
2023-01-09 09:37:17 +03:00
JalonSolov
90941b3b1f
all: change optional to option ( #16914 )
2023-01-09 09:36:45 +03:00
yuyi
241109516f
checker, cgen: fix aliased optional or result fn call ( #16908 )
2023-01-08 20:04:17 +02:00
Hitalo Souza
ed0500dcfd
docs: add a section about the 3 forms of v init commands at the start ( #16905 )
2023-01-08 18:34:58 +02:00
Hitalo Souza
fed8b49e46
vweb: add the v new <name> web command for starting new projects to the README.md ( #16904 )
2023-01-08 18:33:17 +02:00
Felipe Pena
1b78f430ab
checker, cgen: support $if T in [$Array, $Struct[operator for comptime type checking ( #16896 )
2023-01-08 18:22:10 +02:00
Delyan Angelov
942130ff6e
ci: make the v gret steps more robust to slow CI runners
2023-01-08 14:56:22 +02:00
MatejMagat305
a99149334c
sync.pool: fix pointer cast warning ( #16902 )
2023-01-08 12:34:46 +02:00
Felipe Pena
a60f34e6dd
cgen: fix array_init generated code for reference var ( #16894 )
2023-01-07 12:04:04 +02:00
Swastik Baranwal
2aced13942
checker: disallow all operations beside assignment, on multi return values ( #16890 )
2023-01-07 11:53:20 +02:00
Felipe Pena
7fa7fec304
cgen: minor refactor - reduce repeated code ( #16886 )
2023-01-07 11:49:57 +02:00
Delyan Angelov
de2ed7497a
ci: update struct_init_with_interface_pointer_and_embed_test.v to match 2119a24
2023-01-06 15:01:33 +02:00
Delyan Angelov
725456cde0
ci: fix warnings in v -cc gcc -keepc -freestanding -o bel vlib/os/bare/bare_example_linux.v
2023-01-06 14:55:01 +02:00
Delyan Angelov
2119a240e8
checker: follow up to 43d8bc3, separate setting the default type for fields with default expressions into its own independent loop
2023-01-06 14:47:57 +02:00
Felipe Pena
3b594d6cd8
checker, cgen: allow iterating over optional array fields ( #16858 )
2023-01-06 09:33:11 +03:00
Alexander Medvednikov
868908b80d
checker: require unsafe for Struct(voidptr) casts
2023-01-06 09:28:11 +03:00
Hitalo Souza
0146509516
examples: fullstack vweb example ( #16761 )
2023-01-06 04:36:42 +03:00
Delyan Angelov
43d8bc30f9
checker: fix unset type of a pointer field with default value, when a struct contains an embed ( fix #16882 ) ( #16883 )
2023-01-05 19:53:37 +02:00
Delyan Angelov
c1a9f42b05
ci: add vlib/v/tests/orm_sub_array_struct_test.v to the skip list for the tests-sanitize-undefined-gcc job
2023-01-05 19:51:44 +02:00
Swastik Baranwal
da68b2d369
checker: remove c.pref.is_test exception for calling private methods in _other_ modules ( #16872 )
2023-01-05 15:41:18 +02:00
Hitalo Souza
3598e7d08e
orm: add tests for fkey: relationship attribute and retrival of joined rows ( #16877 )
2023-01-05 15:20:15 +02:00
Hitalo Souza
8f217c00e5
x.json2: refactor/fix json2.encode, add more tests ( #16790 )
2023-01-05 15:17:38 +02:00
Felipe Pena
e3aee748ac
cgen: fix code generated for optional comptime var ( #16854 )
2023-01-05 10:54:51 +02:00
Delyan Angelov
19c9633896
builder: show a hint about v ., on unknown errors, suggesting that the user tried to compile a single .v file from a multi file project ( #16878 )
2023-01-05 07:45:23 +02:00
Delyan Angelov
66438391d0
v.token,v.parser: use p.tok.kind.precedence(), instead of p.tok.precedence(), since token.Token struct values, are much larger, than just the token.Kind enum values
2023-01-04 17:50:51 +02:00
Delyan Angelov
f9e8a91cd0
v: move cmd/v/help/ to vlib/v/help, to simplify the interaction between module lookup & v recompilation ( #16867 )
2023-01-04 14:01:05 +02:00
yuyi
b8571c964d
cgen: fix json encode struct with optional field ( #16866 )
2023-01-04 12:41:07 +02:00
yuyi
0a6fc6d280
checker: fix generic stack of sumtype push() ( #16855 )
2023-01-03 18:29:29 +02:00
yuyi
2378b71f22
cgen: fix comptime if expr with optional or result call ( #16853 )
2023-01-03 14:38:08 +02:00
Swastik Baranwal
09766c44b6
checker: disallow struct{...val.$(field.name)} ( #16852 )
2023-01-03 10:21:32 +02:00
Hitalo Souza
2e54a8cb0e
x.json2: update tests ( #16847 )
2023-01-03 10:16:36 +02:00
Felipe Pena
bd2b216ac7
cgen,checker: fix method call with comptime var ( #16844 )
2023-01-03 10:14:23 +02:00
JalonSolov
395ee2b464
readme: add back align=center to make github happy ( #16850 )
2023-01-03 10:12:08 +02:00
Ikko Ashimine
24189e02b5
tools: fix typo in vcomplete.v ( #16851 )
2023-01-03 10:11:06 +02:00
Delyan Angelov
3625a74ec5
os: add test for os.open_append ( #16846 )
...
* os: add test for os.open_append
* fix unclosed file in test_eof (it made os.open_append fail only on windows, since it got the previous file content, because the file was locked, and os.rm could not delete it)
2023-01-03 01:11:35 +02:00
Keito Tobichi
d5b9f7d026
io: fix typos ( fix #16839 ) ( #16840 )
2023-01-02 20:20:52 +02:00
Felipe Pena
b0d39814be
cgen, checker: fix conditional evaluation and code generation for $if/$else $if/$else for known true conditions ( #16823 )
2023-01-02 20:14:12 +02:00
Delyan Angelov
9bee702c62
readme: final update for the instructions for NixOS
2023-01-02 19:39:18 +02:00
Delyan Angelov
d91cf511ca
readme: update the instructions for NixOS with the correct ones
2023-01-02 19:35:10 +02:00
Delyan Angelov
c21949456e
readme: add instructions for installing the libraries needed for the graphics examples on NixOS
2023-01-02 19:30:01 +02:00
yuyi
f71572a50f
parser: fix array of functions direct call ( #16838 )
2023-01-02 14:12:07 +02:00
yuyi
9d49b69b69
ast: fix inferring generic struct ( fix #16830 ) ( #16831 )
2023-01-01 17:36:18 +02:00
yuyi
51bb630ea4
checker: fix generic fn with short generic struct init syntax ( #16828 )
2023-01-01 09:14:55 +02:00
JalonSolov
aaf3e25c3f
websocket: simplify and better handle handshake ( #16829 )
2023-01-01 09:04:09 +02:00
Delyan Angelov
d3a196977f
thirdparty: update stb_image.h to its latest version v2.27 ( #16825 )
2022-12-31 21:25:31 +02:00
Delyan Angelov
3364bf8600
cgen: add g.push_existing_comptime_values and g.pop_existing_comptime_values, use them inside Gen.comptime_for ( #16821 )
2022-12-31 18:29:19 +02:00
yuyi
1c151fbec9
cgen: fix struct optional field zero init ( #16814 )
2022-12-31 17:36:14 +02:00
Makhnev Petr
04cb6ae65f
tests: improve Teamcity test runner ( #16817 )
2022-12-31 17:26:18 +02:00
mfont
1e401d1433
bcrypt: fix issue #16769 security problem in compare_hash_and_password ( #16815 )
2022-12-31 17:18:43 +02:00
Felipe Pena
5daf39bc6a
cgen: fix typeof with comptime var ( #16816 )
2022-12-31 15:57:55 +02:00
yuyi
15c9153f1d
cgen: fix fixed array literal range index ( #16812 )
2022-12-30 13:59:54 +02:00
Felipe Pena
c10bc09e83
checker, cgen: allow $for in alias type ( #16810 )
2022-12-30 11:27:01 +02:00
Felipe Pena
f4cd3931fb
cgen: fix dump fn name using generic var ( #16805 )
2022-12-30 11:16:59 +02:00
Swastik Baranwal
828cd4fe79
checker: add check for implicit fixed array decomp in function varargs ( #16806 )
2022-12-30 01:06:41 +02:00
Felipe Pena
c7f1db2b8a
cgen: cleanup uneeded C code, when using selectorexpr on $if ( #16802 )
2022-12-29 20:30:42 +02:00
Delyan Angelov
6229f48830
checker,cgen: implement support for the new FieldData.is_alias field (part 2, follow up to a6bf20f)
2022-12-29 19:14:13 +02:00
yuyi
6a8b6c010c
repl: minor cleanup in runner.v ( #16804 )
2022-12-29 17:55:57 +02:00
yuyi
36ab78d6da
parser, cgen: fix anon fn optional call in if expr ( #16803 )
2022-12-29 17:53:17 +02:00
Delyan Angelov
cd4ea16609
cgen: add more detailed cgen stage timing info on -show-timings
2022-12-29 17:33:40 +02:00
Delyan Angelov
a6bf20f3be
builtin: add .is_alias to FieldData too (part 1, unimplemented yet)
2022-12-29 12:43:55 +02:00
yuyi
f4b110b1a4
vrepl: fix $tmpl('hello.txt') ( fix #16789 ) ( #16793 )
2022-12-29 11:30:25 +02:00
Felipe Pena
ed06618498
cgen: fix generic func arg type when passing array compile-time field ( #16798 )
2022-12-29 11:23:57 +02:00
Felipe Pena
2ebd3f0cdb
checker,cgen: make boolean field.is_<field> accessible at compile-time as well ( #16796 )
2022-12-29 00:19:47 +02:00
Swastik Baranwal
ad9ca349dc
cgen: fix generics array delete ( #16794 )
2022-12-29 00:15:47 +02:00
Delyan Angelov
4718a818b8
vfmt: fix alignment of value formatting for "x := {.: 1, ♖: 2}"
2022-12-28 18:06:32 +02:00
Delyan Angelov
1709d175bb
tools/fast: make the header a link to /, to ease navigation
2022-12-28 13:51:26 +02:00
Delyan Angelov
101aa4aeb0
tools/fast: add navigation links to older stat pages
2022-12-28 13:35:30 +02:00
Felipe Pena
0f37ff197b
checker: fix fn call with generic []T arg ( #16781 )
2022-12-28 11:05:11 +02:00
yuyi
b171102b03
os: minor optimization in os.v ( #16791 )
2022-12-28 10:28:47 +02:00
yuyi
b9996619d5
cgen: fix result/option breaks execution order in if statements ( fix #16663 ) ( #16778 )
2022-12-28 10:26:39 +02:00
Delyan Angelov
afdb09708e
ci: comment out the -autofree compilation for gitly for now
2022-12-27 20:51:45 +02:00
Larpon
161595b041
examples: use math.vec in examples/sokol/particles ( #16780 )
2022-12-27 15:19:08 +02:00
Felipe Pena
c5c7b3a054
checker: fix comptime var param passing with comptime selector ( #16777 )
2022-12-27 15:14:58 +02:00
Delyan Angelov
a8f6f9ed60
checker: more precise error handling of large binary literals like 0b1000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000 ( #16775 )
2022-12-27 15:13:15 +02:00
Delyan Angelov
508bfbf892
time: do not panic for time.parse("2020-02-02 20.02.20")!, just return an error instead ( fix #16779 )
2022-12-27 13:01:01 +02:00
Delyan Angelov
6b3f8f519d
cgen: fill in the new FieldData fields, add tests ( #16774 )
2022-12-26 23:35:13 +02:00
Felipe Pena
9b28a7aa96
checker,cgen: fix comptime value recognition on generic arguments ( #16768 )
2022-12-26 18:44:18 +02:00
yuyi
3a1e7b71ea
cgen: fix array filter with an inline closure ( fix #16770 ) ( #16772 )
2022-12-26 16:14:28 +02:00
Delyan Angelov
3d545ee0cd
builtin: add more fields to FieldData (will be implemented later in a PR, to ease bootstrapping)
2022-12-26 16:05:14 +02:00
Delyan Angelov
94a36c5ca4
tests: remove module main from tests, that do not need to be internal
2022-12-26 15:31:23 +02:00
Delyan Angelov
728b4cffc3
ci: reorder v_apps_and_modules_compile.yml so that quick checks are done first
2022-12-26 12:56:36 +02:00
yuyi
68883fc4d9
os: fix os.file_ext('/tmp/.gitignore') previously returning '.gitignore' => it now returns '' ( #16771 )
2022-12-26 12:53:38 +02:00
yuyi
64ed007f94
cgen: fix generic struct init with inconsistent generic optional types ( #16766 )
2022-12-25 12:06:13 +02:00
yuyi
21d6bd930e
ast, cgen: fix printing nested generic struct ( #16758 )
2022-12-25 09:57:16 +02:00
Brian Callahan
85b4af5440
make: add OpenBSD detection to GNUmakefile ( #16760 )
2022-12-25 09:55:41 +02:00
Delyan Angelov
776fbdfb23
readme: cleanup the additional graphics libraries installation instructions
2022-12-24 11:59:30 +02:00
Delyan Angelov
d55715884a
readme: add instructions for installing the libraries needed for the graphics examples on Fedora
2022-12-24 11:55:06 +02:00
Felipe Pena
6a179a2926
checker: add int signedness mismatch checking for function call arguments ( #16750 )
2022-12-24 06:28:35 +02:00
yuyi
0128d2dd1c
ast, parser: fix wrong type name of nested generics ( #16749 )
2022-12-24 06:19:51 +02:00
Felipe Pena
e9cad6f09d
ci: fix v-apps-compile job for AdventOfCode, by adding v install regex too ( #16752 )
...
Missing pcre dependency
2022-12-24 06:14:48 +02:00
Charles WANG
9dbc2afc5b
net.html: fix typo in README.MD ( #16747 )
2022-12-23 09:37:08 +02:00
Felipe Pena
b21e5b71ba
cgen: fix call arg type changing on match expr ( #16744 )
2022-12-23 01:58:52 +02:00
Delyan Angelov
fc5826b7ca
cgen: minimise sizeof(EmptyStruct) to 0 for gcc/clang and to 1 for tcc/msvc, by changing EMPTY_STRUCT_DECLARATION and EMPTY_STRUCT_INITIALIZATION ( #16733 )
2022-12-22 21:47:39 +02:00
yuyi
e01dac885c
builtin: fix m.len to 0, after calling map.clear() ( #16720 )
2022-12-22 21:36:33 +02:00
Delyan Angelov
f9043c84a7
builtin: optimise the initialisation of the common 1 byte element arrays []u8
2022-12-22 20:41:32 +02:00
Delyan Angelov
8f8a186158
builtin: support -d trace_vmemset, -d trace_vmemcmp, -d trace_vmemmove and -d trace_vmemcpy too
2022-12-22 20:08:53 +02:00
Delyan Angelov
b67705f568
builtin: move the -d trace_*alloc lines at the start of their corresponding functions, implement -d trace_memdup too
2022-12-22 19:36:15 +02:00
Delyan Angelov
3da4f37b01
cgen: improve generated source compatibility with latest Alpine (lacking libexecinfo-dev and execinfo.h) and the prebuilt tcc ( #16743 )
2022-12-22 15:01:51 +02:00
yuyi
e519bdf0eb
checker: check generic method receiver type mismatch ( #16739 )
2022-12-22 13:37:46 +02:00
yuyi
82a3551313
checker, cgen: fix match expr with branch returning ( #16741 )
2022-12-22 12:55:44 +02:00
Swastik Baranwal
3c5cfa22d1
parser: disallow the array init: attr, when the len: attr is not provided ( #16735 )
2022-12-21 21:24:16 +02:00
Delyan Angelov
87f8069728
ci: fix warnings for compiling builder_test.v too
2022-12-21 21:14:21 +02:00
Delyan Angelov
46ced75184
ci: fix v test-self failures related to cmd/tools/vcreate_test.v
2022-12-21 21:13:06 +02:00
Delyan Angelov
68501677e3
ci: fix gg-regressions failure
2022-12-21 21:03:47 +02:00
Alexander Medvednikov
88e33a83de
gg: fix draw_image on macos native; vcreate: vweb template
2022-12-21 19:33:37 +03:00
yuyi
ccbb8ab0ca
ast, parser: fix generic struct init with nested generic struct ( #16736 )
2022-12-21 18:32:54 +02:00
Delyan Angelov
1cde55478d
cgen: fix cgen errors for overloaded operators using reference types for the receiver and operand ( fix #16725 ) ( fix #15859 ) ( #16726 )
2022-12-21 09:10:30 +02:00
Swastik Baranwal
d19c1ef087
vpm: fix the direct installation of github repositories via the --git flag ( #16724 )
2022-12-20 17:38:08 +02:00
Felipe Pena
2f9becc98d
cgen: fix debug generated code with -g, while fixing #16690 ( #16723 )
2022-12-20 16:41:42 +02:00
Delyan Angelov
3c920f2ee6
x.json: fix parsing of time fields, that have just a single date encoded inside the parsed string ( fix #16722 )
2022-12-20 16:34:09 +02:00
pancake
c84eb29b78
js: use write() on the freestanding backend ( #16704 )
2022-12-20 13:16:06 +02:00
Makhnev Petr
11521a70e4
readme: add modules badge and fix twitter url/badge inconsistency with others ( #16716 )
2022-12-20 10:56:10 +03:00
John
eb8e8b8642
rand: add Blackman/Vigna xoroshiro128++ PRNG ( #16712 )
2022-12-20 10:53:30 +03:00
Felipe Pena
0fe7ae3a60
cgen: remove repeated code ( #16718 )
2022-12-20 10:52:37 +03:00
Larpon
7e4dc24f1b
math: add math.vec module with generic 2D, 3D and 4D vector operations ( #16710 )
2022-12-19 18:10:48 +02:00
yuyi
2090e4a12f
ast, cgen: optimize generic struct with inconsistent generic types ( #16708 )
2022-12-19 15:02:27 +02:00
Delyan Angelov
bcdf1b95c1
docs: add a note about test files being compiled as separate V programs, independently from normal code
2022-12-19 13:15:39 +02:00
Delyan Angelov
353fdb4ca0
ci: workaround for v vet failing for v clean-code over the new v bench script (using \ in its path on windows).
2022-12-19 12:31:16 +02:00
Swastik Baranwal
8873127687
v doc: properly highlight the new generics syntax [] in the CLI results of v doc arrays etc ( #16703 )
2022-12-19 12:12:46 +02:00
Delyan Angelov
cbd34cd6e7
bench: add bench_string_key_in_map_vs_string_value_in_array.v
2022-12-19 11:56:00 +02:00
yuyi
aad95ac818
cgen: fix generic struct init with inconsistent generic types ( fix #16677 ) ( #16702 )
2022-12-19 10:43:27 +02:00
Felipe Pena
04936b00c5
cgen: fix struct selector with or block ( #16695 )
2022-12-18 14:22:06 +02:00
Delyan Angelov
de5ae63401
parser: improve precision of struct field type positions in errors
2022-12-18 13:34:39 +02:00
Swastik Baranwal
5b4a16e864
checker: add err for unknown generic struct field ( #16698 )
2022-12-18 11:46:37 +02:00
JalonSolov
20aaf4de09
README: replace deprecated align attribute, correct tcc info in C compiler section, fix some grammar and spacing issues ( #16699 )
2022-12-18 11:44:23 +02:00
yuyi
ba07e48691
ast, checker: fix checking generic struct type mismatch ( #16701 )
2022-12-18 10:29:44 +02:00
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
14cc43b0f6
v ast: add forgotten fields since 2022/06/01
2022-12-15 21:18:54 +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
Delyan Angelov
3fa23b789c
ci: add new dependencies for VSL (hdf5 libs and tools)
2022-12-15 08:37:10 +02:00
JalonSolov
5b008fca41
make.bat: fix path backslashes to forward slashes for more compatibility, change quoting to be more consistent ( #16678 )
2022-12-14 22:48:34 +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
34f5255bb5
ci: fix a failing test for v test .github/workflows
2022-12-14 17:02:01 +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
7f23ae595b
ci: add a separate download_vc target to Makefile for FreeBSD
2022-12-14 14:05:10 +02:00
Delyan Angelov
93a1cd5aab
freebsd: update Makefile to use --filter=blob:none for vc/
2022-12-14 13:25:40 +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
JalonSolov
3ea9e3aba9
github: make Environment field in feature request match bug report ( #16645 )
2022-12-11 09:06:37 +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
JalonSolov
44a539f186
github: change bug template Envionment field to textarea ( #16641 )
2022-12-10 18:39:22 +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
Keito Tobichi
7c4f45a375
docs: change <> to [] in docs.md part2 ( #16633 )
2022-12-10 11:36:59 +02:00
Keito Tobichi
ad5290677c
docs: change <> to [] in docs.md ( #16632 )
2022-12-10 10:47:03 +02: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
Delyan Angelov
d62fc777c9
ci: add a 'Build AdventOfCode' step in the v-apps-compile job
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
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
yuyi
4eb81d2f05
checker: improve error messages of missing generic type names ( #16610 )
2022-12-07 11:29:18 +02:00
Delyan Angelov
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
Swastik Baranwal
bb705c01d2
parser: add proper error msg for := used in const decl ( #16607 )
2022-12-06 22:44:33 +03:00
yuyi
921416d821
parser: fix parsing generic types using '[]' in anon fn decl ( #16605 )
2022-12-06 18:15:59 +02:00
Felipe Pena
cf015e5073
checker: add clearer errors for break/continue used within a $for loop ( #16600 )
2022-12-06 17:27:59 +02:00
Swastik Baranwal
ada8643ac5
checker: disallow using builtin type names for const names ( #16599 )
2022-12-06 15:44:25 +02:00
Larpon
5fc7b6d3d6
tools: add tests for vcomplete ( #16587 )
2022-12-06 13:02:32 +02:00
yuyi
e35f5f290e
cgen: fix string of map with generic struct value ( #16595 )
2022-12-06 12:38:05 +02:00
yuyi
a96e2e7093
parser: fix parsing embedded generic interface using '[]' ( #16603 )
2022-12-06 12:37:36 +02:00
yuyi
46bb62955b
cgen: fix generic array init with fields ( #16601 )
2022-12-06 09:33:26 +02:00
Felipe Pena
edfaa76b3e
checker: fix panic caused by compile-time code within or block ( #16602 )
2022-12-06 09:26:04 +02:00
Delyan Angelov
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
Delyan Angelov
70fed41660
ci: override VTMP to /tmp for the jobs gg-regressions and doom-regressions
2022-12-05 17:07:48 +02:00
Hitalo Souza
5288c613ef
json2: decode refactor/fix ( #16588 )
2022-12-05 16:58:44 +02:00
yuyi
50110d4c19
all: replace generic '<>' with '[]' in .vv files ( #16593 )
2022-12-05 16:32:15 +02:00
yuyi
7e9e2ff459
cgen: fix if expr with multiple array call ( fix #16583 ) ( #16589 )
2022-12-05 12:07:39 +02:00
yuyi
59c979c8d2
checker: check generic interface type specifing type names ( fix #16576 ) ( #16591 )
2022-12-05 10:05:32 +02:00
Larpon
349ce08a11
tools: fix vcompletion for single-file directories ( #16586 )
2022-12-05 09:15:43 +02:00
Swastik Baranwal
ce06c2818d
checker: add disallow none operations and range ( #16584 )
2022-12-05 08:50:36 +02:00
yuyi
ffc73bf643
builder: fix v builder error ( #16590 )
2022-12-05 08:48:45 +02:00
Delyan Angelov
d8d75ee67e
v.builder: fix v -os wasm32_emscripten examples/2048 on windows
2022-12-04 17:49:33 +02:00
Delyan Angelov
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
RGBCube
5acd855525
term: add format_esc/1 ( #16574 )
2022-12-03 14:01:39 +02:00
Delyan Angelov
bf0c8a0d96
sync: fix compilation of V on m1 with tcc
2022-12-02 23:17:46 +02:00
Delyan Angelov
d09c8c914b
testing: refactor the v test implementation to make supporting different output modes easier
2022-12-02 18:12:42 +02:00
Delyan Angelov
e419faf746
all: fix dependant->dependent typos, cleanup comments
2022-12-02 12:51:10 +02:00
Delyan Angelov
675c362f57
v.util: cleanup util.path_styled_for_error_messages/1
2022-12-02 11:48:01 +02:00
Delyan Angelov
c77344e0a2
checker: add a return *x suggestion, to the error fn ... expects you to return a non reference type ..., but you are returning ... instead
2022-12-02 10:40:36 +02:00
yuyi
f16722596c
all: replace generic '<>' with '[]' in error messages and comments ( #16571 )
2022-12-02 09:22:48 +02:00
Tim Marston
cbe64cb543
checker: allow struct updates from struct aliases ( #16567 )
2022-12-02 00:28:10 +02:00
RGBCube
18d98a5e16
.github: clean issue templates ( #16566 )
2022-12-01 18:29:59 +02:00
Larpon
6e24f7e13a
gg: always use 4 channels in init_sokol_image ( #16564 )
2022-12-01 18:54:37 +03:00
Delyan Angelov
161847ed1a
v.pref: make -b unknown_backend an error, with a more informative diagnostic message
2022-12-01 15:28:51 +02:00
RGBCube
02f5c59340
docs: remove Android from the common installation section header, as it has its own section ( #16563 )
2022-12-01 14:59:44 +02:00
Delyan Angelov
32976863a8
github: add existing "Unit: Documentation" label to the documentation issue template.
2022-12-01 14:49:50 +02:00
yuyi
c06696bc9a
cgen: fix printing multi-reference struct ( #16560 )
2022-11-30 21:30:15 +02:00
yuyi
fd04c1a03a
cgen: fix error of match expr ( fix #16554 ) ( #16555 )
2022-11-30 12:04:20 +02:00
Christopher Fore
3175bf374d
Add Arch command for MingW ( #16558 )
2022-11-30 00:17:34 +02:00
Delyan Angelov
675a1be975
math: remove the deprecated math.mathutil module too
2022-11-29 14:56:40 +02:00
Delyan Angelov
3fff786f36
math: remove the deprecated math.util module
2022-11-29 14:42:46 +02:00
Delyan Angelov
952f4644c5
math.big: remove import math dependency (math.big only uses min/max/abs)
2022-11-29 14:42:46 +02:00
Delyan Angelov
6ef3dfdea9
sokol: fix v -Wimpure-v examples/2048/
2022-11-29 14:42:45 +02:00
Delyan Angelov
7df8f063ed
builtin: fix typo
2022-11-29 14:42:44 +02:00
yuyi
dff61300fb
table: optimize fn_type_signature() ( #16552 )
2022-11-29 13:13:58 +02:00
Swastik Baranwal
58e150df12
parser: add a better error msg for using ..., instead of .. in for a in 1...10 { ( #16547 )
2022-11-28 10:37:12 +02:00
yuyi
d257e43932
checker: fix 'return none' in void optional function ( #16545 )
2022-11-28 10:29:02 +02:00
yuyi
7d8c386721
datatypes: change optional to result ( #16546 )
2022-11-28 10:24:47 +02:00
Delyan Angelov
1d24dbe602
builtin: document string.to_wide() and string_from_wide()/1
2022-11-28 09:46:04 +02:00
Delyan Angelov
73675dca87
builtin: move v_segmentation_fault_handler to builtin.c.v, make it more informative
2022-11-27 12:11:06 +02:00
Delyan Angelov
fdbd40d806
scanner: make Scanner.peek_token more robust (p.peek_token(-999999) will return an EOF token, instead of garbage data)
2022-11-27 12:09:43 +02:00
Delyan Angelov
50b73abc62
parser: add p.show() to ease debugging parser problems, that need more context
...
Using it, produces output like this on stdout:
```
>> vlib/v/tests/typeof_type_test.v:4: keyword `typeof` token `(` token `[` keyword `fn` token `(` name `s` name `string`
>> vlib/v/tests/typeof_type_test.v:8: keyword `typeof` token `(` token `[` name `int` token `]` token `)` token `.`
>> vlib/v/tests/typeof_type_test.v:9: keyword `typeof` token `(` token `[` name `int` token `]` token `)` token `.`
>> vlib/v/tests/typeof_type_test.v:13: keyword `typeof` token `(` token `[` name `u32` token `]` token `)` token `.`
>> vlib/v/tests/typeof_type_test.v:14: keyword `typeof` token `(` token `[` name `u32` token `]` token `)` token `.`
>> vlib/v/tests/typeof_type_test.v:18: keyword `typeof` token `(` token `[` name `string` token `]` token `)` token `.`
```
Note: this tracing output is *deliberately on `stdout`*, instead of `stderr`,
so that you can filter it more easily, without saving it to a file first, i.e.
you can use it while developing/debugging parser issues like this:
`./v -o vnew cmd/v && ./vnew some_file.v | grep some_file.v`
-> this will show only the parsing context for the constructs you are debugging,
for that specific file *only*, instead of for all of `builtin` and the imported files etc.
2022-11-27 11:13:42 +02:00
yuyi
cf3dda2a58
datatypes: fix fsm.set_state() and cleanup fsm module ( #16539 )
2022-11-27 09:10:08 +02:00
Vincenzo Palazzo
8543d5e055
checker: improve mut arg error msg ( #16540 )
2022-11-27 07:07:35 +03:00
yuyi
ef5be22f81
all: replace generic <> with [] - part 2 ( #16536 )
2022-11-26 18:23:26 +02:00
yuyi
b19b97e7b1
generic: replace generic <> with [] part 1 - allow for both ( #16532 )
2022-11-26 08:59:42 +02:00
Swastik Baranwal
a9b41d2980
all: add support for const ident in match range ( #16526 )
2022-11-26 08:56:00 +02:00
yuyi
dee75fe970
checker: perfect infer_struct_generic_types() ( #16524 )
2022-11-24 19:30:02 +02:00
yuyi
f6cc88fa69
tests: add new test for #16519 ( #16520 )
2022-11-24 15:56:07 +02:00
yuyi
f0a23c8d3c
cgen: fix fn call of sumtype with alias fntype variant ( #16519 )
2022-11-24 12:05:57 +02:00
yuyi
8b5c75c481
cgen: fix sumtype with alias fntype variant ( #16516 )
2022-11-23 19:46:58 +03:00
shove
d632e84090
cgen: fix comptime optional methods call and optional field ( fix #16499 #16465 ) ( #16503 )
2022-11-23 19:08:49 +03:00
Delyan Angelov
a987f84b15
ci: skip the very slow running tests in v test-self, when -asan-compiler or -msan-compiler is passed as well.
2022-11-22 19:52:43 +02:00
Subhomoy Haldar
f7a11b8e50
toml: update value_opt syntax and add missing documentation ( #16510 )
2022-11-22 19:45:12 +02:00
yuyi
7c7ebd648d
checker: check assigning generic function to a variable ( #16507 )
2022-11-22 17:56:49 +02:00
yuyi
27cdf5ae0e
checker: minor cleanup in checker module (remove pub from most of checker's methods) ( #16505 )
2022-11-22 17:50:26 +02:00
Delyan Angelov
7d57559b70
datatypes: make the out of bounds errors for lists APIs more detailed
2022-11-22 13:42:29 +02:00
yuyi
cc7e6006f9
checker: fix generic fn with short generic struct init syntax ( #16504 )
2022-11-22 13:27:49 +02:00
lemon
00383edd3d
native: add more operator support for floats on amd64 ( #16498 )
2022-11-21 12:48:24 +02:00
Delyan Angelov
c744030665
tests: add a watchdog thread to live_test.v to prevent it from blocking the whole CI on slow sanitized jobs
2022-11-21 12:24:54 +02:00
Delyan Angelov
c286775d9f
strconv: add test_atof_converter to the tests, as suggested by the code review
2022-11-21 07:41:41 +02:00
Delyan Angelov
6cd1723deb
strconv: fix float_prec := 1.9999999999999999 + 0.0000000000000000005 being 0.5 ( fix #16448 ) ( #16495 )
2022-11-21 03:57:51 +03:00
RGBCube
bffe7bd7ab
github: add discord link to config.yml ( #16497 )
2022-11-20 21:33:28 +02:00
Delyan Angelov
0e727ec50a
checker: cleanup obsolete code for compatibility between byteptr and &byte ( #16494 )
2022-11-20 16:44:58 +02:00
Delyan Angelov
cb336c7dc7
net.http: remove ending \r from response.status_msg, add more tests
2022-11-20 16:22:43 +02:00
Subhomoy Haldar
aae63f5eb5
tools: gitignore the bin/ folder in new V projects (created by v init) ( #16493 )
2022-11-20 14:43:33 +02:00
Hitalo Souza
45854882b9
builtin, cgen: support FieldData.unaliased_typ, use it for generalising x.json2 (able to encode type aliased struct fields) ( #16469 )
2022-11-20 11:18:14 +02:00
Swastik Baranwal
06764bc559
checker: disallow taking address of optional fields for now ( #16487 )
2022-11-19 22:03:39 +02:00
Delyan Angelov
531c145ae7
Update bug-report.yml
2022-11-19 20:58:50 +02:00
Delyan Angelov
9d8e307ed9
Add a link to the Q&A category in the discussions
2022-11-19 20:56:18 +02:00
shove
5ef4e0c9be
cgen: fix "fn()?.field?" expr cgen error ( fix #16482 ) ( #16488 )
2022-11-19 20:30:24 +02:00
RGBCube
05e562cb3c
doc: return none instead of error in the iterator example ( #16486 )
2022-11-19 19:11:56 +02:00
Delyan Angelov
6b0743bb07
x.json2: add support for i8, i16, u8, u16, u32 ( fix #16484 )
2022-11-19 12:03:04 +02:00
shove
79b4cfb42a
all: correct the first letter of error message from uppercase to lowercase ( #16481 )
2022-11-19 10:43:25 +02:00
shove
092f984708
ast, cgen: fix match struct.field? {...} ( #16478 )
2022-11-19 10:42:36 +02:00
RGBCube
2d9808b2dc
term: add term.slow_blink/1 and term.rapid_blink/1 ( #16470 )
2022-11-18 19:03:14 +02:00
Přemek Vyhnal
92be90300c
doc: mention the $embed_file return type, and link to its documentation ( #16467 )
2022-11-18 12:54:17 +02:00
Ulises Jeremias Cornejo Fandos
914007fd83
github: update templates to use latest github issues features ( #16468 )
2022-11-18 12:47:17 +02:00
Hitalo Souza
74613bd636
x.json2: generic-based encoder (finish PR#15137) ( #16464 )
2022-11-18 11:09:24 +02:00
Swastik Baranwal
44e2149baa
cgen: add escaping for near, far and huge keyword ptrs ( #16463 )
2022-11-17 23:42:09 +02:00
Delyan Angelov
886abcdf59
ci: bump timeout-minutes to 240, for all sanitized jobs
2022-11-17 17:35:51 +02:00
shove
ae816b1719
parser: fix if-guard for struct optional fields ( fix #16460 ) ( #16461 )
2022-11-17 15:30:16 +03:00
shove
74efd2621b
checker: fix struct field unsign type check ( fix #16457 ) ( #16458 )
2022-11-17 09:20:42 +02:00
Swastik Baranwal
360457e021
checker: disable overriding and importing of builtin sym types ( #16452 )
2022-11-17 09:10:03 +02:00
yuyi
cb9e945aa0
cgen: clean and improve need_tmp_var_in_match() ( #16451 )
2022-11-17 09:08:45 +02:00
shove
37700502f5
all: implement struct field optional and disallow storing result ( #16392 )
2022-11-17 07:51:50 +02:00
Spydr
41dd8985fc
native: use enum values instead of strings for identifying builtin functions ( #16450 )
2022-11-17 07:44:08 +02:00
shove
49277f7aa8
cgen: fix dump(nil), dump(voidptr) ( fix #16455 ) ( #16456 )
2022-11-17 07:41:07 +02:00
yuyi
523ccbcb70
cgen: fix if expr with sumtype value of map ( #16445 )
2022-11-16 14:59:34 +02:00
Larpon
b60132d2ac
checker: rename test assing -> assign ( #16446 )
2022-11-16 14:46:36 +02:00
Delyan Angelov
9bb1867be0
os: refactor err == IError(os.Eof{}) to err is os.Eof
2022-11-16 00:53:45 +02:00
Delyan Angelov
ddc1a1fc08
checker,cgen: support const y = term.yellow, then println(y('abc')) ( #16436 )
2022-11-15 19:51:57 +02:00
Swastik Baranwal
dc81d755e8
checker: disallow using unsafe { none } ( #16431 )
2022-11-15 18:55:07 +02:00
Basil
fe2db64384
tests: add unsafe block for the int->enum cast in bench_compare_tokens.v ( #16438 )
2022-11-15 18:34:44 +02:00
JalonSolov
5dc5766def
doc: minor update for $\{\} ( #16440 )
2022-11-15 18:33:33 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' ( #16428 )
2022-11-15 16:53:13 +03:00
Ikko Ashimine
56239b4a23
toml: fix typo in parser.v ( #16430 )
2022-11-14 21:08:22 +03:00
Swastik Baranwal
58cee6ccc8
checker: disallow none type in struct fields ( #16425 )
2022-11-14 17:48:00 +03:00
yuyi
91ecfb917c
checker: fix generic fn casting &u8 to &alias to u32 ( #16420 )
2022-11-14 17:37:53 +03:00
Alexander Medvednikov
37583b04b4
gg: make create_image's receiver immutable
2022-11-14 17:25:42 +03:00
Dominik Pytlewski
f44af02e32
sqlite: affected rows count ( #16426 )
2022-11-14 17:23:42 +03:00
yuyi
1a4d1aece4
checker: minor cleanup and optimization in method_call() ( #16421 )
2022-11-13 22:33:36 +02:00
Delyan Angelov
eb11b0149d
tools: fix git_pre_commit_hook.vsh on windows
2022-11-13 21:57:10 +02:00
Delyan Angelov
1978176c22
tools: add an utility cmd/tools/git_pre_commit_hook.vsh script
...
That script can be used to ensure that all commited V files are vfmt-ed,
i.e. it will run `v fmt -w ` on them before commiting them.
To use the script in your V project, you need to be in the main folder
of your project, then do the equivalent of:
```sh
cp /PATH/TO_YOUR/V/cmd/tools/git_pre_commit_hook.vsh .git/hooks/pre-commit
chmod 755 .git/hooks/pre-commit
```
Note: you can use this command:
`git config --bool --add hooks.stopCommitOfNonVfmtedVFiles true`
... to make it just *prevent* the commiting of unformatted .v files,
i.e. stop the commiting, if they are not, but *without modifying them*
automatically (you will then need to run `v fmt -w` on them manually).
Note 2: Git supports the option `--no-verify`, to temporarily disable all hooks.
2022-11-13 21:22:46 +02:00
Hitalo Souza
38555a92e1
time: change days_from_civil to days_from_unix_epoch, add date_from_days_after_unix_epoch ( #16363 )
2022-11-13 14:30:14 +02:00
Hitalo Souza
7cfaacbe7a
doc: add more examples to vlib/time/README.md ( #16362 )
2022-11-13 13:48:07 +02:00
yuyi
5a28699edb
cgen: minor cleanup in auto_str_methods.v ( #16411 )
2022-11-13 11:59:32 +03:00
yuyi
f31a3b4250
checker: check sumtype argument mismatch in generic methods ( fix #16340 part2) ( #16403 )
2022-11-13 11:58:53 +03:00
yuyi
e8e75251b4
vweb: change optional to result in vweb_test ( #16412 )
2022-11-13 11:57:35 +03:00
Taegon Kim
b54f9c2949
parser: fix attributes with optional or result types ( #16401 )
2022-11-12 18:35:01 +03:00
kahsa
9a8602ff03
doc: improve types order ( #16399 )
2022-11-12 11:42:30 +02:00
kahsa
46f1b20bbc
doc: split TOC into two rows ( #16397 )
2022-11-12 10:06:10 +02:00
Junko
5bb058e35b
gg: revamp the Context pipeline for more effects, implement an additive effect ( #16394 )
2022-11-12 09:39:18 +02:00
kahsa
7d31473523
doc: add links ( #16398 )
2022-11-12 09:35:35 +02:00
Delyan Angelov
12f01318c2
v.live, cgen: enable using [live] in modules too (monitor used .v files for changes, not just the top level one) ( #16396 )
2022-11-11 22:06:42 +02:00
yuyi
c9ce5f89c7
builtin: fix f32.str() ( #16391 )
2022-11-11 13:56:45 +02:00
Delyan Angelov
c1a44efc78
tests: ensure that const loading is stressed in live_test.v, to prevent -live regressions for more complex examples like bounce.v
2022-11-11 10:45:54 +02:00
Delyan Angelov
e9fac05775
cgen: fix v -cc tcc -live run examples/hot_reload/graph.v too
2022-11-11 10:20:18 +02:00
Delyan Angelov
202f9574ec
cgen: fix v -live -cc gcc examples/hot_reload/graph.v
2022-11-11 10:20:17 +02:00
shove
3a85955d22
all: rollback to old interpolation (step 4) ( #16383 )
2022-11-11 11:06:01 +03:00
yuyi
993e21e85b
checker: check fntype mismatch of struct field init ( fix #16372 ) ( #16381 )
2022-11-10 20:19:19 +02:00
yuyi
196b01aef7
all: minor cleanup of optional and result ( #16382 )
2022-11-10 20:14:20 +02:00
shove
26d643fc5d
all: rollback to old interpolation (step 3) ( #16380 )
2022-11-10 15:05:34 +03:00
Delyan Angelov
bbae7a705f
checker: fix incomplete implicit ast.CastExpr{} replacements
2022-11-10 13:59:22 +02:00
Delyan Angelov
7543b769ad
checker: allow for all.children := { "abc": rect, "def": rectangle()}, where children is map[string]Widget, without needing explicit casts for all the map values
2022-11-10 13:59:21 +02:00
yuyi
46921480fc
comptime: fix embed file with variable argument ( fix #16360 ) ( #16375 )
2022-11-10 04:09:51 +02:00
Swastik Baranwal
bbd0603b41
checker: add check for unknown generic types in type alias decl ( #16377 )
2022-11-10 04:08:00 +02:00
Dominik Pytlewski
2634b99769
sqlite: expose SQLite's VFS layer ( #16359 )
2022-11-09 19:57:06 +02:00
yuyi
7e000bb6ae
embed_file: correct test file name ( #16376 )
2022-11-09 19:55:51 +02:00
shove
a199a9afab
all: rollback to old interpolation (step 2) ( #16373 )
2022-11-09 17:37:27 +03:00
shove
dd5f6186a1
all: rollback to old interpolation (step 1) ( #16370 )
2022-11-09 11:57:54 +03:00
Swastik Baranwal
7830597b66
checker: add check for multi level fn aliases ( #16361 )
2022-11-09 10:36:39 +02:00
Taegon Kim
ce79c9c876
checker: extract valid_comptime_ constants into v.checker.constants ( #16371 )
2022-11-09 10:07:21 +02:00
Roy Ivy III
a07f77ac52
make: add 'rebuild' target (clean and reset sub-repos, then rebuild V) ( #16357 )
2022-11-08 17:51:29 +03:00
yuyi
c7d0f0561e
scanner: fix new string interpolation - nested quotes ( #16345 )
2022-11-08 17:51:02 +03:00
Taegon Kim
bc30608e92
checker: always trigger error for anon fns without a body block ( #16358 )
2022-11-08 15:50:59 +02:00
yuyi
1d04b71c91
cgen: fix generic sumtype auto str ( #16355 )
2022-11-08 10:49:09 +02:00
Taegon Kim
dc9997f58c
fmt: fix - v fmt transforms compile time options in some cases ( #16351 )
2022-11-08 08:05:48 +02:00
Delyan Angelov
5f33585edf
tools: add support for VSELF_SHOULD_FAIL to v self, in order to make testing all v up failure modes easier.
2022-11-07 12:36:30 +02:00
Roy Ivy III
c015f15d8d
make.bat: fix use of make.bat from v up ( #16348 )
...
* .editorconfig: fix EOL for BAT files
* make.bat: fix use of `make.bat` from `v up`
- use move semantics, instead of replace, for `v` executable updates
- fixes [#16184 ](https://github.com/vlang/v/issues/16184 )
# [why]
`v up` updates the executable by directly calling `make.bat`, awaiting
the result, which keeps an open file handle to it's own executable file.
`make.bat` compiles and, crucially, attempts to directly replace that
`v` executable. But, in WinOS, files with open file handles cannot be
deleted/replaced, so the `make` then fails. The other key point is that,
although WinOS files with open file handles can't be deleted/replaced,
they _can be moved/renamed_.
Thus, the technique that most self-updating WinOS executables use is to
move the current executable to some alternate name (ie, *v_old.exe*) and
then move the newly updated executable to the original location (ie,
*v.exe*). The next invocation of the "original" executable will then run
the updated version.
Note, this technique also works correctly for direct invocations of `make.bat`.
2022-11-07 08:48:08 +02:00
pancake
407bb6641f
cgen: fix #16326 -cstrict with $embed_file ( #16343 )
2022-11-06 15:47:06 +02:00
Delyan Angelov
5638005b17
README: fix Termux instructions (add libexecinfo too)
2022-11-06 15:09:29 +02:00
Delyan Angelov
040bcd9141
README: add a section to clarify the installation process on Termux
2022-11-06 15:04:37 +02:00
yuyi
25b8ae2189
parser: minor cleanup in comptime.v ( #16338 )
2022-11-06 08:23:28 +03:00
pancake
e3fed4c3eb
v.pkgconfig: fix infinite recursion bug when parsing dependencies ( #16342 )
2022-11-06 08:22:50 +03:00
Swastik Baranwal
ca484430e0
checker: check int overflow for const vars ( #16332 )
2022-11-06 08:22:28 +03:00
yuyi
d701cf561c
scanner: fix new string interpolation: print('{n:10}') ( fix #16321 ) ( #16325 )
2022-11-06 08:20:21 +03:00
Delyan Angelov
056f1b7c06
parser: improve error message for fn (a Foo<Foo<T>>) baz(){}
2022-11-05 19:58:22 +02:00
Delyan Angelov
27d8f2371d
ci: fix go->spawn in the examples in vlib/context/README.md too
2022-11-05 14:02:24 +02:00
Delyan Angelov
bf00e9bdb8
tests: fix vlib/v/fmt/tests/*_expected.vv files too
2022-11-05 11:30:49 +02:00
Alexander Medvednikov
02acb8433c
tests: fix keep tests with spawn
2022-11-05 12:13:20 +03:00
Delyan Angelov
9f2ab9aad6
ci: fix long line in doc/docs.md
2022-11-05 10:57:13 +02:00
Delyan Angelov
3e02f3b2b1
docs: put the short installation instructions directly in doc/docs.md too
2022-11-05 10:54:26 +02:00
Alexander Medvednikov
5b44da5ddb
doc: replace go with spawn
2022-11-05 10:50:37 +03:00
Alexander Medvednikov
e81e0ac708
fmt: replace go with spawn
2022-11-05 10:46:40 +03:00
Alexander Medvednikov
a082328e40
parser: make spawn behave like go
2022-11-05 10:41:30 +03:00
Alexander Medvednikov
141c404d45
all: new keyword "spawn"
2022-11-05 09:43:38 +03:00
Delyan Angelov
b52b8429d4
vfmt: implement support for // vfmt off and // vfmt on, with it, v fmt -w . now works. ( #16335 )
2022-11-05 09:08:01 +03:00
yuyi
131d07aede
parser: fix embed file to_string() in if guard ( #16334 )
2022-11-05 09:05:38 +03:00
Ted Stoychev
e1896ffd5b
tutorials: fix a broken link ( #16333 )
2022-11-05 08:13:00 +03:00
Ted Stoychev
5933ab7158
docs: add syntax highlighting to a code snippet in the tutorials ( #16331 )
2022-11-04 17:01:25 +02:00
Delyan Angelov
4cabf709e1
tools: add support for a |``v shared| markdown code tag, for illustrating code examples starting with module not_main`
2022-11-04 15:35:25 +02:00
Delyan Angelov
2dffb04650
ci: fix formatting of cmd/tools/vtest-cleancode.v after resolving conflicts
2022-11-04 15:12:46 +02:00
Delyan Angelov
7f91db695c
examples, tests: small formatting cleanup in cube_glsl.v , remove already fixed skips in v test-cleancode, before // vfmt off and // vfmt on
2022-11-04 14:48:20 +02:00
kahsa
fa7ff09370
doc: move Struct update syntax to the Struct section ( #16305 )
2022-11-04 09:01:51 +02:00
kahsa
3061859f25
doc: move the Parameter evaluation order section before References ( #16306 )
2022-11-04 08:57:40 +02:00
kahsa
cb5c6b605b
doc: fix match heading and add ref field link ( #16316 )
2022-11-04 08:31:24 +02:00
penguindark
eb0c46e13a
regex: fix for last group with OR inside ( #16324 )
2022-11-04 08:19:33 +02:00
yuyi
fd4045931a
scanner: fix the new string interpolation - println('{s == 'hello'}') ( fix #16318 ) ( #16319 )
...
* scanner: fix the new string interpolation - println('{s == 'hello'}')
* fix vlib/v/eval/gen/infix_gen.v
2022-11-03 23:06:11 +02:00
shove
0e8d148fe7
checker: give a checker error message on print(1), print(2) ( fix #16311 ) ( #16314 )
2022-11-03 17:28:59 +02:00
Taegon Kim
962d0babdc
js: fix match true {} in the js backend ( #16317 )
2022-11-03 17:25:45 +02:00
kahsa
4e02cd8721
doc: move match next to if ( #16304 )
2022-11-03 14:17:02 +02:00
yuyi
a979b3aab8
scanner: fix new string interpolation - print('{a}{{b}}') ( #16309 )
2022-11-03 14:04:41 +02:00
kahsa
9de92eb391
doc: add more links ( #16303 )
2022-11-03 13:36:39 +02:00
kahsa
fa3019195c
doc: improve toc ( #16302 )
2022-11-03 13:34:05 +02:00
shove
fa4a45d37f
all: make fmt support two kinds of interpolation at the same time. ( #16308 )
2022-11-03 13:32:07 +02:00
shove
5c7ceb16dd
checker: fix the check of types not implemented by interfaces in infix key_is and not_is ( fix #16282 #16298 ) ( #16284 )
2022-11-03 12:18:30 +02:00
Taegon Kim
14f90b1196
cgen: fix compile time reflection for method types (.typ was always 0) ( #16310 )
2022-11-03 12:16:01 +02:00
Delyan Angelov
f427a5241a
os,tools: add os.vtmp_dir()
...
Use it to consistently place all temporary files created by tests in a overridable folder specific to the user, that is easy to cleanup later.
NOTE: os.temp_dir() on macos returns `/tmp`, and using `/tmp/v` is a problem when multiple unix users are trying to access/create/write to it.
2022-11-03 10:19:51 +02:00
kahsa
509f5c7db3
doc: fix links to attributes ( #16301 )
2022-11-03 07:02:01 +02:00
kahsa
1ecf7c6e41
doc: fix function heading ( #16307 )
2022-11-03 06:38:07 +02:00
shove
dddcf423db
all: replace x[x.len-1] with x.last() ( #16296 )
2022-11-02 21:08:33 +02:00
JalonSolov
d11baa691c
v: update the .gitattributes/.gitignore files generated by v init ( #16292 )
2022-11-02 20:41:12 +02:00
Taegon Kim
d4c83f62b2
doc: fix a broken example in json2's README.md ( #16293 )
2022-11-02 19:29:43 +02:00
shove
5fe4888874
parser: fix raw string as map keys ( fix #16285 ) ( #16289 )
2022-11-02 16:04:22 +02:00
Spydr
075c025999
native: don't generate duplicate strings ( #16281 )
2022-11-02 15:48:25 +02:00
shove
0fa6f60fac
cgen: fix call method with an empty args on an interface with variadic ( fix #16286 ) ( #16290 )
2022-11-02 15:45:39 +02:00
yuyi
4e05e07b94
checker: check undefined ident in closure anon fn ( fix #16274 ) ( #16278 )
2022-11-02 15:41:44 +02:00
kahsa
0510a69bea
doc: categorize the advanced topic section ( #16276 )
2022-11-02 15:33:29 +02:00
yuyi
54b6b43922
cgen: fix dump(none) ( #16287 )
2022-11-02 14:21:28 +02:00
Delyan Angelov
7bd00b7580
tools: make fast_job.v more verbose and robust to compilation failures in fast.v, and to what compiler exactly was used to compile fast_job.v itself.
2022-11-02 13:26:12 +02:00
Delyan Angelov
82dc9ca434
tools: make fast.v results more robust to AWS spikes (increase samples, discard the top few)
2022-11-02 13:03:30 +02:00
Alexander Medvednikov
38291fd292
changelog: minor fixes
2022-11-02 12:50:16 +03:00
Alexander Medvednikov
0aa2c63afd
changelog: 0.3.2
2022-11-02 10:08:21 +03:00
Alexander Medvednikov
33bd7decdc
readme: update links
2022-11-02 08:26:57 +03:00
shove
e5d1881e1a
checker: fix multiple pointer check of fn and method args ( fix #16261 #16262 #16263 ) ( #16275 )
2022-11-01 19:05:34 +02:00
Hitalo Souza
d2902e700f
examples: show how to use a before_request method for the multi-route examples, be more informative about DB creation problems ( #16279 )
2022-11-01 19:02:07 +02:00
JalonSolov
0c03ebb7a4
.gitignore: ignore Intellij items ( #16280 )
2022-11-01 18:51:46 +02:00
Delyan Angelov
31adc65dd6
examples: mention -d no_backtrace in examples/call_v_from_python/README.md
2022-11-01 18:16:30 +02:00
Delyan Angelov
968435fca6
toml: clearly mark the workaround [manualfree] tags with [autofree_bug; manualfree], so they can be found/removed when -autofree is fixed
2022-11-01 18:08:38 +02:00
Delyan Angelov
ffd9b9bae1
ci,toml: add a workaround for buggy -autofree (skip -autofree compilation for some of the toml functions, that prevent VED to compile cleanly on the CI)
2022-11-01 17:52:41 +02:00
Delyan Angelov
bd7c86a9d4
tools: make fast_job.v more informative on updates
2022-11-01 16:12:36 +02:00
Delyan Angelov
1868b101a5
tools: fix commit message cell border in fast.vlang.io
2022-11-01 16:05:50 +02:00
Delyan Angelov
32ce3d9149
tools: make fast_job.v more robust
2022-11-01 15:49:23 +02:00
Delyan Angelov
edb3f1df32
tools: fix table wrapping in fast.vlang.io, use <th> cells for the heading
2022-11-01 15:13:09 +02:00
vlang-bot
9cdec87255
tools: add more logging for fast_job.v, to ease maintainance
2022-11-01 10:54:12 +00:00
penguindark
362adfae3a
regex: fix a bug for CC token not correctly parsed in groups ( #16272 )
2022-11-01 08:58:29 +02:00
JalonSolov
47a10f3181
doc: update ssl section in the main README.md ( #16273 )
2022-11-01 07:28:39 +02:00
Alexander Medvednikov
135b1ccb14
V 0.3.2
2022-11-01 05:41:13 +03:00
Spydr
1b721250e0
native: enable printing for all supported expressions ( #16270 )
2022-10-31 17:43:02 +02:00
yuyi
339bd0c4b5
checker: check fn type mismatch of return result type fn ( #16269 )
2022-10-31 14:05:43 +02:00
shove
c3e209a634
scanner: prevent resolving to nested interpolation ( fix #16240 ) ( #16259 )
2022-10-31 10:47:32 +02:00
Delyan Angelov
4a7a4b9ec5
docs: improve the package related sections; describe VMODULES.
2022-10-31 10:13:18 +02:00
Mykhailo
cd4a999e80
examples: add custom_error.v, that shows how to match over possible errors ( #16265 )
2022-10-31 09:56:41 +02:00
yuyi
0390a7a988
cgen: fix return match expr of sumtype result ( #16264 )
2022-10-30 20:26:33 +02:00
yuyi
64cbadc6f1
scanner: fix new string interpolation println('{a}{b}{c}{d}') ( #16258 )
2022-10-30 20:18:31 +02:00
Delyan Angelov
914f03a1a2
doc: document the -no-bounds-checking option in v help build
2022-10-30 15:05:02 +02:00
Delyan Angelov
9edb48571f
pref,cgen: support -no-bounds-checking, instead of -d no_bounds_checking, and make it enable direct_array_access for all fns/methods.
2022-10-30 14:39:45 +02:00
lemon
54b623743d
native, checker: cast float_literal to f32 explicitly in code gen ( #16254 )
2022-10-30 10:31:18 +02:00
shove
93d765eeee
cgen: fix dump() multi ptr ( fix #16247 ) ( #16251 )
2022-10-29 10:07:28 +03:00
Swastik Baranwal
a988ef3474
checker: add check for mut ident but not if mut ident is for interfaces ( #16214 )
2022-10-29 06:36:44 +03:00
yuyi
ee782e9119
checker: fix return error with multi_return optional ( #16250 )
2022-10-29 06:34:45 +03:00
Hitalo Souza
78c4b9a7bb
doc: one single file for vweb ( #16248 )
2022-10-29 06:33:48 +03:00
Delyan Angelov
02c3af2432
all: add support for enum Xyz as u64 { + tests ( #16246 )
2022-10-29 06:32:20 +03:00
Delyan Angelov
4564a47fbc
.gitignore: ignore Visual Studio's .vs/ folder
2022-10-28 22:40:47 +03:00
Grantley Cullar
21d18b0792
doc: fix typos ( #16239 )
2022-10-28 22:27:38 +03:00
Delyan Angelov
a0a055cc4c
ci: fix failures after c6158e4
2022-10-28 21:52:52 +03:00
Alexander Medvednikov
c6158e4519
all: remove unnecessary IError() casts
2022-10-28 19:08:30 +03:00
yuyi
daa2f90023
scanner: fix and resotre string interpolation tests ( #16242 )
2022-10-28 18:39:32 +03:00
shove
5daa38fdb1
util: fix smart_quote, so that v -cstrict file.v works with println('\\$') ( fix #16230 ) ( #16233 )
2022-10-28 12:41:13 +03:00
StunxFS
ef1696b3e1
v.util: add path_styled_for_error_messages/1 ( #16219 )
2022-10-28 11:27:00 +03:00
shove
af56719f9d
fmt: fix compiler_error('...') broken by fmt ( fix #16218 ) ( #16231 )
2022-10-28 06:48:09 +03:00
StunxFS
219079e3a6
v.eval: consistency in commit hash shown on panic ( #16227 )
2022-10-28 06:47:50 +03:00
shove
c5ee33b7aa
cgen: fix comparing struct with pointers to interface values ( fix #16074 ) ( #16215 )
2022-10-28 06:47:31 +03:00
yuyi
992106c6f7
tests: fix ci errors temporary ( #16237 )
2022-10-28 06:46:20 +03:00
yuyi
0ca5b1f6ff
cgen: fix $tmpl() in returning match expr ( fix #16109 , fix #16124 ) ( #16229 )
2022-10-27 18:03:27 +03:00
Alexander Medvednikov
e356a74a4c
tests: disable a single string interpolation test for now
2022-10-27 18:02:25 +03:00
Alexander Medvednikov
cc58d6a919
all: string interpolation fixes
2022-10-27 17:52:30 +03:00
kahsa
d653716292
doc: add global variables link ( #16228 )
2022-10-27 13:09:05 +03:00
Alexander Medvednikov
098db89b85
encoding.csv: remove unnecessary IError() cast
2022-10-27 11:30:08 +03:00
Alexander Medvednikov
c9934672c4
http: fix request_test.v
2022-10-27 11:28:44 +03:00
Alexander Medvednikov
a134c09718
os: fix font.v compilation
2022-10-27 11:13:43 +03:00
Alexander Medvednikov
e1ffc76efd
tests: fix some interpolation tests
2022-10-27 11:12:15 +03:00
Alexander Medvednikov
604f19adba
scanner: : str inter fix
2022-10-27 11:08:32 +03:00
Alexander Medvednikov
18c7da9a5e
all: new string interpolation "hello {name}!"
2022-10-27 11:01:01 +03:00
StunxFS
e6fad82b87
v.eval: support unsafe expr ( #16224 )
2022-10-27 10:38:57 +03:00
kahsa
ce2c732db8
doc: move the Attributes subsection at the start of its parent section ( #16183 )
2022-10-26 23:28:37 +03:00
Delyan Angelov
41c85661ef
fix quadratic execution of VAUTOFIX=1 v check-md . when a long .md file has many examples, that have to be corrected.
2022-10-26 22:47:58 +03:00
Delyan Angelov
007430ef2b
tools: support VAUTOFIX=1 v check-md vlib/term/README.md for fixing unformatted examples without manual edits
2022-10-26 21:51:10 +03:00
yuyi
064e35fbc4
parser: fix $tmpl with single quotes ( fix #16154 ) ( #16216 )
2022-10-26 19:38:08 +03:00
boons
a19a4ba299
examples: add a tiny brainvuck interpreter ( #16213 )
2022-10-26 19:31:15 +03:00
yuyi
992b502198
db, json, time, term: change optional to result ( #16201 )
2022-10-26 11:26:28 +03:00
lemon
2a7420f572
native: add initial support for f32/f64 ( #16210 )
2022-10-26 10:37:46 +03:00
shove
fef4dd94e9
ast, checker, cgen: enable unsafe { nil } with reference to interface fields in structs ( fix #16198 ) ( #16199 )
2022-10-26 09:39:23 +03:00
yuyi
53c6e46a51
parser: correct comptime path not found error position ( fix #16189 ) ( #16209 )
2022-10-26 09:33:58 +03:00
Alexander Medvednikov
572e26204e
changelog: some 0.3.2 features
2022-10-26 02:34:54 +03:00
Delyan Angelov
b2ab7a333b
transformer: improve -trace-calls output, enable tracing of builtin fns, show elapsed ns and used stack size ( #16205 )
...
Make it easier to change later, by splitting the tracing call into its own `v.trace_calls` module, so that it can be iterated upon without changing the compiler itself.
2022-10-25 20:56:12 +03:00
yuyi
03bef24456
checker: fix returning embedded error result ( #16208 )
2022-10-25 18:17:48 +03:00
StunxFS
76606598c3
cleanup: delete database.db in project root folder ( #16190 )
2022-10-25 10:43:17 +03:00
kahsa
779cc33825
doc: rename module to package, when it comes to all VPM commands like v install etc ( #16180 )
2022-10-24 18:00:55 +03:00
kahsa
d3fcb6bca0
doc: add a subheading for creating new modules ( #16188 )
2022-10-24 17:56:34 +03:00
Delyan Angelov
00ec41e0a9
ci: small fix for docs.md
2022-10-24 17:32:01 +03:00
Alexander Medvednikov
690b2c0b9d
doc: more Result fixes
2022-10-24 16:26:19 +03:00
Alexander Medvednikov
2c9e890c3d
doc: document the Option/Result split
2022-10-24 16:11:20 +03:00
yuyi
4aa4af4afb
cgen: fix vweb app route methods filtering ( #16186 )
2022-10-24 12:51:20 +03:00
kahsa
26c737b6db
doc: move goto section under statements ( #16179 )
2022-10-24 12:09:14 +03:00
shove
701586fa84
checker, cgen: enable calls to methods of the parent element array, when an array element is an alias ( fix #16169 ) ( #16187 )
2022-10-24 12:02:24 +03:00
Swastik Baranwal
f25dfa9d8c
checker: add error for unwrapped result in infix expr ( #16175 )
2022-10-24 11:53:35 +03:00
yuyi
48f43f11ea
all: change optional to result in vlib/v. ( #16177 )
2022-10-24 11:51:20 +03:00
Ikko Ashimine
26986104f9
cgen: fix typos ( #16174 )
2022-10-23 22:28:58 +03:00
yuyi
7b8044b8c4
cgen: fix using 'array' name variable in array_init ( #16168 )
2022-10-23 22:23:15 +03:00
Wertzui123
340611c298
net: add a net.tcp_socket_from_handle_raw function ( #16167 )
2022-10-23 22:21:46 +03:00
kahsa
158fd5c249
doc: TOC add missing h3 ( #16170 )
2022-10-23 22:17:20 +03:00
kahsa
235bd87db5
doc: improve TOC ( #16166 )
2022-10-23 17:31:50 +03:00
Delyan Angelov
9241b5572b
net.http: skip network timeouts on socket accept in the main http.Server loop
2022-10-23 17:08:27 +03:00
kahsa
00bd7b621d
doc: minor fix ( #16164 )
2022-10-23 14:30:59 +03:00
kahsa
2d08c7b629
doc: fix headings under Grobal Variables ( #16162 )
2022-10-23 14:21:25 +03:00
yuyi
3f035205b3
cgen: fix return result in or block ( #16158 )
2022-10-23 13:11:11 +03:00
kahsa
33b2b4c6a1
doc: add link to template.md ( #16155 )
2022-10-23 13:07:22 +03:00
shove
721dbec2e4
checker: fix missed check on the initialization of result struct fields ( fix #16152 ) ( #16153 )
2022-10-22 20:02:11 +03:00
Spydr
83338e044a
native: fix small issues with compile-time conditionals ( #16149 )
2022-10-22 19:56:19 +03:00
shove
b8b2b4ad0a
checker: fix the pos information in the warning message, when the label is not used ( fix #16146 ) ( #16148 )
2022-10-22 19:26:38 +03:00
Hitalo Souza
3d4ffe8f28
examples: unskip vweb_orm_jwt from building, since it is not working directly with mysql anymore ( #15671 )
2022-10-22 19:12:54 +03:00
Delyan Angelov
a23e06184d
checker: fix taking a closure of x, where x may be coming from a non trivial parent scope, like for x in y { or x,y := multi() ( fix #16141 ) ( #16147 )
2022-10-22 15:53:27 +03:00
l-m
a139bed785
builtin: add string.trim_indexes method, that can be used in string.trim, but also separately from it ( #16144 )
2022-10-22 12:56:05 +03:00
yuyi
b6faf82911
parser: minor optimization in sql_expr() ( #16145 )
2022-10-22 12:11:45 +03:00
yuyi
9288c75c94
parser: simplify and cleanup check_undefined_variable() ( #16140 )
2022-10-22 11:26:21 +03:00
shove
e863191ff6
checker: fix generic information is lost of the map built-in method call ( fix #16077 ) ( #16134 )
2022-10-21 23:07:05 +03:00
yuyi
ab78d5a7ba
parser: check undefined variable in if guard ( #16138 )
2022-10-21 22:48:59 +03:00
Delyan Angelov
b40f1828b2
ci: re-enable building VEX in v_apps_and_modules_compile.yml
2022-10-21 10:44:59 +03:00
Makhnev Petr
2e8b9e3b92
v fmt: fix extra space for anon struct ( #16131 )
2022-10-21 10:38:19 +03:00
bogen85
c684dd8c9b
log: mark log.fatal as [noreturn] ( #16129 )
2022-10-21 10:33:49 +03:00
yuyi
51f4d99399
all: change optional to result in most of the libraries ( #16123 )
2022-10-20 22:14:33 +03:00
yuyi
0d368562f4
cgen: minor optimization and cleanup in match_expr_sumtype() ( #16126 )
2022-10-20 20:36:56 +03:00
locriacyber
a3b050aced
vrepl: add support for Home and End keys ( #16116 )
2022-10-20 20:07:57 +03:00
yuyi
f8a28b5a5d
checker: check generic method called with a variadic argument mismatch ( fix #16106 ) ( #16110 )
2022-10-20 15:28:30 +03:00
shove
07310d850d
ast, cgen: fix wrong name and cname, when array and fixed array elements have optional ( fix #16099 ) ( #16122 )
2022-10-20 14:17:57 +03:00
Delyan Angelov
2083e6b04c
os: cleanup APIs returning !bool to either return ! or bool ( #16111 )
2022-10-20 13:56:06 +03:00
Swastik Baranwal
ac63fa1b11
parser: improve error for fixed array, when it has len and cap attributes in the initialisation list ( #16120 )
2022-10-20 13:36:13 +03:00
Delyan Angelov
ffcdac4201
ci: fix v_tictactoe.out after 05a1c3e
2022-10-19 22:33:10 +03:00
Delyan Angelov
05a1c3e8a3
parser,ci: fix regression after eda65ad in the VLS tests
2022-10-19 22:29:08 +03:00
yuyi
612faac0f0
all: change index expr returning optional to result too ( #16097 )
2022-10-19 21:04:16 +03:00
Delyan Angelov
eda65ad660
parser,checker,builder: make the checker more robust with -check over files with syntax/parsing errors
2022-10-19 18:14:58 +03:00
Delyan Angelov
d7813965d5
tools: fix os.chmod call (use octal permissions) in v ls
2022-10-19 15:38:06 +03:00
Delyan Angelov
7f294c8278
tests: use _test.v for the postfix of some test files, that were missing it
2022-10-19 12:38:58 +03:00
Grantley Cullar
37b03e57b4
tutorials: fix typos ( #16098 )
2022-10-19 12:20:11 +03:00
Makhnev Petr
2f3c4c6d91
v fmt: fix extra space for lock/rlock without expressions ( #16103 )
2022-10-19 12:18:21 +03:00
yuyi
026fccd373
cgen: fix match expr with last aggregate branch ( #16101 )
2022-10-19 11:49:39 +03:00
yuyi
117c829a97
vtest-self: add skipping ssl tests on windows ( #16107 )
2022-10-19 11:03:29 +03:00
Alexander di Chiara
e3379bca97
datatypes: add quadtree, add its demo to examples/ ( #16087 )
2022-10-18 18:02:44 +03:00
StunxFS
cc9b754801
vlib: delete unused darwin module ( #16093 )
2022-10-18 18:01:25 +03:00
yuyi
9242d4b79b
json2: minor cleanup in README.md ( #16096 )
2022-10-18 18:00:14 +03:00
Delyan Angelov
71bff213ef
builtin: make the C. WIN32 API declarations more precise, to catch errors earlier ( #16090 )
2022-10-17 20:23:33 +03:00
yuyi
126c4c5751
builtin,math: fix math.min_i64.str() ( fix #16086 ) ( #16089 )
2022-10-17 19:36:46 +03:00
yuyi
556244576d
checker: check unused last expression in if ( fix #16084 ) ( #16088 )
2022-10-17 18:15:01 +03:00
Subhomoy Haldar
43b9a716c5
builtin,strconv: append ".0", to float string representations, to ensure clarity ( #16079 )
2022-10-17 15:41:07 +03:00
Delyan Angelov
29b1796791
ci: add more skips for different CI jobs
2022-10-17 10:24:01 +03:00
Delyan Angelov
7fb2718609
ci: only run openssl_compiles_test.v on !windows
2022-10-16 23:15:00 +03:00
Delyan Angelov
7ff7e540b9
ci: more ? -> ! fixes
2022-10-16 22:57:38 +03:00
Delyan Angelov
7302d8c4a8
examples: improve the examples/call_v_from_python with Python showing the result of the calculation done on the V side
2022-10-16 22:48:00 +03:00
Delyan Angelov
409a4f33a1
tools: add report_v_module_folders_without_tests.v . Use it to discover other modules without _test.v files. Add simple ones, to ensure CI can find more breakage on future wide changes to vlib/
2022-10-16 22:40:17 +03:00
Delyan Angelov
17800b4bca
ci: fix net.openssl, ensure that it is at least compiled, to avoid future regressions on sweeping vlib changes
2022-10-16 20:59:04 +03:00
Delyan Angelov
603319e30b
.gitignore: ignore vold/vnew (ensure that artefacts used for benchmarking before/after changes are not commited)
2022-10-16 20:44:07 +03:00
Delyan Angelov
95d2c58148
checker: produce more informative error messages on ~,!,-,<- operator type mismatches
2022-10-16 20:27:40 +03:00
Delyan Angelov
3d2e251bf2
transformer: fix precalculations of simple expressions involving floating literals, with -prod (fix VSL tests with -prod)
2022-10-16 20:23:41 +03:00
Delyan Angelov
d857e97d8c
strconv: enable VTL compilation with -prod (remove deprecation for strconv.v_sprintf temporarily)
2022-10-16 17:43:52 +03:00
Delyan Angelov
78e9362d74
ci: workaround for a VLS failing test, that stops symbol registration after the first fn()! {
2022-10-16 13:38:20 +03:00
Delyan Angelov
c02974622f
tests: add checks_for_operator_overrides_should_happen_on_the_concrete_types_when_using_generics_test.v
2022-10-16 12:57:34 +03:00
Delyan Angelov
710c2b22da
parser: fix infinite loop for type Handler = fn (test string) string without newline at the end
2022-10-16 10:42:53 +03:00
yuyi
f6844e9766
all: change optional to result of io ( #16075 )
2022-10-16 09:28:57 +03:00
shove
6e46933c55
cgen: fix or {} handling, when waiting for a single go thread, of a function returning !Type ( fix #16065 ) ( #16073 )
2022-10-14 19:54:13 +03:00
Delyan Angelov
49c12e4d1c
cgen: fix ./tracev examples/hello_world.v
2022-10-14 19:27:40 +03:00
shove
6bf2ad1ff0
cgen: fix missing * of optional non-ref structs ( fix : #16070 ) ( #16071 )
2022-10-14 10:34:42 +03:00
yuyi
39d2aa71df
checker: check generic closure fn declaration ( #16069 )
2022-10-14 10:24:10 +03:00
zztkm
3e4cfc7343
os: add os.to_slash and os.from_slash functions ( #16055 )
2022-10-14 10:22:36 +03:00
Subhomoy Haldar
09e23e3ed6
rand: add rand.element and prng.element functions with unit test ( #16068 )
2022-10-14 06:54:02 +03:00
Swastik Baranwal
f7f0e0b5dc
v doc: remove int_literal and float_literal from syntax highlighting, since they are internal types ( #16066 )
2022-10-13 20:49:34 +03:00
shove
aabda5a525
checker: allow get_ref() or { unsafe{nil} }, as well as fn get_ref() ?&Type { return unsafe { nil } } ( fix : #16062 ) ( #16063 )
2022-10-13 19:49:10 +03:00
shove
51a9e89c4a
ast: disallow threads << go fn()?{} and threads << go fn()!{} ( fix #16061 ) ( #16064 )
2022-10-13 19:37:27 +03:00
yuyi
f0108323d1
cgen: fix generic closure fn direct call ( #16057 )
2022-10-13 18:06:34 +03:00
shove
e3e8bb2f88
cgen: remove spaces in the generated name for ?&C.struct ( fix #16058 ) ( #16059 )
2022-10-13 18:05:16 +03:00
yuyi
bfbfe78366
cgen: fix assigning optional of multi_return with heap ( #16049 )
2022-10-13 13:07:52 +03:00
shove
213a094680
ast: fix missing 'optional' and 'result' in type name and cname of map ( #16047 )
2022-10-13 10:38:02 +03:00
Swastik Baranwal
3e33f4a11d
checker: disallow nil assignment on non pointer struct fields ( #16056 )
2022-10-13 10:36:59 +03:00
yuyi
fb3d093e01
builtin: remove opt_ok2() (part 2) ( #16054 )
2022-10-13 10:35:41 +03:00
shove
4fbb29a2c0
checker: disallow x := fncallexpr() or { X{} } , when the fn result type is ?&X ( fix #16050 ) ( #16051 )
2022-10-12 22:49:30 +03:00
yuyi
6bdd11e53b
checker: check error for fn call with extra parenthesis ( #16052 )
2022-10-12 22:43:59 +03:00
yuyi
211cb2af7b
cgen: remove opt_ok2() part 1 ( #16048 )
2022-10-12 17:20:41 +03:00
yuyi
c590c8250e
cgen: fix fn with optional of multi_return ( #16046 )
2022-10-12 09:44:15 +03:00
Delyan Angelov
7f2d731d19
cgen: fix dump(c_struct), where c_struct has fields of type &&char
2022-10-12 09:00:16 +03:00
shove
9569c0504c
cgen: fix map with optional or result on return ( #16044 )
2022-10-12 07:54:29 +03:00
Rasheed
12d3664a09
builtin: add a declaration for C.putchar ( #16037 )
2022-10-11 20:53:12 +03:00
shove
4c0ea67137
cgen: fix map with optional or result ( fix #15972 ) ( #16036 )
2022-10-11 16:33:19 +03:00
Swastik Baranwal
05fc7d3a72
checker: disallow function cast outside unsafe ( #16030 )
2022-10-11 15:46:35 +03:00
Wertzui123
5047058595
stbi: fix memory leak from stbi.load/1 with GC ( #16028 )
2022-10-11 15:19:36 +03:00
yuyi
34f233c93f
cgen: fix generic struct init with generic cast ( #16035 )
2022-10-11 15:00:02 +03:00
yuyi
dab1c8a71d
all: clean up optional and result handling ( #16034 )
2022-10-11 09:23:57 +03:00
shove
34d115d883
cgen: fix wrong when string attributes with quotes ( fix #15194 ) ( #16020 )
2022-10-11 07:48:26 +03:00
shove
eebc82d83a
fmt: fix wrong processing of quotes, when formatting string literals ( fix #16017 ) ( #16018 )
2022-10-10 21:19:34 +03:00
yuyi
8f3f717736
checker: check type mismatch of return match expr ( #16019 )
2022-10-10 19:41:55 +03:00
yuyi
89eb8358cf
checker: fix fn returning ![]string called in main ( #16023 )
2022-10-10 19:41:24 +03:00
Thomas Peißl
0f229874a2
net.mbedtls: add explicit closing of the tcp connection in the shutdown method ( #16027 )
2022-10-10 19:30:58 +03:00
Delyan Angelov
82593338fa
ci: fix v -usecache -o x cmd/v on macos
2022-10-10 16:01:04 +03:00
Delyan Angelov
14923123ad
ci: skip const_fixed_array_containing_references_to_itself_test.v on windows-msvc
2022-10-10 13:30:35 +03:00
Delyan Angelov
d4e89de8fb
ci: fix v -cstrict -cc gcc vlib/v/gen/native/macho_test.v
2022-10-10 13:28:18 +03:00
Delyan Angelov
2a4604b5f9
Revert "examples: fix viewer example (use the new stbi.load_from_memory_with_channels) ( #16004 )"
...
This reverts commit bce420c34d .
2022-10-10 11:37:36 +03:00
Delyan Angelov
fa20d797a5
Revert "examples: increase the window size of drag_n_drop.v a little (test CI)"
...
This reverts commit 8fc166d5a3 .
2022-10-10 10:39:58 +03:00
Delyan Angelov
3c25f506ed
Revert "stbi: fix loading image from memory ( #15981 ); breaks UI's rectangle example on macos, probably others too"
...
This reverts commit 07d5612347 .
2022-10-10 10:39:32 +03:00
Delyan Angelov
8fc166d5a3
examples: increase the window size of drag_n_drop.v a little (test CI)
2022-10-10 04:04:27 +03:00
Delyan Angelov
a7b2b3c70e
ci: fix ci.yml (add the second missing required run: line to a task)
2022-10-10 03:48:20 +03:00
Delyan Angelov
ade8fdff69
vfmt: fix v -W ./cmd/tools/vfmt.v, (and v -W build-examples)
2022-10-10 03:44:11 +03:00
Delyan Angelov
a4e8b9cabe
ci: fix ci.yml (add missing required run: line to a task)
2022-10-10 03:43:00 +03:00
Aftab Alam
345d4d60e5
readme: add hyperlink to the vlang.io site, to the logo image ( #16014 )
2022-10-10 02:53:33 +03:00
yuyi
32ab08287c
checker: add a notice about skipping the generic route methods of vweb apps ( #16013 )
2022-10-10 02:50:10 +03:00
Niraj Kulkarni
553315b80c
gx: add documentation for Color methods ( #16010 )
2022-10-10 02:47:55 +03:00
shove
8666ef43fd
cgen: fix dependency order error between sumtype and fixed array type ( fix #16003 ) ( #16009 )
2022-10-09 12:16:50 +03:00
ChAoS_UnItY
95f57e9206
builtin: deprecate array.reduce in favour of arrays.fold ( #16001 )
2022-10-09 10:29:50 +03:00
yuyi
fe6197fe2d
fmt: remove comma inside map_init using multi_line ( #16007 )
2022-10-09 08:39:30 +03:00
shove
e2398cafd2
cgen: fix str() fails when the structure 'charptr' type field is nil ( fix #15970 ) ( #16002 )
2022-10-09 08:33:45 +03:00
penguindark
bce420c34d
examples: fix viewer example (use the new stbi.load_from_memory_with_channels) ( #16004 )
2022-10-09 08:30:02 +03:00
Delyan Angelov
54197121bc
sokol.sapp: remove update_cursor from EventType, since it is no longer defined in Sokol, fixes examples/gg/drag_n_drop.v
2022-10-08 22:01:22 +03:00
shove
cd96a43030
fmt: fix unreasonable wrap after if in if very_long && condition { ( fix #15635 ) ( #15995 )
2022-10-08 19:31:00 +03:00
yuyi
ce1ba2ad02
checker: check fn returning fn type mismatch ( fix #15988 ) ( #15997 )
2022-10-08 19:28:41 +03:00
Swastik Baranwal
49aac93d87
checker: disallow literals on the left side of assignments ( #15999 )
2022-10-08 19:27:30 +03:00
yuyi
91e641a422
parser: fix map init with multi enum keys ( fix #15965 ) ( #15991 )
2022-10-08 18:56:02 +03:00
Delyan Angelov
754c387d1b
cgen,checker: support simple voidptr casts in consts, without delaying the initialisation to _vinit ( #15996 )
2022-10-08 13:14:26 +03:00
yuyi
272b3cf8c3
checker: check undefined operation of the generic infix expr ( #15987 )
2022-10-08 12:09:32 +03:00
yuyi
4eeb45b94e
vpm: stop and output an error message after parsing the v.mod file failed ( #15994 )
2022-10-08 11:33:49 +03:00
Swastik Baranwal
267cd5569a
vpm: replace println with eprintln, for printing error output ( #15992 )
2022-10-08 11:32:31 +03:00
locriacyber
07d5612347
stbi: fix loading image from memory ( #15981 )
2022-10-07 17:20:35 +03:00
yuyi
03f82d5f68
cgen: fix generic for_in using iteration ( #15979 )
2022-10-06 18:20:38 +03:00
yuyi
73e28ec523
checker: fix infering fn type using reference argument ( #15978 )
2022-10-06 17:25:02 +03:00
Delyan Angelov
88d69d7d54
cgen,pref,preludes: implement v -assert continues file_test.v ( #15976 )
2022-10-06 17:20:32 +03:00
Larpon
58bf2838c0
builder: exclude LDFLAGS in .o builds ( #15977 )
2022-10-06 17:18:48 +03:00
Joe Conigliaro
87a364ff24
cgen: remove condition no longer needed after #15944
2022-10-06 17:15:15 +11:00
Joe Conigliaro
3eff20c5fd
checker,cgen: small optimizations for previous commit
2022-10-06 17:03:48 +11:00
Joe C
18f0040388
checker/gen/parser: varg with pointer type fix : #15943 ( #15944 )
2022-10-06 15:58:07 +11:00
yuyi
f0871b87a4
term: fix errors in input_windows.c.v ( #15966 )
2022-10-05 13:24:22 +03:00
yuyi
6ccdf89546
cgen: fix vweb using generic method ( fix #15888 ) ( #15963 )
2022-10-05 13:23:47 +03:00
Alexander Medvednikov
46138a2841
cbuilder: more clear fn name
2022-10-05 08:51:52 +03:00
ChAoS_UnItY
acbfe88dd9
arrays, maps: cleanup comments and parameter names in function signatures ( #15960 )
2022-10-04 10:07:36 +03:00
kahsa
40cbd68272
sqlite: add a sqlite.is_error() helper ( #15964 )
2022-10-04 10:03:59 +03:00
Swastik Baranwal
267e26ba1d
net: add unsafe block to int -> enum cast ( #15961 )
...
Fixes https://github.com/vlang/v/issues/15959
2022-10-03 21:56:06 +03:00
Spydr
6ac9552d39
native: support simple library calls ( #15958 )
2022-10-03 17:49:22 +03:00
Swastik Baranwal
9fc64de94b
openssl: add unsafe blocks to int -> enum blocks ( #15957 )
2022-10-03 16:32:37 +03:00
shove
dc2ba1c33f
ast, parser, fmt: fixed and optimized comments for 'for, for_c, for_in stmts' ( fix : #15922 ) ( #15950 )
2022-10-03 10:45:11 +03:00
ChAoS_UnItY
ffaca82ff8
arrays, maps: add indexed variant of collection function and minor cleanup ( #15948 )
2022-10-03 10:42:36 +03:00
Spydr
5b59171a00
checker, native: Check arguments of native builtin functions ( #15952 )
2022-10-03 10:41:59 +03:00
Delyan Angelov
c655847dfb
native: fix notices when building cmd/tools/builders/native_builder.v
2022-10-02 22:48:06 +03:00
Swastik Baranwal
b584e1df98
checker: allow EnumName(number) casts only inside unsafe{} blocks ( #15932 )
2022-10-02 22:39:11 +03:00
Spydr
7993f0bf39
native: support for compile-time conditionals ( #15949 )
2022-10-02 22:31:59 +03:00
Delyan Angelov
b83d0281e4
checker: make the "reference field must be initialised" warning more informative, fix clipboard (used by ui)
2022-10-02 16:24:15 +03:00
yuyi
b158da398b
parser: fix checking for duplicate main functions ( #15946 )
2022-10-02 12:14:25 +03:00
Delyan Angelov
ed2960a20e
sokol.sapp: fix compilation of gg apps with -prod (add typedef tags to Sokol's C struct declarations)
2022-10-02 12:10:35 +03:00
Delyan Angelov
35368b5721
checker: small cleanup in Checker.check_ref_fields_initialized
2022-10-02 12:10:35 +03:00
Delyan Angelov
eec126e26c
vfmt: run v fmt -w vlib/v/gen/native/tests/
2022-10-02 12:10:34 +03:00
ChAoS_UnItY
20f5eef2dc
maps: add a maps module, with generic filter, flatten, invert, to_map, to_array, from_array functions ( #15945 )
2022-10-02 10:59:13 +03:00
Swastik Baranwal
8a38bc2324
fmt: keep volatile qualifier in global declarations ( #15947 )
2022-10-02 10:50:16 +03:00
lemon
a7ad64033e
native: support assigning to struct fields ( #15938 )
2022-10-01 14:42:26 +03:00
shove
5dae5b2a92
checker: fix references for alias type, that could still be uninitalized ( fix #15935 ) ( #15940 )
2022-10-01 14:40:55 +03:00
Delyan Angelov
17b07273aa
cbuilder: remove forgotten dump(), simplify o_postfixes
2022-10-01 14:00:35 +03:00
Delyan Angelov
90599c7f85
cbuilder: fix hardcoded v_parallel for -parallel-cc, use a sync.pool for the compilation threads
2022-10-01 13:50:47 +03:00
yuyi
aa02a9cd3b
checker: fix checking mismatch of the fn array decompose argument ( #15934 )
2022-10-01 13:25:24 +03:00
yuyi
f6a68003d3
ci,parser: fix error in v_parser_test.v ( #15936 )
2022-10-01 13:18:46 +03:00
ChAoS_UnItY
fe597b7172
encoding.utf8: add is_number ( #15931 )
2022-10-01 11:01:51 +03:00
Alexander Medvednikov
3d2588f101
cgen: parallel cc for much faster compilation using all CPU cores
2022-10-01 10:04:06 +03:00
yuyi
be7b0f1dc5
checker: check mismatch of the fn array decompose argument ( #15929 )
2022-10-01 06:50:28 +03:00
Spydr
43d0d0f322
native: skip linking when no library functions get called ( #15930 )
2022-10-01 06:47:16 +03:00
lemon
d78dfabfe0
native: support casting integer to/from enum values ( #15928 )
2022-09-30 15:53:17 +03:00
yuyi
d694a26f39
checker, cgen: fix go print ( #15927 )
2022-09-30 15:50:54 +03:00
shove
b6bbbcf2e7
cgen: fix error when defer inside comptime if {} else {} ( fix #15891 ) ( #15911 )
2022-09-30 10:10:34 +03:00
yuyi
659bd1a428
ast, checker, cgen: fix generic fn/method with comptime for/if ( fix #15905 ) ( #15910 )
2022-09-30 09:40:30 +10:00
shove
63578e63c6
fmt: fix comments between for and { is wrong ( fix #15918 ) ( #15919 )
2022-09-29 15:26:27 +03:00
Tim Marston
711bb6def7
gg: rename Context.set_cfg() -> Context.set_text_cfg() ( #15904 )
2022-09-29 15:24:16 +03:00
Larpon
2d08950e4c
changelog: add entry for #15912 no need for [console] on Windows ( #15924 )
2022-09-29 15:20:19 +03:00
Larpon
816e9319d7
cgen: remove the need for [console] for gg or ui programs on windows ( #15912 )
2022-09-29 15:02:50 +03:00
Mehmet Ali
79a473f8ec
vweb: fix a typo in the README.md ( #15913 )
...
* Fix typo
* Update vlib/vweb/README.md
Co-authored-by: JalonSolov <JalonSolov@gmail.com >
Co-authored-by: Delyan Angelov <delian66@gmail.com >
Co-authored-by: JalonSolov <JalonSolov@gmail.com >
2022-09-29 14:29:02 +03:00
Delyan Angelov
6fcab013eb
os.notify: fix sizeof(C.epoll_event) == 12 with tcc (was 16, while with gcc/clang it is 12)
2022-09-29 13:27:07 +03:00
Delyan Angelov
3b420a8d7f
net.urllib: add a URL.debug() method, returning the values of all the URL's fields
2022-09-29 10:38:11 +03:00
shove
e2cf403ca1
fmt: fix error when comments inside if and condition. ( fix #15914 ) ( #15915 )
2022-09-29 09:14:11 +03:00
Swastik Baranwal
1ff1f23d9a
parser: disallow using attributes on embedded structs ( #15901 )
2022-09-28 17:15:33 +03:00
shove
1ac3f3d8dc
parser: fix pos error when define reference array type ( fix : #15907 ) ( #15909 )
2022-09-28 17:13:29 +03:00
TSURUTA Takumi
e72d259903
change Values struct to public ( #15902 )
2022-09-28 16:21:33 +03:00
yuyi
be6741195d
parser: fix formating fn with variadic argument ( #15900 )
2022-09-28 10:55:36 +03:00
Tim Marston
66249b8c45
gg: radius_to_segments() should use Context.scale ( #15906 )
2022-09-28 10:40:40 +03:00
spaceface
b85a535bcd
cgen: support closures on riscv ( #15898 )
2022-09-28 10:34:26 +03:00
yuyi
bdf4c679da
cgen: minor cleanup in method_call() ( #15894 )
2022-09-27 20:05:04 +03:00
yuyi
57e4ba4cd0
checker: fix generics interface with generic sumtype ( fix #15883 ) ( #15892 )
2022-09-27 16:33:34 +03:00
lemon
f1216090f7
native: support enum ( #15895 )
2022-09-27 13:31:54 +03:00
Joe Conigliaro
51a92d170f
encoding.base32: vfmt code
2022-09-27 16:29:44 +10:00
Joe Conigliaro
5415c4f75e
encoding.base32: initial implementation
2022-09-27 16:25:50 +10:00
yuyi
385acb448a
cgen: fix dumping c structs ( fix #15878 ) ( #15885 )
2022-09-26 10:53:21 +03:00
yuyi
959eeaf1f3
parser: check undefined variable in if guard ( #15882 )
2022-09-26 10:17:39 +03:00
kahsa
8623186d31
doc: add links to vlib doc - array and map ( #15881 )
2022-09-26 10:06:54 +03:00
Dominik Pytlewski
721328ef58
os: fix os.read_file and os.read_bytes for 0 sized /proc/ files on Linux ( fix #15852 ) ( #15853 )
2022-09-25 22:54:46 +03:00
Nicolas VENTER
50820105a1
docs: call_v_from_c example ( #15844 )
2022-09-25 22:52:40 +03:00
Subhomoy Haldar
7f23abbf8c
docs: document the [noinit] attribute with an example ( #15876 )
2022-09-25 19:36:01 +03:00
Spydr
3674baab23
native: support escape sequences in string literals ( #15877 )
2022-09-25 17:47:49 +03:00
Tim Marston
089e89f865
gg: improve arc/slice drawing ( #15856 )
2022-09-25 15:22:10 +03:00
shove
58f7342465
cgen: fix array appending when array is used as fn parameter ( fix : #15855 ) ( #15860 )
2022-09-25 13:05:54 +03:00
Delyan Angelov
6637db2d6d
tools: fix sporadic CI failures on the doom-regressions job due to v gret
2022-09-25 11:27:13 +03:00
yuyi
50fb5de926
checker: fix dumping match expr ( #15869 )
2022-09-25 11:21:14 +03:00
Delyan Angelov
5cc9d7b347
checker: remove too vague notice about signed expressions while returning unsigned number types
2022-09-25 11:03:23 +03:00
yuyi
c3548c9413
tests: omit testsuite_begin/end() optional ( #15871 )
2022-09-25 10:29:25 +03:00
Spydr
947a1f2c65
native: add printing support for boolean and string variables ( #15868 )
2022-09-25 10:28:26 +03:00
Delyan Angelov
f338dec5c6
ci: fix compilation on FreeBSD (C.feof is a macro there, that expands to direct field access)
2022-09-24 10:17:32 +00:00
yuyi
d624ad50a7
os: fix file.read() ( #15861 )
2022-09-24 08:58:55 +03:00
Alexander Medvednikov
91c6e1a65b
changelog: 0.3.2
2022-09-24 02:13:10 +03:00
shove
13d7f7db8f
parser: fix line number error of comptime atExpr in the last token of the line ( fix : #15672 ) ( #15851 )
2022-09-24 00:06:07 +03:00
yuyi
c811b5343a
cgen: minor cleanup in return_stmt() ( #15854 )
2022-09-23 23:46:15 +03:00
yuyi
41fd02496a
cgen: fix const expr using optional or result ( #15850 )
2022-09-23 22:36:56 +03:00
Delyan Angelov
1f26e3fb1b
datatypes: add a forward iterator for LinkedList<T>, add forward and backward iterators for DoublyLinkedList<T>. Add tests for both.
2022-09-23 22:29:13 +03:00
Delyan Angelov
a6576bec1d
json: fix encoding of structs with pointers; add test
2022-09-23 14:07:53 +03:00
ChAoS_UnItY
ea8b30fd91
encoding.utf8: add is_space ( #15847 )
2022-09-23 10:34:45 +03:00
shove
6ec931c781
sync: fix C.pthread_mutex_t struct typedef is missing in darwin ( fix : #15491 ) ( #15845 )
2022-09-23 09:48:05 +03:00
spaceface
5c716afb39
net.ssl: switch to mbedtls over openssl ( #15841 )
2022-09-22 16:50:34 +03:00
yuyi
44c3fcecd9
cgen: fix reference embed method call ( #15842 )
2022-09-22 13:53:11 +03:00
Carl Xiong
78f8b9eb28
v.scanner: fix an unicode string escape handling bug ( #15834 )
2022-09-22 13:44:55 +03:00
Alfie Ranstead
27305d1a5f
net.websocket: swap unsafe use of nil for a safe default value ( #15836 )
2022-09-22 08:00:03 +03:00
yuyi
41dbd12bc4
tests: make error handling the same as the main function ( #15825 )
2022-09-21 19:45:43 +03:00
flopetautschnig
391ac12fe2
datatypes: adding ringbuffer ( #15818 )
2022-09-21 19:42:59 +03:00
Delyan Angelov
09411128af
json.cjson: add a test case for more complex json object construction
2022-09-21 17:22:42 +03:00
Delyan Angelov
21c5cadc59
tools: fix v install https://some/url_with_underscores (make --git the default for URLs)
2022-09-21 15:44:49 +03:00
shove
0871eca177
tests: add test for using reference of map type as struct field (PR #15828 ) ( #15830 )
2022-09-21 12:20:19 +03:00
spaceface
201598e68a
builtin: fix gc.o compilation on macos ( #15832 )
2022-09-21 12:19:02 +03:00
Delyan Angelov
d848311fe2
tests: add missing script_with_no_extension, add exception for /tmp.* files in .gitignore
2022-09-20 16:17:21 +03:00
Annie
8f7958273b
compiler: add -raw-vsh-tmp-prefix tmp flag, to allow for executing scripts without .vsh extension ( #15829 )
2022-09-20 15:52:18 +03:00
spaceface
453cc41c32
builder: remove outdated tcc error ( #15833 )
...
This was introduced when we enabled the GC by default,as a suggestion
for resolving C errors caused by the user having an outdated TCC clone.
However, now that several months have passed, it is very unlikely that
people still have out-of-date copies of TCC, and instead it is more likely
that this error message is hiding the true cause of some C errors unrelated
to TCC or the GC.
2022-09-20 15:12:39 +03:00
shove
bbf1ba458e
cgen: fix using reference of sumtype or map as struct field ( fix : #15827 ) ( #15828 )
2022-09-20 13:22:08 +03:00
Wertzui123
a9d63d729e
sokol.sapp,gg: add a tool_type field to gg.TouchPoint (differenciate different types of touch input) ( #15822 )
2022-09-20 13:15:38 +03:00
Delyan Angelov
993802f6a6
markused: fix compilation of gg programs with -skip-unused, add test to prevent regressions ( #15821 )
2022-09-20 08:03:03 +03:00
Swastik Baranwal
42059ee099
checker: disallow array append as expression in .map and `.filter methods ( #15823 )
2022-09-20 07:30:30 +03:00
Delyan Angelov
69c9d47a40
pref,os,sokol,cgen: ease compilation of 2048 with -os wasm32_emscripten ( #15820 )
2022-09-20 00:17:13 +03:00
yuyi
e6e3751980
checker: fix generics with pointer index ( fix #15810 ) ( #15815 )
2022-09-19 22:02:49 +03:00
yuyi
a0d647d1e3
checker: clean up checking optional and result in checker.v ( #15817 )
2022-09-19 14:52:27 +03:00
shove
84bc170720
checker: optimize the position of the propagation error, where a fn needs to return an optional or result( fix #15780 ) ( #15813 )
2022-09-19 14:49:23 +03:00
Ikko Ashimine
0ff53d18c1
v.gen.js: fix typo in js.v ( #15812 )
2022-09-19 10:22:24 +03:00
Delyan Angelov
5c21b83044
cgen: skip generating typedef HANDLE __v_thread on windows, when -no-builtin is given
2022-09-19 09:14:25 +03:00
Delyan Angelov
d7758b2995
checker: fix slow compilation of vtl/nn/examples/mnist.v (reduce RAM usage)
2022-09-18 21:43:44 +03:00
Delyan Angelov
04f818fefc
ci: cleanup paths-ignore: usage in ci_sanitized.yml and native_backend_tests.yml
2022-09-18 18:47:41 +03:00
shove
202585e175
checker, parser, fmt: fix visibility of anon struct in different modules.( fix #15763 ) ( #15787 )
2022-09-18 18:08:33 +03:00
yuyi
0ff74dae63
vrepl: simplify and cleanup vrepl ( #15807 )
2022-09-18 18:07:16 +03:00
yuyi
57d583d821
cgen: fix array insert in fn as mut receiver ( #15806 )
2022-09-18 14:55:28 +03:00
frittex
24ea6dfe14
docs: add note that clang is required ( #15802 )
2022-09-18 14:22:01 +03:00
yuyi
8d2b0d4afd
parser: fix error for match expr with 'fn' ( #15805 )
2022-09-18 14:17:13 +03:00
yuyi
c78344ef04
vrepl: fix output errors ( fix #15801 ) ( #15804 )
2022-09-18 14:09:31 +03:00
Delyan Angelov
d67aa8d76c
checker: improve the wording of the mismatched range types error
2022-09-17 21:05:30 +03:00
shove
bd3c9e888d
checker: fix missing checker error for fn abc() u64 { return -1 } ( fix #15789 ) ( #15795 )
2022-09-17 20:59:52 +03:00
yuyi
085a09ebdb
vrepl: fix output error of print and fn call ( #15796 )
2022-09-17 15:58:53 +03:00
Delyan Angelov
afe7166346
v.builder: add -Wno-write-strings for tcc on -cstrict
2022-09-17 15:38:06 +03:00
yuyi
de636dbb2b
checker: check result type method call ( #15794 )
2022-09-17 11:45:13 +03:00
yuyi
26443cf9fa
vrepl: fix array method call errors ( fix #15769 ) ( #15786 )
2022-09-17 10:12:01 +03:00
Delyan Angelov
a3b60e6b55
checker: improve mismatched range types error messages
2022-09-17 09:15:55 +03:00
Delyan Angelov
fda39bfb82
docs: enhance the .vsh section, as well as the description of the V's script mode (no fn main(){}) ( #15788 )
2022-09-17 00:21:31 +03:00
shove
289f8f2f24
checker: fix nested struct ref field init check for embedded structs ( fix #15768 ) ( #15785 )
2022-09-16 23:39:15 +03:00
Delyan Angelov
0992914bd6
ci: remove macos-10.15 runner (affected by a brownout, and scheduled to be removed in 12/1/2022)
...
See: https://github.com/actions/runner-images/issues/5583
The brownouts for this runner image, will get increasingly more frequent.
2022-09-16 21:01:52 +03:00
Carl Xiong
0b6924ebfb
cgen: fix hardcoded app param name in code generated for vweb.html ( #15766 )
2022-09-16 17:27:58 +03:00
lemon
7f30519544
native: support method definition and call ( #15736 )
2022-09-16 16:31:05 +03:00
yuyi
0e49ce427e
cgen: fix passing sumtype parameter in sumtype matching results ( fix #15078 ) ( #15767 )
2022-09-16 10:16:40 +03:00
Delyan Angelov
f922ed0941
tests: unify all temporary files/folders under $VTMP/v, that can be cleaned by v wipe-cache ( #15774 )
2022-09-16 04:56:19 +03:00
Delyan Angelov
7e69619add
builtin, compiler: replace isnil(x) calls with x == unsafe { nil } (a little faster without -prod) ( #15759 )
2022-09-15 14:59:37 +03:00
Swastik Baranwal
f09197b972
cgen: fix printing and dumping of struct having referenced interface as field ( #15765 )
2022-09-15 12:43:23 +03:00
shove
566a61b136
checker: fix check omission in cast string to char. ( fix #15760 ) ( #15764 )
2022-09-15 09:33:38 +03:00
shove
8b962f8446
checker: fix nested struct reference type field initialized check. ( fix : #15741 ) ( #15752 )
2022-09-15 07:59:31 +03:00
yuyi
5719344653
checker: fix struct init with update of mutable receiver ( #15758 )
2022-09-14 19:46:05 +03:00
yuyi
ea4152ee14
checker: add a test for fn call arg of fn pointer mismatch ( #15757 )
2022-09-14 17:46:07 +03:00
yuyi
fd1b3fc861
cgen: fix error of 'in array of sumtype' ( #15756 )
2022-09-14 17:43:16 +03:00
Larpon
0b2841d4ea
docs: add nested map example. Closes #15751 ( #15753 )
2022-09-14 10:32:09 +03:00
yuyi
ac64318890
checker: check casting array to number ( #15750 )
2022-09-13 20:41:20 +03:00
yuyi
840370f345
cgen: minor optimization in if_expr() ( #15748 )
2022-09-13 14:56:09 +03:00
Swastik Baranwal
a3d6a9349d
cgen: make go func with array type work ( #15747 )
2022-09-13 14:53:43 +03:00
shove
f51384c402
cgen: modify the temporary variable name of the previous pr 15744 ( #15745 )
2022-09-13 12:11:03 +03:00
shove
7cff7fb828
cgen: fix f as Fun, where f is type Expr = Fun | int, and struct Fun { f fn (int) int }. ( fix #15730 ) ( #15744 )
2022-09-13 10:19:58 +03:00
yuyi
adc3b25f52
checker, cgen: fix nested if expr with optional or result ( fix #15735 ) ( #15743 )
2022-09-13 10:09:12 +03:00
yuyi
e51f0be6db
checker: check taking the address of map field outside unsafe block ( #15737 )
2022-09-13 10:04:21 +03:00
Sanath Kumar U
ac6167565e
docs:Update docs.md to include instructions on upgrading V ( #15733 )
...
* Updated docs.md to include instructions on upgrading V
Updated docs.md to include instructions on upgrading V to latest version.
* changes to fix the error message "./doc/docs.md:27:116: error: must be less than 100 characters"
2022-09-12 18:26:10 +03:00
yuyi
17b54cde97
checker: fix match with complex sumtype exprs that adding print ( #15728 )
2022-09-12 13:55:34 +03:00
yuyi
b4494f921a
ast: fix dumping sumtype of fntype ( #15734 )
2022-09-12 13:45:29 +03:00
shove
550b27b014
checker: fix recursive define check is missing when defining sumtype. ( fix #15684 ) ( #15718 )
2022-09-11 15:17:38 +03:00
shove
be0dc0e537
checker: fix check omission in cast string to ptr. ( fix #14921 ) ( #15721 )
2022-09-11 13:54:56 +03:00
Delyan Angelov
3e599a1436
ci: ignore vlib/v/tests/inout/vscript_using_generics_in_os.vsh in v test-cleancode on windows for now
2022-09-11 11:18:01 +03:00
shove
8b5f3aa970
checker: fix inner functions are called before definition. ( fix #15673 ) ( #15719 )
2022-09-11 11:10:47 +03:00
lemon
aa3651fa58
native: add initial implementation of simple structs ( #15722 )
2022-09-11 11:05:12 +03:00
Delyan Angelov
e03ca2026b
checker: fix generic fns usage in implicitly imported os in .vsh script mode
2022-09-11 10:47:47 +03:00
yuyi
7eb36789ac
checker, cgen: fix nested match expr with optional or result type ( #15717 )
2022-09-10 11:44:22 +03:00
shove
bce1039c9c
cgen: fix missing type name when anonymous struct is used as parameter. fix #15698 ( #15699 )
2022-09-10 09:35:42 +03:00
Spydr
b429aad63b
native: add struct representing elf headers ( #15716 )
2022-09-10 09:29:46 +03:00
Louis Schmieder
f249feb9da
orm: support parenthesized expressions as in select from User where (name == 'Sam' && is_customer == true) || id == 1 ( #15693 )
2022-09-09 21:08:48 +03:00
yuyi
61a4b469a3
cgen: fix nested match expr with optional or result ( #15713 )
2022-09-09 18:23:56 +03:00
Delyan Angelov
e7725bb340
ci: enable again failing on Doom visual mismatches. Increase Xvfb screen size in c2v.yml (better see Doom screenshots when there is a difference)
2022-09-09 17:51:03 +03:00
shove
ca36284612
fmt: fix anonymous struct in parameter with invalid type name. fix #15696 ( #15711 )
2022-09-09 14:44:49 +03:00
Swastik Baranwal
6db5781d53
checker: add checks for .map(opt_fn_name) and .filter(opt_fn_name) ( #15687 )
2022-09-09 12:24:57 +03:00
yuyi
0f3a395ca2
checker, cgen: fix if expr with result ( #15709 )
2022-09-09 11:29:21 +03:00
yuyi
71f5f7f3a7
cgen: fix if expr with fn call result ( #15702 )
2022-09-08 22:39:49 +03:00
yuyi
ec2ca38adb
checker, cgen: fix match expr with result ( #15706 )
2022-09-08 21:24:16 +03:00
Ken
1738641567
cgen, checker, ast: add syntax support for reference x in for x in &somearrary { and for x in &somemap { loops ( #15678 )
2022-09-08 13:36:40 +03:00
flopetautschnig
9641ced901
vweb.csrf: add a README.md, correct doc comments for public functions ( #15697 )
2022-09-08 13:20:29 +03:00
yuyi
5c900e23de
cgen: fix const aliases of bytes fixed array ( #15701 )
2022-09-08 13:19:02 +03:00
Delyan Angelov
fc8e3d0971
builtin,strconv: speedup str.int() conversions (without -prod)
2022-09-08 11:28:19 +03:00
yuyi
a462610376
ast: minor optimization in sumtype_check_function_variant() ( #15694 )
2022-09-08 09:20:30 +03:00
shove
a75a12ec1e
checker: fix const variable type error when global variable with the same name exists ( fix #15686 ) ( #15689 )
2022-09-07 19:06:45 +03:00
Emin Arıcan
7672725204
net: fix typo ( #15688 )
2022-09-07 16:35:28 +03:00
yuyi
8627af18dd
table: check sumtype of fntype assign error ( #15685 )
2022-09-07 16:05:38 +03:00
yuyi
2693935066
checker: check non generic struct used like a generic one ( #15690 )
2022-09-07 14:53:43 +03:00
Delyan Angelov
c5ed179e76
arrays: remove deprecation from arrays.concat/2; it is a useful abstraction for operating on immutable arrays
2022-09-07 13:25:40 +03:00
Hitalo Souza
21b2a9841a
examples: js_dom_draw_bechmark_chart ( #15518 )
2022-09-07 01:55:32 +03:00
yuyi
ca99a1d355
cgen: fix sumtype with fntype using fn directly ( fix #15674 ) ( #15679 )
2022-09-06 20:33:39 +03:00
flopetautschnig
1c63ce479c
vweb: adding a vweb.csrf protection module ( #15586 )
2022-09-06 13:18:39 +03:00
Hitalo Souza
95a328be98
orm: improve the README and the tests. Add an error message for foreign key tags ( #15670 )
2022-09-06 13:12:37 +03:00
yuyi
e3d3863fbe
cgen: refactor need_tmp_var_in_expr/match() ( fix #15675 ) ( #15676 )
2022-09-06 13:09:28 +03:00
shove
862d91ed0a
checker: check for name conflicts between const and __global variables ( fix #15668 ) ( #15669 )
2022-09-05 18:58:30 +03:00
yuyi
6fd22531a9
cgen: fix if expr with index expr ( #15666 )
2022-09-05 18:55:53 +03:00
yuyi
d649f5aff4
checker, cgen: fix go call fn using map value ( #15665 )
2022-09-05 17:16:28 +03:00
Seven Du
90c2c5b8a4
token: add @FILE_LEN ( #15661 )
2022-09-05 17:00:35 +03:00
yuyi
d0d5f1d4e0
cgen: fix fn variable name using reserved c word ( fix #15647 ) ( #15648 )
2022-09-04 17:50:41 +03:00
Swastik Baranwal
436b19c408
checker: add error for mismatched types and format character for string interpolation ( #15639 )
2022-09-04 14:15:26 +03:00
yuyi
78998a09e4
cgen: fix go call anon fn with closure ( #15656 )
2022-09-04 14:03:24 +03:00
Delyan Angelov
57802aaffc
ci: install xsel and xclip on the jobs where imgur.sh is used
2022-09-04 13:46:27 +03:00
Larpon
0d0c2b278d
vgret: add region support ( #15651 )
2022-09-04 13:39:10 +03:00
jrfondren
45e21bc311
os: remove private unix_environ() helper function, it is not needed anymore ( #15654 )
2022-09-04 13:22:38 +03:00
yuyi
0c84ad847e
cgen: fix match expr with optional ( #15658 )
2022-09-04 13:21:16 +03:00
Delyan Angelov
cee8b38221
ci: disable job failure on doom picture regressions for now
2022-09-04 13:04:02 +03:00
Delyan Angelov
dd78620b31
cgen: fix [packed] struct support for tcc
2022-09-04 07:14:01 +03:00
yuyi
5e1a2f6f50
checker: check if guard with multiple return variable ( #15646 )
2022-09-03 10:56:46 +03:00
yuyi
a5aad6f791
cgen: fix alias of map delete ( #15644 )
2022-09-03 10:41:53 +03:00
yuyi
1ef95fdec6
cgen: fix assert value is '*unknown value*' ( #15645 )
2022-09-03 10:38:27 +03:00
Davide Beatrici
4bd49a0149
ci: run more tests on the FreeBSD Cirrus runner ( #15602 )
2022-09-01 21:56:43 +03:00
yuyi
42e582804e
checker: check fn variadic passing arg error ( fix #15629 ) ( #15632 )
2022-09-01 21:24:24 +03:00
yuyi
bfdd6f1cf8
csv: minor cleanup in writer.v ( #15633 )
2022-09-01 21:23:18 +03:00
Delyan Angelov
728b198384
os: extract dir_expansions_test.v from os_test.v
2022-09-01 13:07:29 +03:00
Delyan Angelov
0cc0e87051
time: use linux_utc() and linux_now() on freebsd too (more precise, and fixes time_test.v)
2022-09-01 09:54:20 +00:00
Davide Beatrici
23e8fca4f9
native: fix order and add missing path in find_o_path() ( #15622 )
...
This fixes the linker failing when:
- 32 bit libraries exist in "/usr/lib".
- 64 bit libraries are in "/usr/lib64" and not "/usr/lib/x86_64-linux-gnu".
2022-09-01 10:21:35 +03:00
Wertzui123
95760ae82a
CHANGELOG.md: fix typo (paralell -> parallel) ( #15621 )
2022-09-01 09:26:05 +03:00
yuyi
5e8f9b11c9
checker: check casting voidptr to generic struct ( fix #15618 ) ( #15626 )
2022-09-01 09:22:37 +03:00
Alexander Medvednikov
f2f6ea5969
V 0.3.1
2022-08-31 19:24:57 +03:00
Louis Schmieder
fef26a0b19
fmt: fix striping modules prefix in orm ( #15005 )
2022-08-31 19:23:36 +03:00
yuyi
806c39d46e
parser: fix error for match sumtype with fntype ( #15620 )
2022-08-31 18:44:12 +03:00
Louis Schmieder
6110373519
orm: init or implementation ( #14989 )
2022-08-31 14:43:20 +03:00
Haren S
bc06866b20
make: add clock_gettime on macOS < 10.12 ( fix #6605 ) ( #15611 )
2022-08-31 11:03:25 +03:00
yuyi
4d6b8cbfd8
cgen: fix casting sumtype as fntype ( #15612 )
2022-08-31 10:45:47 +03:00
yuyi
64f403e997
cgen: fix dumping shared variable ( #15615 )
2022-08-31 10:42:28 +03:00
yuyi
56135dbdbc
cgen: fix printing reference enum ( #15606 )
2022-08-30 14:24:48 +03:00
Alexander Medvednikov
ba1045e5fd
parser: deprecate inline sum types
2022-08-30 13:18:22 +03:00
yuyi
b154af032b
parser: fix sumtype with multi fntype ( fix #15557 ) ( #15583 )
2022-08-30 12:48:25 +03:00
yuyi
5d4492ac6f
checker: check cast to reference struct ( fix #15590 ) ( #15601 )
2022-08-30 11:42:21 +03:00
crthpl
a9b54e9b98
cgen: add __addr (bootstraps #14818 ) ( #15585 )
2022-08-30 10:28:47 +03:00
lemon
2221dd7058
native: support fncall with 7↑ arguments ( #15599 )
2022-08-30 10:24:37 +03:00
yuyi
0876cf86ed
cgen: fix struct init with update expr ( fix #15595 ) ( #15603 )
2022-08-30 09:22:14 +03:00
yuyi
e355ae7b3c
checker: check generics struct field type error ( #15593 )
2022-08-29 16:55:26 +03:00
Delyan Angelov
9703410391
vfmt: fix formatting of submodules with common prefixes ( fix #15582 )
2022-08-29 15:30:58 +03:00
Larpon
1915bf81d0
ci: use ubuntu-latest for toml tests ( #15591 )
2022-08-29 12:43:50 +03:00
shove
f285ebd91c
smtp: add base64 encoding to the body of the emails and use utf8, to prevent format confusion ( #15589 )
2022-08-29 09:19:46 +03:00
yuyi
72056f36d8
cgen: fix cross assign of fixed array ( #15587 )
2022-08-29 08:50:19 +03:00
Larpon
f23ebb6815
docs: "in over a" -> "in a" ( #15576 )
2022-08-28 20:51:45 +03:00
ChAoS_UnItY
ad76c9c719
checker: fix illegal result propagate on non-result type ( fix #15574 ) ( #15578 )
2022-08-28 13:31:45 +03:00
ChAoS_UnItY
258ff73efd
encoding.csv: re-encapsulate fields in Writer/Reader ( fix #15558 ) ( #15570 )
2022-08-28 11:13:43 +03:00
Hitalo de Jesus do Rosário Souza
797bdd5e98
vweb: document the .query field ( #15572 )
2022-08-28 09:55:18 +03:00
yuyi
06e153d429
ast, cgen: implement sumtype with fntype partly (related #15557 ) ( #15567 )
2022-08-28 09:12:08 +03:00
Delyan Angelov
d75c62b806
checker: allow + operator overrides for type aliases
2022-08-27 12:54:16 +03:00
yuyi
2a03d22a37
ast: clean up table.find_or_register_fn_type() ( #15560 )
2022-08-27 09:32:03 +03:00
ChAoS_UnItY
0b843b801f
checker: fix returning expression with void type ( fix #15543 ) ( #15554 )
2022-08-27 09:00:14 +03:00
ChAoS_UnItY
70de4e1009
checker: fix no error on plus-assigning array ( fix #15544 ) ( #15552 )
2022-08-26 23:11:23 +03:00
yuyi
f45042fa09
checker: improve error message of fn args mismatch ( #15550 )
2022-08-26 22:38:53 +03:00
Delyan Angelov
329670431b
v.pref: skip vlib/builtin/prealloc.c.v, when -prealloc is not passed ( #15553 )
2022-08-26 22:08:42 +03:00
Delyan Angelov
a1e87664f4
ci: minimise work on commits/PRs, that affect only .yml files
2022-08-26 21:07:33 +03:00
Delyan Angelov
511cc2b267
ci: prevent native-backend jobs from separate PRs to cancel each other
2022-08-26 20:58:19 +03:00
lemon
e5c53cf412
native: match expr/stmt ( #15537 )
2022-08-26 15:18:02 +03:00
yuyi
02a47f42f3
ast, parser, cgen: fix closure with nested closure variable ( #15542 )
2022-08-26 13:37:10 +03:00
Subhomoy Haldar
3af12271fb
log: add target_from_label and unit tests ( #15538 )
2022-08-26 07:09:48 +03:00
ChAoS_UnItY
b0e7ddfd97
checker: fix non-bool check on use of result bool ( fix #15539 ) ( #15540 )
2022-08-26 07:08:57 +03:00
StunxFS
b83dd86d65
checker: check error for simple assignment with dumping of multireturn value ( #15512 )
2022-08-26 07:08:05 +03:00
lemon
939e9245db
native: support integer infix arithmetics ( #15536 )
2022-08-26 07:07:15 +03:00
wahur666
dbf28c5bfb
cmd/tools/where: check if parent already included vlib_dir ( #15527 )
2022-08-26 07:04:44 +03:00
yuyi
fc9d2d5d5e
cgen: cleanup generic_fn_name() ( #15531 )
2022-08-26 07:04:10 +03:00
Swastik Baranwal
44137e07b0
datatypes: use generic op overloading for difference and equal ( #15530 )
2022-08-26 07:03:23 +03:00
shove
c10c8ff9e4
parser: fix anon struct name conflict ( #15517 )
2022-08-26 07:01:50 +03:00
tr00
3eb6ad7b8c
os: fix type in error message ( #15533 )
2022-08-26 06:59:52 +03:00
yuyi
40c0a8cbaf
parser, checker, cgen: implement generics anon fn ( #15529 )
2022-08-25 14:12:56 +03:00
shove
723b3d74ee
datatypes: add array() method for LinkedList, DoublyLinkedList, Queue, and Stack ( #15524 ) ( #15525 )
2022-08-25 14:12:39 +03:00
yuyi
c662431cfd
checker: check unsafe array assign ( fix #9651 ) ( #15515 )
2022-08-25 08:52:13 +03:00
yuyi
86496aa191
cgen: fix array init with it ( #15523 )
2022-08-25 08:00:11 +03:00
Delyan Angelov
3ad22eb0dd
checker: show a more detailed error for invalid declarations of generic methods on generic structs.
2022-08-24 13:43:27 +03:00
Delyan Angelov
4718b8b45a
all: unify the displaying of compiler errors, using a common util.show_compiler_message/2 function.
2022-08-24 13:38:47 +03:00
StunxFS
0d8b6ee7f2
checker: don't show manual memory warning twice ( #15510 )
2022-08-24 09:08:35 +03:00
shove
6ff753745f
smtp: send mail to multiple recipients. #15508 ( #15509 )
2022-08-23 20:50:41 +03:00
Subhomoy Haldar
3b42f18dee
os: add input_password(prompt) and unit tests ( #15507 )
2022-08-23 18:17:38 +03:00
Swastik Baranwal
d08edf8cba
vdoc: highlight generic struct everywhere ( #15506 )
2022-08-23 15:21:26 +03:00
Delyan Angelov
3c23eebe51
ci: fix -fsanitize=address for c_array_test.c
2022-08-23 12:16:55 +03:00
yuyi
42c0bae9ce
checker: check unknown array of fn type in struct field ( #15502 )
2022-08-23 11:15:25 +03:00
Larpon
9dd8228f91
arrays: move carray_to_varray from builtin, make it generic ( #15503 )
2022-08-23 11:12:50 +03:00
Alexander Medvednikov
2dde7ff5ba
strconv: deprecate v_sprintf in favor of string interpolation
2022-08-23 09:53:05 +03:00
yuyi
a758b6686c
json: minor cleanup in json_test.v ( #15501 )
2022-08-23 07:59:50 +03:00
yuyi
196b5f8e3a
checker: fix match expr with non last if expr ( #15500 )
2022-08-23 07:58:33 +03:00
Delyan Angelov
98c6dad887
make.bat: add a small delay between del v.exe and move v2.exe v.exe, to make CI runs more robust
2022-08-22 22:08:47 +03:00
Larpon
d40d761e38
toml: support [toml: '...'] attributes ( #15497 )
2022-08-22 20:39:55 +03:00
Larpon
dda475bcc8
builtin: add carray_to_varray, closes #15493 ( #15499 )
2022-08-22 20:15:54 +03:00
Delyan Angelov
a689641c1b
os: rewrite os.walk and os.walk_with_context to use iteration, instead of recursion
2022-08-22 17:27:14 +03:00
Delyan Angelov
21917f5b00
os: small cleanup of needless r'\' usage
2022-08-22 16:32:42 +03:00
Delyan Angelov
e156e6a44a
os: remove commented code in os_windows.c.v
2022-08-22 14:54:38 +03:00
yuyi
d7501cc9a1
cgen: fix if sumtype var is none ( #15496 )
2022-08-22 13:32:27 +03:00
yuyi
18b6311b2f
cgen: fix match sumtyp var with none ( #15495 )
2022-08-22 13:31:35 +03:00
irishgreencitrus
8db945ec52
vpm: force v install to clone git submodules too ( #15487 )
2022-08-22 11:23:32 +03:00
yuyi
47e75c68a9
cgen: fix json.encode of a struct containing a field of an alias type of another struct ( #15490 )
2022-08-22 11:04:58 +03:00
Swastik Baranwal
f727433929
scanner: add check for invalid unicode ( #15485 )
2022-08-22 10:56:51 +03:00
yuyi
6d501b073a
datatypes: make Set's methods public ( #15489 )
2022-08-22 10:16:59 +03:00
Delyan Angelov
661d70a976
ci: run VLS tests with gcc on the main V repo too
2022-08-22 10:10:59 +03:00
Delyan Angelov
24e0a6cff2
checker: fix vls test compilation
2022-08-22 08:42:58 +03:00
yuyi
0d9ac1f59c
checker: improve error message for test function definition ( #15483 )
2022-08-21 16:19:39 +03:00
yuyi
f194d3ca2e
checker: fix generic method with nested generic method ( #15480 )
2022-08-21 14:12:31 +03:00
Delyan Angelov
3656d445ab
Revert "Revert "tools/fast: do not build V with -usecache""
...
This reverts commit ad322f4eb0 .
2022-08-21 10:40:27 +03:00
Delyan Angelov
ad322f4eb0
Revert "tools/fast: do not build V with -usecache"
...
This reverts commit f97a4f1904 .
2022-08-21 08:56:05 +03:00
Delyan Angelov
0b41ff0c6a
v.vcache, v.builder: use the module name inside the usecache paths (for more readable cache entries at a glance) ( #15476 )
2022-08-21 08:55:21 +03:00
Alexander Medvednikov
a069577e9c
builder: remove msvc code from non windows systems
2022-08-21 05:21:31 +03:00
Alexander Medvednikov
12265a15ed
pref: temp hack to make -os cross work when building V
2022-08-21 05:12:58 +03:00
Alexander Medvednikov
f97a4f1904
tools/fast: do not build V with -usecache
2022-08-21 04:40:32 +03:00
Alexander Medvednikov
eb6627fe41
cgen: remove unneeded comments
2022-08-21 01:39:54 +03:00
Delyan Angelov
9932ed9b7e
doc: add a Parameter evaluation order section ( #15473 )
2022-08-21 01:08:38 +03:00
Delyan Angelov
c3568823ee
tests: make vlib/time/private_test.v more robust/tolerant to small fluctuations
2022-08-20 13:56:10 +03:00
Delyan Angelov
499ab9bedb
tests: make tcp_self_dial_from_many_clients_test.v more robust (use shared ctx)
2022-08-20 13:32:59 +03:00
Hitalo de Jesus do Rosário Souza
eafbf335cf
docs: improve vlib/vweb/README.md ( #15146 )
2022-08-20 12:06:24 +03:00
Swastik Baranwal
a1de8f5f98
vdoc: highlight variadic function parameters ( #15474 )
2022-08-20 12:02:50 +03:00
yuyi
0645fe3322
parser: check generic struct init using multi return type ( #15472 )
2022-08-20 11:56:44 +03:00
Delyan Angelov
5cba5920d5
os: make find_abs_path_of_executable_test.v more robust ( fix #15459 )
2022-08-20 10:06:58 +03:00
yuyi
6062708c60
checker: fix comptime if generic value shift ( #15471 )
2022-08-20 08:15:52 +03:00
Alexander Medvednikov
46f32fc10c
checker: require unsafe for free()
2022-08-20 08:03:07 +03:00
yuyi
fa447443ca
cgen: fix push on closed channel ( #15468 )
2022-08-19 19:27:42 +03:00
Alwin Arrasyid
6ed69289a8
tutorials: remove unnecessary json.encode ( #15464 )
2022-08-19 19:27:26 +03:00
yuyi
f10ff0353e
checker, fmt: check infix_expr with 'and' op ( #15466 )
2022-08-19 09:50:46 +03:00
Delyan Angelov
31067d4a6c
ci: ignore changed .md files in native_backend_tests.yml
2022-08-19 09:49:17 +03:00
yuyi
1dc62a5a66
ast: fix string interpolation fmt with result call ( #15467 )
2022-08-19 09:44:59 +03:00
yuyi
ea163197c7
cgen: fix shared optional ( #15462 )
2022-08-18 20:18:03 +03:00
yuyi
6d399c5116
checker: fix struct init with update expr ( fix #9472 ) ( #15460 )
2022-08-18 19:39:41 +03:00
Swastik Baranwal
22a79cfa1e
v doc: add highlighting for new types and fix highlighting for edge cases (#15455 )
2022-08-18 18:06:55 +03:00
irishgreencitrus
cd31108260
cgen: implement '#preinclude' ( #15456 )
2022-08-18 15:59:08 +03:00
yuyi
7227c1d508
scanner: fix false &&!ok1 ( fix #7524 ) ( #15458 )
2022-08-18 11:55:38 +03:00
Larpon
af8bd10761
v.pref: support v -trace-calls run file.v ( #15450 )
2022-08-18 11:45:37 +03:00
yuyi
d3307fd2e3
cgen: minor cleanup in fn_var_signature() ( #15454 )
2022-08-17 18:42:46 +03:00
Delyan Angelov
7ed3389fa8
ci: fix -cstrict checks after 7585e86
2022-08-17 18:40:15 +03:00
Delyan Angelov
18e737aee2
builtin,tests: fix int_test.v on macos, m1
2022-08-17 17:18:10 +03:00
Delyan Angelov
7585e86868
os: reduce heap allocations done by os.real_path, os.executable, os.getwd
2022-08-17 17:06:38 +03:00
Delyan Angelov
0e62344043
tests: make private_test.v more tolerant to small delays
2022-08-17 16:25:46 +03:00
yuyi
e1ebd90190
cgen: fix array of fixed array map/filter/any/all(it[0]) ( fix #15422 ) ( #15445 )
2022-08-17 16:16:08 +03:00
yuyi
9887dd1fbf
cgen: fix go call fn with anon fn argument ( fix #10351 , fix #10270 ) ( #15446 )
2022-08-17 16:12:52 +03:00
ChAoS_UnItY
70f466460f
cgen: fix struct field name generation in auto free ( #15440 )
2022-08-17 09:11:58 +03:00
yuyi
374186f1f7
checker: fix fn call with mut array of aliases arguments ( #15443 )
2022-08-17 08:49:53 +03:00
John
d41b2be3a7
crypt: implement crypto.rand.read/1 for OpenBSD and FreeBSD ( #15437 )
2022-08-17 07:41:27 +03:00
Alexander Medvednikov
8736f26a1c
tutorials: simplify new_article() a bit
2022-08-16 22:20:03 +03:00
Vladimir Myshkovski
9b9115471f
datatypes: Set implementation ( #14853 )
2022-08-16 20:23:48 +03:00
yuyi
b08f500c60
cgen: fix fn_var_signature() when param type is function ( #15436 )
2022-08-16 20:21:58 +03:00
yuyi
dc37386bcc
cgen: minor optimization in return_stmt() ( #15434 )
2022-08-16 20:21:02 +03:00
Markus F.X.J. Oberhumer
77fd1419a7
cgen: avoid another sizeof warning in generated code ( #15435 )
2022-08-16 20:20:13 +03:00
Delyan Angelov
18cccb6caf
builtin: show non zero codes on bubbled error_with_code(msg,code) errors
2022-08-16 18:59:38 +03:00
yuyi
66a3cdec6a
cgen: add fn_var_signature(info ast.FnType, var_name string) string ( #15433 )
2022-08-16 12:57:33 +03:00
Swastik Baranwal
3bc01d696d
cgen: fix []u8 string representation ( #15432 )
2022-08-15 23:48:38 +03:00
Nikolai
3aad5e2a8d
cgen, checker: fix multi line return optional ( #15428 )
2022-08-15 23:43:56 +03:00
yuyi
8be85e7590
cgen: fix shared map delete ( #15431 )
2022-08-15 23:42:57 +03:00
Delyan Angelov
26986eb2f8
tests: fix deprecation warning in tcp_test.v
2022-08-15 15:17:00 +03:00
yuyi
6fdcc5bcd0
checker, cgen: fix closure with fn variables ( fix #15286 ) ( #15427 )
2022-08-15 06:52:08 +03:00
Emily Hudson
90d9b200f9
gc: fix msvc not using libatomic_ops ( #15418 )
2022-08-14 13:16:52 +03:00
Delyan Angelov
8f98f1db9e
os: fix os.open_file('text.txt', 'wb', 0o666), add test ( #15420 )
2022-08-14 09:50:05 +03:00
Delyan Angelov
cae7bc9a9a
examples: add examples/gg/rotating_textured_quad.v
2022-08-14 09:45:25 +03:00
Swastik Baranwal
7280d4c95a
checker: add error for println('x').abcd ( #15423 )
2022-08-14 09:43:54 +03:00
Delyan Angelov
4c0339242a
doc: fix example comment for string.strip_margin()
2022-08-14 08:06:52 +03:00
yuyi
9734148f12
cgen: fix generic with multi-nested generic method call ref argument ( #15421 )
2022-08-13 19:26:00 +03:00
StunxFS
672066b65b
cgen: fix optional indexes with mutable arrays ( #15399 )
2022-08-13 11:58:31 +03:00
Ken
001144fa82
doc: fix a typo in the -no-preludes option description in v help build-c ( #15404 )
2022-08-13 10:07:08 +03:00
Joe Conigliaro
f557acf76b
net.urllib: fix ipv6 address parsing [ipv6]:port closes #15309
2022-08-13 00:50:38 +10:00
StunxFS
657389446b
checker: fix typo ( #15397 )
2022-08-12 17:25:52 +03:00
yuyi
9f2651717a
checker: fix generics with multi nested generic method call ( #15410 )
2022-08-12 17:25:29 +03:00
Hitalo de Jesus do Rosário Souza
b45da86688
examples: refactor vweb_orm_jwt ( #15389 )
2022-08-12 17:24:57 +03:00
yuyi
9c96b13f9b
ast: fix anon fn with nested anon fn argument ( #15415 )
2022-08-12 17:24:23 +03:00
yuyi
70e3c72619
ast: fix expr.str() ( fix #12650 #13312 ) ( #15414 )
2022-08-12 17:24:13 +03:00
yuyi
584597aa3d
checker: check mismatch of return result type ( #15413 )
2022-08-12 17:23:14 +03:00
yuyi
e6606d8670
cgen: fix optional in if expr ( #15411 )
2022-08-12 17:22:27 +03:00
Alexander Medvednikov
09f1eb9ad2
doc: make if debug a bit more clear
2022-08-12 05:10:39 +03:00
Larpon
fd83b95d85
sokol: expose context_pool_size field on sgl.Desc ( #15409 )
2022-08-11 20:49:11 +03:00
yuyi
9e0bf005f7
checker: simplify infer_fn_generic_types() ( #15408 )
2022-08-11 14:25:43 +03:00
yuyi
275a997ec1
vweb: fix vweb static url ( #15396 )
2022-08-11 08:28:47 +03:00
yuyi
32fa475316
markused: fix generic fn mark as used ( fix #15387 ) ( #15406 )
2022-08-11 08:27:20 +03:00
Nikolai
f54e45b77e
json: fix array_fixed encode/decode ( #15398 )
2022-08-11 03:52:56 +03:00
Markus F.X.J. Oberhumer
5095364838
cgen: avoid a compiler warning in generated code ( #15394 )
2022-08-11 03:52:42 +03:00
Delyan Angelov
1c6366eb9c
cgen: fix generated any/filter/all methods for shared array fields
2022-08-10 14:05:33 +03:00
yuyi
78d0255e6c
checker: fix generics with nested generic method call ( #15390 )
2022-08-10 11:29:19 +03:00
Delyan Angelov
c752e5eb3e
checker: add a suggestion for misspelled field names in struct literals
2022-08-10 11:01:43 +03:00
yuyi
d3aa7700c7
cgen: fix shared struct method call ( #15386 )
2022-08-09 12:44:19 +03:00
yuyi
7be9963a41
checker: fix dumping generic fn mut argument ( #15384 )
2022-08-09 07:46:55 +03:00
yuyi
d4b622bdc2
checker: add pref.is_verbose for print_backtrace ( #15385 )
2022-08-09 07:43:59 +03:00
Spydr
27c5ad03f6
native: initial linking support for linux ( #15326 )
2022-08-08 22:32:14 +03:00
StunxFS
a6026fd505
checker: disallow method calls with invalid expressions ( #15337 )
2022-08-08 17:35:24 +03:00
yuyi
9b88feccad
checker: check generic method call argument mismatch ( #15378 )
2022-08-08 17:30:48 +03:00
Delyan Angelov
5a834a2ef9
encoding.base58: remove one unnecessary map access per the most common BTC usages; implement encode_bytes, decode_bytes, encode_walpha_bytes, decode_walpha_bytes functions
2022-08-08 15:37:00 +03:00
yuyi
6a728e1674
cgen: fix shared array.last() ( #15379 )
2022-08-08 13:11:38 +03:00
yuyi
c7152a6ab6
checker: fix generics with nested generic fn call ( #15361 )
2022-08-08 04:54:52 +03:00
Hitalo de Jesus do Rosário Souza
ee9142a113
examples: V orm still fast? ( #15330 )
2022-08-08 04:38:38 +03:00
jrfondren
0b1486f014
http: avoid costly string interpolation of resp.body ( #15376 )
2022-08-08 04:36:45 +03:00
Ikko Ashimine
d74cf084fb
readme: fix a typo ( #15373 )
2022-08-08 03:01:05 +03:00
Vincenzo Palazzo
b01f71d9da
io: migrate the Reader API to Result instead of Option ( #15229 )
2022-08-08 02:33:25 +03:00
l-m
8c33a40c5a
vrepl: implement the 'pin' command from crepl ( #15371 )
2022-08-07 14:06:50 +03:00
Emily Hudson
fd1b6efea6
net: add failed addresses + details on connect errors, make connect more robust in the default non blocking mode ( #15364 )
2022-08-07 10:40:05 +03:00
Swastik Baranwal
d6b594c4e8
checker: check if struct field type isn't type ( #15359 )
2022-08-06 19:11:51 +03:00
yuyi
8d9af2e4a1
cgen: fix nested generic fn call with reference argument ( #15353 )
2022-08-06 19:07:33 +03:00
Delyan Angelov
4588bb44ab
markused: skip panic_result_not_set (generated for fn main(){ foo()! }) too
2022-08-06 10:29:44 +03:00
cstffx
095f4bcf86
orm: add missing 'nonull' attribute description ( #15348 )
2022-08-05 10:27:19 +03:00
yuyi
ab244d2236
checker: cleanup in if_expr() ( #15347 )
2022-08-05 03:02:22 +03:00
yuyi
9e50803071
ast, parser: fix reference typenode ( #15346 )
2022-08-05 03:01:49 +03:00
yuyi
e034b35144
cgen: fix generic interface call with reference argument ( #15345 )
2022-08-05 03:01:11 +03:00
yuyi
d7a3b866ee
checker: check generic interface missing type parameter ( #15344 )
2022-08-04 11:02:34 +03:00
Hitalo de Jesus do Rosário Souza
161ac3434f
examples: serve js ( #15246 )
2022-08-03 13:34:26 +03:00
yuyi
372857c19c
checker: minor cleanup in struct_decl() ( #15325 )
2022-08-03 13:28:53 +03:00
yuyi
2ad25f6d06
checker: fix nested generic fn call ( fix #15328 ) ( #15333 )
2022-08-03 13:24:39 +03:00
Delyan Angelov
77495c8d03
all: support assert condition, extra_message, evaluating and showing extra_message on assert failure ( #15322 )
2022-08-03 01:14:01 +03:00
Subhomoy Haldar
fcde63127f
rand: fix incorrect generic function call ( #15327 )
2022-08-02 20:11:49 +03:00
Sandro Martini
51ef8b62ba
log: cleanup tests ( #15320 )
2022-08-02 18:01:49 +03:00
Spydr
867f500d78
gitignore: ignore valgind vgcore.* debug files ( #15321 )
2022-08-02 17:59:29 +03:00
Delyan Angelov
45c601b79c
cgen: fix sorting of shared array fields ( fix #15244 )
2022-08-02 16:17:11 +03:00
Delyan Angelov
857e047d01
json: tag functions that cgen may call internally for json.encode/json.decode, as [markused]
2022-08-02 11:45:41 +03:00
Nacho Verdón
42efc383d2
encoding.binary: fix function names in comments ( #15317 )
2022-08-02 00:30:06 +03:00
Nacho Verdón
0555894e7f
.github: Add example on PR template title to avoid confusion ( #15311 )
2022-08-01 23:29:04 +03:00
yuyi
ce59fffb53
scanner: make scan_all_tokens_in_buffer() private ( #15312 )
2022-08-01 23:15:56 +03:00
yuyi
7546d1450c
scanner: minor optimization ( #15313 )
2022-08-01 23:09:27 +03:00
Spydr
dab8159b56
native: implement elf section types ( #15316 )
2022-08-01 23:04:59 +03:00
Delyan Angelov
a35356758c
log: make set_level(level Level) part of the log.Logger interface too (fix for discordv)
2022-08-01 15:09:32 +03:00
StunxFS
b08690d151
gen.c: simplify unwrap_generic method ( #15288 )
...
* gen.c: use `nil` instead of `0`
* replace `muttable` => `mut_table`
2022-08-01 11:40:37 +03:00
Spydr
b4fd9b5f92
native: add sections for string- and symbol-tables, reimplement elf program headers ( #15305 )
2022-08-01 10:15:06 +03:00
Nacho Verdón
9561fb406e
encoding.binary: add functions to read/write with an offset and at the end of the array, split files by endianness ( #15301 )
2022-08-01 08:20:14 +03:00
Dialga
dc78f1ba17
szip: update to 0.2.4 ( #15296 )
2022-08-01 00:47:45 +03:00
Delyan Angelov
fa75713bc3
tools: create the vmodules folder, when it does not exist, on v translate hw.c
2022-07-31 15:43:04 +03:00
Delyan Angelov
b8438ded32
markused: support vweb App.before_request() with -skip-unused
2022-07-30 18:56:05 +03:00
yuyi
014f44eab3
checker: improve error message of method_call_arg_no_mut_err.vv ( #15281 )
2022-07-30 18:11:10 +03:00
Davide Beatrici
c9a5896468
bultin: always enable GC_THREADS, even with -d dynamic_boehm, otherwise multithread operation is unsafe ( #15275 )
...
According to upstream documentation, only GC_WIN32_THREADS is explicit.
This PR fixes a random memory corruption(s) with "-d dynamic_boehm" on OpenMandriva.
1679adc04d .log
```
DEBUG: + VFLAGS='-prod -d dynamic_boehm'
DEBUG: + /usr/bin/clang -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -std=gnu99 -w -o tmp_1 v.c -lm -lpthread -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -Wl,-O2 -Wl,--no-undefined -flto
DEBUG: + ./tmp_1 -no-parallel -o tmp_2 -prod -d dynamic_boehm cmd/v
DEBUG: + ./tmp_2 -o v -prod -d dynamic_boehm cmd/v
DEBUG: /var/tmp/rpm-tmp.mcjmqc: line 52: 644 Bus error (core dumped) ./v build-tools
```
2022-07-30 14:59:12 +03:00
yuyi
db79888daf
picoev: restore struct Picoev definition ( #15278 )
2022-07-30 14:30:13 +03:00
yuyi
6e8350a9c9
fmt: fix interface method with fntype argument ( #15280 )
2022-07-30 14:29:41 +03:00
yuyi
e6a04905e9
fmt: fix comptime method call ( #15279 )
2022-07-30 14:28:34 +03:00
yuyi
b6ce7cc198
checker: check invalid variable ( fix #15240 ) ( #15260 )
2022-07-30 14:27:28 +03:00
Delyan Angelov
0133ff2cbf
checker: use reserved_type_names_chk.matches(word) instead of word in reserved_type_names
2022-07-29 23:23:34 +03:00
Delyan Angelov
f0a8d57735
checker: use array_builtin_methods_chk.matches(method_name) instead of method_name in array_builtin_methods
2022-07-29 23:23:34 +03:00
Delyan Angelov
336305daa5
scanner,parser,gen: use km.matches(word) instead of km.find(word) != -1
2022-07-29 23:23:33 +03:00
Delyan Angelov
2db8bd62a2
token: fix a new_keywords_matcher_from_array_trie bug (first word with idx 0 was ignored); add tests
2022-07-29 23:23:33 +03:00
Delyan Angelov
a42eb3b947
cgen: use a trie matcher for c_reserved checks as well
2022-07-29 23:23:32 +03:00
zakuro
8268df7e1d
parser: create and use Parser.unexpected to unify all unexpected token error messages ( #15259 )
2022-07-29 19:28:34 +03:00
yuyi
1be595605a
parser: fix optional fn argument ( #15271 )
2022-07-29 19:10:50 +03:00
yuyi
0bf23488dc
checker: check struct field's fn call ( fix #15249 ) ( #15257 )
2022-07-29 19:00:51 +03:00
lemon
927ec1fadb
native: support ||, && and simple boolean expression evaluation ( #15256 )
2022-07-29 07:17:01 +03:00
Delyan Angelov
04b28d11be
cgen: use switch for matches with integer literals, instead of an if else if ladder ( #15254 )
2022-07-29 00:36:29 +03:00
yuyi
17ce1a0e8d
parser: check undefined ident in if guard expr ( #15253 )
2022-07-28 19:13:41 +03:00
Delyan Angelov
242ade8938
os: fix File.eof on FreeBSD (feof is a C macro there)
2022-07-28 17:26:55 +03:00
Reuben Thomas
ed56c3957e
os: add File.reopen and File.eof methods ( #15184 )
2022-07-28 16:21:23 +03:00
Tim Dupont
3d0a48b1bb
CHANGELOG.md: fix for a small typo (paramter -> parameter) ( #15252 )
2022-07-28 14:16:33 +03:00
Dialga
18ae726015
v.pkgconfig: add the default path for Debian 32bit ( #15250 )
2022-07-28 14:06:56 +03:00
Delyan Angelov
a16f9ac41f
mysql: include workaround for windows programs that just exit, when the libmysql.dll is not found, into vlib/mysql/README.md
2022-07-27 22:26:36 +03:00
l-m
10f3c9f127
builtin: add string.replace_char and string.normalize_tabs ( #15239 )
2022-07-27 22:04:39 +03:00
yuyi
60094d95e2
cgen: check comptime call method (no value) used as value ( #15241 )
2022-07-27 21:32:00 +03:00
Davide Beatrici
8af87a9e98
make: rename "V" to "VEXE" in GNUmakefile, to prevent conflicts while building RPMs ( #15237 )
...
This fixes a build failure when using "%make_build" in an RPM spec file:
make: 1: No such file or directory
make: *** [GNUmakefile💯 all] Error 127
2022-07-27 21:04:29 +03:00
yuyi
6a7eb82d9e
cgen: fix comptime for method call with arguments ( #15236 )
2022-07-27 03:22:05 +03:00
stringnick
afaab7ab4d
stdatomic: add/sub return result of op ( #15235 )
2022-07-27 03:21:03 +03:00
Hitalo de Jesus do Rosário Souza
e5e750d533
orm: default attribute ( #15221 )
2022-07-27 00:59:32 +03:00
yuyi
c976a691ad
scanner: correct error message of empty character literal ( fix #15226 ) ( #15228 )
2022-07-26 15:07:08 +03:00
Bastian Buck
4ab72ccb69
os: add a security advisory for potential TOCTOU risks when using os.is_writable, os.is_executable etc ( #15222 )
2022-07-26 12:02:48 +03:00
yuyi
03b7c76b38
cgen: optimize auto_str_methods of [str:skip] fields ( #15227 )
2022-07-26 09:38:50 +03:00
yuyi
0b0c496eff
cgen: fix printing struct with skip fields ( #15224 )
2022-07-26 04:37:16 +03:00
Alexander Medvednikov
f1ebfb2d42
cgen: str:skip field
2022-07-25 17:25:47 +03:00
Alexander Medvednikov
5a3a145e99
gg: fix native draw_circle on macos
2022-07-25 17:25:47 +03:00
yuyi
f619becbdc
scanner: check undefined ident in string literal ( #15212 )
2022-07-25 14:28:47 +03:00
Hitalo de Jesus do Rosário Souza
82db1e4746
pg: improve pg README.md ( #15206 )
2022-07-25 08:32:21 +03:00
Tim Richardson
7bf2ad6889
vscode.md: fix typo ( #15207 )
2022-07-25 08:04:06 +03:00
Andrew Compton
f9385f6300
os: make get_raw_line() should not break lines on \r on windows ( fix #5900 ) ( #15205 )
2022-07-25 08:03:07 +03:00
Delyan Angelov
6a5db0df61
v.token: use a more performant KeywordMatcher in the scanner and parser ( #15196 )
2022-07-25 06:32:06 +03:00
Subhomoy Haldar
297cb5f89c
math.big: improve multiplication performance ( #15200 )
2022-07-24 19:35:37 +03:00
Hitalo de Jesus do Rosário Souza
2d7406a8cd
examples: v back-end example for vweb ( #15141 )
2022-07-24 13:02:57 +03:00
Hitalo de Jesus do Rosário Souza
1f3be99859
crypto: add an example of how to verify jwt tokens ( #15198 )
2022-07-24 10:27:21 +03:00
yuyi
5464de406c
cgen: fix custom str on struct with too many fields ( #15195 )
2022-07-24 10:15:22 +03:00
Delyan Angelov
de0683fe30
tests: fix compilation of tcp_test.v
2022-07-23 23:33:43 +03:00
Delyan Angelov
c63fed5393
tests: remove needless import math in translated_test.v
2022-07-23 23:24:17 +03:00
Alexander Medvednikov
d8b0df1a31
doc: fix ci
2022-07-23 01:55:17 +03:00
Alexander Medvednikov
d6de53362f
checker: improve unused label check
2022-07-23 01:36:27 +03:00
Alexander Medvednikov
4d3401c852
checker: check for unused labels
2022-07-23 01:25:20 +03:00
Alexander Medvednikov
af41058979
doc: map ordering
2022-07-23 00:53:42 +03:00
Reuben Thomas
2ffad85f06
doc: remove misleading comment about stdin() ( #15154 )
2022-07-23 00:22:50 +03:00
yuyi
b0c32e0dbf
checker: fix fn variadic with enum value ( #15177 )
2022-07-22 16:08:22 +03:00
yuyi
092f5f0bf8
checker: fix comptime if in const declaration ( fix #15160 ) ( #15169 )
2022-07-22 16:03:45 +03:00
zakuro
9ec8a99243
parser: cleanup orblock duplicate code ( #15173 )
2022-07-22 12:36:50 +03:00
Delyan Angelov
e9809572b1
ast: use const empty_expr instead of fn empty_expr (thanks to Joe Conigliaro for the idea) ( #15175 )
2022-07-22 12:14:46 +03:00
Delyan Angelov
c6aea659e3
cgen,ci: fix v -usecache self on macos
2022-07-22 11:43:20 +03:00
Delyan Angelov
f75d7eb114
ci: fix v build-examples (use voidptr(u64(0)) inside vlib/js/dom/dom.js.v)
2022-07-21 23:08:18 +03:00
Delyan Angelov
5340f8afea
ci: fix vlib/v/checker/tests/nil.vv and its .out file
2022-07-21 23:05:02 +03:00
Delyan Angelov
474033c055
ci: allow unsafe { a := nil }, add separate nil case in pointer_ops.vv, to test the nil checker errors independently from the voidptr ones
2022-07-21 22:52:38 +03:00
Delyan Angelov
697d546d46
ci: fix fixed_array_conv.out output (the .vv file was formatted)
2022-07-21 22:45:54 +03:00
Delyan Angelov
cf42ba2b80
ci: revert nil to voidptr(u64(0)) in voidptr_dereference_err.vv too. nil should have its own .vv/.out pair.
2022-07-21 22:43:14 +03:00
Delyan Angelov
cdefb878d6
ci: make pass_voidptr_as_interface_reference_test.v use voidptr again
2022-07-21 22:41:27 +03:00
Delyan Angelov
2e89eeb477
ci: make voidptr_casted_as_an_interface_test.v use voidptr again (it does test exactly that edge case, it should not have been converted to use nil)
2022-07-21 22:40:21 +03:00
Delyan Angelov
71cd256f0c
ci,cgen: fix -usecache compilation of V itself
2022-07-21 22:29:44 +03:00
Delyan Angelov
73b02cdf36
ci: fix spurious native_backend_tests.yml cancellations
2022-07-21 22:13:21 +03:00
Delyan Angelov
81104ac309
ci: fix v test-cleancode failures
2022-07-21 22:05:17 +03:00
Delyan Angelov
231623b75b
ci: vfmt tcp_test.v
2022-07-21 22:04:51 +03:00
Delyan Angelov
dc1b54c669
ci: fix failing ./v vlib/builtin/builtin_test.v (globals initialisation)
2022-07-21 21:49:00 +03:00
Delyan Angelov
ed43bfc469
ci: fix dlmalloc again (workaround vfmt)
2022-07-21 21:21:20 +03:00
Delyan Angelov
e29f6d1393
markused: fix ./v -skip-unused -cc gcc -keepc -freestanding -o bel vlib/os/bare/bare_example_linux.v
2022-07-21 21:18:33 +03:00
Delyan Angelov
d9fe2edc41
ci: fix failing build-module-docs (because of unsafe { unsafe { nil } })
2022-07-21 21:11:43 +03:00
Delyan Angelov
6ebe668a74
tools: show the exact failing c2v command on v translate failure for easier diagnostic/debugging.
2022-07-21 21:04:06 +03:00
Alexander Medvednikov
9099594a49
all: wrap up unsafe { nil } (p. 3)
2022-07-21 21:01:30 +03:00
Alexander Medvednikov
a68d03ac59
checker: allow x := unsafe { nil }
2022-07-21 20:56:24 +03:00
Alexander Medvednikov
dc79f1392b
all: voidptr(0) => unsafe { nil } (p.2)
2022-07-21 20:51:54 +03:00
Alexander Medvednikov
1f25811786
roadmap: update
2022-07-21 20:47:30 +03:00
Alexander Medvednikov
caa0c2f153
vfmt: voidptr(0) => unsafe { nil } (p.1)
2022-07-21 20:46:01 +03:00
yuyi
be9f8cc777
cgen: fix comptime if in struct field default ( fix #15058 ) ( #15152 )
2022-07-21 16:59:18 +03:00
yuyi
7029e39088
checker: check struct field with default expression ( #15151 )
2022-07-21 10:33:34 +03:00
Joe Conigliaro
49228e1acd
cgen: fix dep cycle for struct Node { children [4]&Node } closes #15136
2022-07-21 16:16:24 +10:00
Delyan Angelov
8593408179
json.cjson: add a submodule that allows lower level access to the cJSON library (constructing JSON trees in memory with null leafs).
2022-07-20 23:34:17 +03:00
Hitalo de Jesus do Rosário Souza
c8d4534f5b
sqlite: remove spurious eprintln on select calls ( #15139 )
2022-07-20 17:35:38 +03:00
Ned
57a201f28c
tools: add helpful message, when the vls server executable is not found on v ls ( #15129 )
2022-07-20 14:26:49 +03:00
kahsa
9995063304
doc: add a go fn() {} example ( #15134 )
2022-07-20 14:24:13 +03:00
yuyi
f27c0387ad
cgen: minor cleanup in global_decl() ( #15133 )
2022-07-20 13:51:33 +03:00
Delyan Angelov
ee4a179e71
tests: add a test for Node{123, unsafe { nil }, unsafe { nil }}
2022-07-20 11:29:01 +03:00
Delyan Angelov
50075d5a79
ast,cgen: support a := Abc{unsafe{nil}}, for struct Abc { next &Abc }
2022-07-20 10:47:04 +03:00
Fossean1
1ccb4c3ac0
doc: minor fixes in examples ( #15125 )
2022-07-19 20:59:59 +03:00
Hitalo de Jesus do Rosário Souza
a13b8ff0c8
mysql: fix for adapting mysql types to v structs ( #15100 )
2022-07-19 18:29:09 +03:00
yuyi
041e90b2e2
checker, cgen: fix interface embedding smartcast ( fix #13296 ) ( #15127 )
2022-07-19 16:36:16 +03:00
Alexander Medvednikov
0afa2f76c8
ci: fix gitly ci
2022-07-19 13:53:05 +03:00
Alexander Medvednikov
fd47385ff2
checker: check untyped nil in assignment
2022-07-19 13:31:10 +03:00
Alexander Medvednikov
1aeca113d3
sokol: do not crash if an image cannot be rendered
2022-07-19 13:21:34 +03:00
SakthiMahendran
e4674cb8e1
examples: replace "resp.text" with "resp.body". ( #15123 )
2022-07-19 12:52:42 +03:00
yuyi
a39fe68af1
cgen: clean up ident() in cgen.v ( #15121 )
2022-07-19 10:54:03 +03:00
Ned
c7ec71cd06
tools/vls: skip 'ls' argument on v ls ( #15126 )
2022-07-19 10:52:39 +03:00
Larpon
02925cecd1
ci: fix report-missing-fn-doc ( #15118 )
2022-07-18 22:33:18 +03:00
Mehmet Ali
12d57e8e7b
sokol: add mouse cursor support ( #15111 )
2022-07-18 09:44:48 +03:00
Zhomart Mukhamejanov
c1502b3c1f
examples: add macos_tray example app ( #15101 )
2022-07-18 09:42:45 +03:00
yuyi
5462d4aebf
checker: check generic interface declaration ( #15108 )
2022-07-18 01:36:37 +03:00
penguindark
706a922e0c
x.ttf: update to fix compilation of vlang/pdf and failing ci ( #15109 )
2022-07-17 19:44:11 +03:00
yuyi
eed496d0bc
checker: check generic struct declaration ( #15106 )
2022-07-17 18:09:15 +03:00
Spydr
368cccb059
native: add typechecking to gen_var_to_string() ( #15107 )
2022-07-17 18:09:03 +03:00
Spydr
c73c4dc884
native: system for defining internal builtin algorithms which are not inlined ( #15105 )
2022-07-17 16:22:54 +03:00
yuyi
58ad6f7999
checker: check generic fn declaration ( #15104 )
2022-07-17 14:32:59 +03:00
yuyi
78242627c3
parser: fix fn argument type position ( #15102 )
2022-07-17 10:55:20 +03:00
Ken
3075e35237
encoding.csv: handle bools ( #15103 )
2022-07-17 10:54:36 +03:00
boris-741
b4dedcae43
encoding.csv: generic serialization ( #15097 )
2022-07-16 22:21:05 +03:00
yuyi
8d24522d02
parser: check generic interface method declaration ( #15095 )
2022-07-16 16:58:39 +03:00
Delyan Angelov
5e0899853b
dlmalloc: fix warning about fixed arrays of references, by using unsafe{}
2022-07-16 16:37:20 +03:00
Delyan Angelov
bd4e9f6225
v: offer a suggestion for misspelled commands like v held
2022-07-16 14:58:26 +03:00
Delyan Angelov
b01df8ed0a
help: chmod 644 cmd/v/help/where.txt
2022-07-16 12:45:08 +03:00
yuyi
ac7e809464
checker: fix generics struct init in generic fn ( fix #15080 ) ( #15088 )
2022-07-15 17:30:56 +03:00
yuyi
560afac5d5
cgen: fix fixed array of threads ( #15086 )
2022-07-15 14:19:11 +03:00
lemon
f2961ec862
native: refer to types to generate code ( #15077 )
2022-07-15 14:18:32 +03:00
yuyi
57c4188d98
ast, checker: check generic fn declaration error ( #15079 )
2022-07-15 14:18:06 +03:00
shove
b4ed5d5f20
net: add a net.dial_tcp_with_bind/2 function ( #15055 ) ( #15056 )
2022-07-15 12:38:17 +03:00
Sebastian Atlántico
4f997feee7
tools: add tests for v where; improve usability ( #15059 )
2022-07-15 07:59:11 +03:00
Alexander Medvednikov
89a757aba0
doc: clean up
2022-07-14 11:10:15 +03:00
Alexander Medvednikov
8d0fe3894a
doc: document anonymous structs
2022-07-14 11:06:10 +03:00
yuyi
0d6d6f7de8
cgen: fix fixed array literal index ( fix #14959 ) ( #15054 )
2022-07-14 08:23:29 +03:00
Alexander Medvednikov
a38310f929
checker: array of references check
2022-07-14 00:58:14 +03:00
Sebastian Atlántico
47b5d206a6
cmd/tools: vwhere fixes ( #15051 )
2022-07-13 18:04:26 +03:00
Hitalo de Jesus do Rosário Souza
3f3742122f
orm: sql type in struct by attribute ( #14919 )
2022-07-13 18:03:30 +03:00
Hunam
4238e5f6b9
roadmap: update ( #15038 )
2022-07-13 10:04:27 +03:00
yuyi
7594157deb
checker: check generic interface declaration ( #15047 )
2022-07-13 09:43:54 +03:00
Sebastian Atlántico
28fd17654e
tools: add a v where fn join_path command, for platform independent searching the location of a symbol in the local project, vlib, ~/.vmodules ( #15014 )
2022-07-13 07:40:54 +03:00
wilesun
d12a8aef68
json: use C.cJSON_free, for freeing the intermediate result in json_print and json_print_pretty ( #15029 )
2022-07-13 07:11:18 +03:00
Jun
16a6972e2a
readme: fix vinix screenshots ( #15041 )
2022-07-13 01:13:45 +03:00
yuyi
19d0d758c9
cgen: fix struct shared field with default init ( #15040 )
2022-07-12 20:04:06 +03:00
yuyi
7a17a29952
examples: fix typo in c_interop_wkhtmltopdf.v ( #15036 )
2022-07-12 19:42:55 +03:00
yuyi
9839ab6a6c
parser: fix parse c function with optional argument name ( fix #13234 ) ( #15037 )
2022-07-12 11:06:29 +03:00
Delyan Angelov
b59e6b1d06
ci: do periodic runs only in the main V repository (not in forks)
2022-07-12 11:03:59 +03:00
Delyan Angelov
662d0a3ef2
ci: change ci_bootstrapping_works.yml to a periodic run, *only* on the main repository.
2022-07-12 11:02:51 +03:00
Delyan Angelov
a4e0e0fa57
builtin: add drafts for __new_array_noscan, __new_array_with_default_noscan, __new_array_with_array_default_noscan for array_notd_gcboehm_opt.v
2022-07-12 10:00:58 +03:00
yuyi
62d800a775
checker, cgen: fix array of sumtype appending alias ( #15034 )
2022-07-12 09:26:11 +03:00
Subhomoy Haldar
8a4313c1b8
ci: fix vlib/v/builder/builder_test.v failures on msvc ( #15035 )
2022-07-12 08:46:59 +03:00
Dmitriy Smirnov
f35a3a89f9
checker: fix dereferencing voidptr. ( #15033 )
2022-07-12 01:12:29 +03:00
Subhomoy Haldar
dc68469818
use trimmed output for comparison ( #15032 )
2022-07-11 22:47:32 +03:00
Subhomoy Haldar
fbad48b5d9
v.builder: retain executable after v run, if the executable was already existing ( #15021 )
2022-07-11 21:08:53 +03:00
Delyan Angelov
f16355eeba
ci: fix build failure (complete renaming in 39b6851)
2022-07-11 20:59:37 +03:00
yuyi
39b68518b2
checker: minor refactor in infix_expr() ( #15028 )
2022-07-11 20:16:42 +03:00
shove
032cb3f115
checker: fix the type of ComptimeCall ( fixes #14996 ) ( #15013 )
2022-07-11 20:08:01 +03:00
yuyi
398bd2280d
cgen: fix printing reference alias ( #15027 )
2022-07-11 20:04:34 +03:00
yuyi
ec19f4289c
checker, cgen: fix alias operator overloading ( #15024 )
2022-07-11 19:20:15 +03:00
yuyi
9231697966
parser: check for illegal use of any type ( fix #15003 ) ( #15020 )
2022-07-11 15:29:25 +03:00
Delyan Angelov
5498a6c263
tests: add more -skip-unused cases to v test-all
2022-07-11 11:02:17 +03:00
Delyan Angelov
94e35b710c
markused: fix C compilation failures on -skip-unused -profile
2022-07-11 10:56:13 +03:00
yuyi
81d694b1f8
tests: restore interfaces_map_test ( #15019 )
2022-07-11 09:05:36 +03:00
yuyi
a6cc4c4c28
parser: minor cleanup in parse_type.v ( #15011 )
2022-07-11 08:03:08 +03:00
yuyi
7ff20c09ca
tests: restore test_interface_struct_from_mut_array() ( #15018 )
2022-07-11 07:57:14 +03:00
Ned
a331cf577a
tools/vls: fix installing vls when config is not present ( #15017 )
2022-07-11 07:56:53 +03:00
yuyi
cc43a23f29
vweb: check invalid port number ( #15016 )
2022-07-11 07:55:33 +03:00
Alexander Medvednikov
bfcf5b13ed
checker: fix #define check on windows
2022-07-11 00:20:12 +03:00
Alexander Medvednikov
22dac71b33
checker: do not allow #define everywhere
2022-07-10 22:51:06 +03:00
Ned
235ef23588
tools: add v ls - a VLS launcher and updater utility ( #15009 )
2022-07-10 20:27:50 +03:00
yuyi
58c5d387c4
parser: check closure capture global variable ( #15010 )
2022-07-10 20:21:54 +03:00
Delyan Angelov
3549055548
ci: use v should-compile-all sdl/examples/ instead of the bash script that choked on v sdl/examples/assets
2022-07-10 20:05:04 +03:00
Delyan Angelov
3b575e83f1
ci: fix ./v cmd/tools/builders/golang_builder.v
2022-07-10 18:53:18 +03:00
Delyan Angelov
01dabe5966
ci: fix failing invalid_struct_decl_script_err.vv
2022-07-10 18:37:42 +03:00
Delyan Angelov
5d8d11c989
ci: fix v cmd/tools/vast after ast.StructInit field renaming
2022-07-10 18:28:24 +03:00
Delyan Angelov
d15e9f4866
ci: remove forgotten dump call
2022-07-10 17:05:49 +03:00
Delyan Angelov
69aaf68f2f
cgen: fix anon struct auto string method generation
2022-07-10 16:57:13 +03:00
yuyi
64eab72f4c
checker: fix anon fn using global variable ( fix #15004 ) ( #15008 )
2022-07-10 12:43:50 +03:00
Alexander Medvednikov
7d0a9186bb
all: wrap up anonymous structs
2022-07-10 12:00:17 +03:00
Ken
1ae11b41e7
net.websocket: make logger configurable ( #14998 )
2022-07-09 17:39:07 +03:00
Thomas Peißl
739f3cd90b
pref: detect termux more reliably ( #15001 )
2022-07-09 17:23:19 +03:00
Subhomoy Haldar
8ee614d3f8
encoding.binary: add unit tests and module documentation ( #15000 )
2022-07-09 15:52:19 +03:00
Hitalo de Jesus do Rosário Souza
d4b0ebf215
doc: clear the explanation to 'sql: type' ( #14915 )
2022-07-09 14:04:35 +03:00
Delyan Angelov
f56aaa1007
examples: simplify examples/websocket/ping.v (end automatically, when the client ends)
2022-07-09 12:40:52 +03:00
CC
7e1c45ab44
math: add round_sig function for f64 ( #14997 )
2022-07-09 10:41:58 +03:00
shove
c5a290ffc6
cgen: fix lost return in ComptimeCall ( fixes #14962 ) ( #14995 )
2022-07-09 08:55:01 +03:00
Alexander Medvednikov
70890b27a5
cgen: handle default anonymous structs
2022-07-08 15:40:57 +03:00
Emirhan Yener
1a49db4ea1
examples: remove empty comments ( #14986 )
2022-07-08 15:35:45 +03:00
Delyan Angelov
02d675ab67
os: restore the env TERMUX_VERSION based final resort for runtime auto detection of Termux
2022-07-08 11:16:53 +03:00
StunxFS
bcaa3ac915
vlib: remove jsdom module, use js.dom instead ( #14985 )
2022-07-08 09:23:10 +03:00
penguindark
df4bd88d45
x.ttf: fix a bug in TTF fixed point data management ( #14987 )
2022-07-08 09:20:59 +03:00
yuyi
5aa6ec0693
cgen: fix error for comptime method call ( #14992 )
2022-07-08 09:18:49 +03:00
Delyan Angelov
5f140fe2ff
ci: v fmt -w vlib/v/builder/cc.v
2022-07-07 23:57:21 +03:00
StunxFS
9376009c39
v.eval: support panic function ( #14972 )
2022-07-07 20:00:59 +03:00
CC
6b597a4b58
builder: add support for icc (Intel C Compiler) ( #14975 )
2022-07-07 19:48:07 +03:00
yuyi
758f84fa86
ast, parser, cgen: fix anon sumtype cast ( fix #14967 ) ( #14976 )
2022-07-07 18:51:57 +03:00
yuyi
029d583bb2
cgen: a minor fix in match_expr ( #14983 )
2022-07-07 18:51:27 +03:00
Larpon
9f3b6e3e3a
android: provide more predictable logging, add comptime termux support ( #14984 )
2022-07-07 18:28:29 +03:00
Delyan Angelov
71a85249ea
ci: fix failing ./v -W build-tools
2022-07-07 18:22:21 +03:00
Alexander Medvednikov
f5001192f9
fmt: handle anon structs; tests: bring back anon struct test
2022-07-07 16:11:13 +03:00
zakuro
972bba66d1
checker,ast: clean up deprecation code ( #14980 )
2022-07-07 15:45:45 +03:00
Delyan Angelov
de77114593
eval: support assignment operators like +=, make for a in 0..10 { more robust
2022-07-07 15:13:22 +03:00
Alexander Medvednikov
15ce15d41b
tests: disable anon struct test for now
2022-07-07 13:08:10 +03:00
Delyan Angelov
91acd0f380
ci: fix failing v check-md vlib/sqlite/README.md
2022-07-07 13:05:05 +03:00
Alexander Medvednikov
7da466e81b
parser: show a hint when using v . with multiple fn mains
2022-07-07 13:04:08 +03:00
Alexander Medvednikov
426421bebb
all: anonymous structs (part 2)
2022-07-06 21:38:45 +03:00
yuyi
f4b39fbe4f
cgen: fix sumtype with none ( #14965 )
2022-07-06 21:03:42 +03:00
CC
d86b4951c7
sqlite: add sync and journal funcs, docs ( #14970 )
2022-07-06 21:01:27 +03:00
Delyan Angelov
f0ce7fb9d3
Revert "gg: fix android compilation for ~/.vmodules/ui/examples/rectangles.v"
...
This reverts commit f1a855e6d2 .
2022-07-06 16:19:40 +03:00
Delyan Angelov
f1a855e6d2
gg: fix android compilation for ~/.vmodules/ui/examples/rectangles.v
2022-07-06 16:02:50 +03:00
Delyan Angelov
82f7597a0c
ci: fix failing v check-md doc/docs.md
2022-07-06 15:52:18 +03:00
Delyan Angelov
3308313167
os: remove the closing of stream handles at the end of Process.win_slurp/1
2022-07-06 15:43:13 +03:00
zakuro
a46bcf3571
all: v.ast.byte_type -> v.ast.u8_type ( #14964 )
2022-07-06 13:32:30 +03:00
Alexander Medvednikov
00dfce655e
doc: document if as
2022-07-06 12:41:36 +03:00
CC
6a567a0dd6
sqlite: improve exec_none behaviour ( #14955 )
2022-07-06 10:44:36 +03:00
yuyi
bb2223c8b0
checker: fix shared_element_lock.vv test ( #14960 )
2022-07-06 10:43:36 +03:00
Alexander Medvednikov
59d6ca0c95
js: remove duplicate match
2022-07-06 07:46:58 +03:00
Alexander Medvednikov
819b6f475a
os: remove unnecessary unsafes
2022-07-06 07:07:48 +03:00
Alexander Medvednikov
d3090de02e
checker: apply the new array check only to len:, not cap: inits
2022-07-06 07:03:36 +03:00
yuyi
fab5802deb
all: fix latest ci errors ( #14957 )
2022-07-06 07:02:16 +03:00
Alexander Medvednikov
3f3fb5be47
js: handle Nil
2022-07-06 06:47:37 +03:00
Alexander Medvednikov
c48ed52f43
checker: vfmt
2022-07-05 23:56:53 +03:00
Alexander Medvednikov
163c7ba2bb
checker: stricter []&Type{len:x} check
2022-07-05 23:51:29 +03:00
Alexander Medvednikov
9b4dec7b98
parser: anonymous structs (part 1)
2022-07-05 23:17:00 +03:00
Alexander Medvednikov
5f78647137
all: unsafe nil
2022-07-05 22:59:54 +03:00
Larpon
9b1a616b13
ci: remove openrndr dependency from vgret testing ( #14950 )
2022-07-05 22:44:27 +03:00
Larpon
e08fedfd14
ci: add runtime DOOM checks via vgret ( #14951 )
2022-07-05 22:44:14 +03:00
Larpon
0dd5050b29
os: clean up usage of ANativeActivity, allow access to fields ( #14948 )
2022-07-05 16:30:10 +03:00
yuyi
56d62a6e6f
checker: check undefined ident in reference selector ( #14949 )
2022-07-05 16:29:54 +03:00
yuyi
8b8667dd9a
cgen: cleanup in fn.v ( #14938 )
2022-07-05 06:40:57 +03:00
Larpon
e18c5c7908
tools: add generic_screenshot method to vget ( #14943 )
2022-07-05 06:40:38 +03:00
Ken
a50e0f0522
net.websocket: allow timeout to be configured ( #14941 )
2022-07-05 06:40:23 +03:00
Alexander Medvednikov
5523c11dd4
help: remove "coming soon in 0.3" for v translate
2022-07-05 06:38:33 +03:00
Max Smirnov
3bdf2f053d
changelog: fix typo ( #14930 )
2022-07-04 15:34:00 +03:00
Ted Stoychev
63b6923565
readme: fix header ( #14933 )
2022-07-04 15:33:41 +03:00
ghosttk
eb10cc9606
vweb: fix '/' in scan_static_directory ( #14940 )
2022-07-04 15:32:44 +03:00
Delyan Angelov
946da5556d
ci: add a c2v job too, that checks that Doom compiles.
2022-07-04 14:16:14 +03:00
Delyan Angelov
e156066acf
ci: fix gitly failure (compile gitly.scss to gitly.css)
2022-07-04 12:50:18 +03:00
yuyi
7f72ffdd66
cgen: fix error for result multi_return ( #14936 )
2022-07-04 10:54:08 +03:00
Delyan Angelov
90197fd58a
term.ui: make C. unions and structs public (solve conflicts with term on windows)
2022-07-04 10:50:19 +03:00
Ikko Ashimine
584c035120
sync: fix typo in pool.v ( #14928 )
2022-07-03 15:24:57 +03:00
yuyi
9028b0ed76
parser: minor cleanup in partial_assign_stmt() ( #14929 )
2022-07-03 15:24:42 +03:00
Alexander Medvednikov
20ba2a10c1
builder: use is_dir for src/; changelog: add 0.3.1 features
2022-07-03 15:13:08 +03:00
Alexander Medvednikov
c90e8185ed
builder: search for .v files in /src/ if there are none
2022-07-03 08:41:26 +03:00
Alexander Medvednikov
b5f2636b73
Revert "vweb: remove the extra '/' in scan_static_directory ( #14806 )"
...
This reverts commit 8172fecb51 .
2022-07-02 11:38:24 +03:00
Dialga
6957f940a0
pkgconfig: fix parsing mid-line comments ( #14920 )
2022-07-02 11:31:52 +03:00
Joe Conigliaro
4032838aba
gen.golang: array append & basic strings
2022-07-02 17:07:47 +10:00
Claudio Cesar de Sá
5b97ad15ad
examples: add new graph algorithms, make some minor corrections to the programs in examples/graphs ( #14562 )
2022-07-01 21:37:00 +03:00
CC
dc9ff7cab2
README: add TCC acknowledgement ( #14910 )
2022-07-01 21:10:36 +03:00
Alexander Medvednikov
f0cee25213
Update README.md
2022-07-01 16:50:51 +03:00
yuyi
1b463834aa
builder: fix cross compiling for linux on windows ( fix #6241 , fix #12922 ) ( #14907 )
2022-07-01 15:24:27 +03:00
Delyan Angelov
69d292e8d1
os: detect termux more reliably
2022-07-01 13:52:57 +03:00
Delyan Angelov
b6b611aa82
v: support better separation of general Android vs Termux specific code (part 2)
2022-07-01 13:18:31 +03:00
Delyan Angelov
30401e003f
v: support better separation of general Android vs Termux specific code (part 1)
2022-07-01 12:48:35 +03:00
CC
ff0f75803d
docs: add a note on how to install gcc-mingw-w64-x86-64 needed for linux->windows cross compilation ( #14905 )
2022-07-01 08:25:06 +03:00
Emirhan Yener
71ff221cff
gg: update draw polygon test ( #14880 )
2022-06-30 21:21:12 +03:00
Hunam
e4a49d5dd5
doc: update ROADMAP.md ( #14897 )
2022-06-30 21:20:34 +03:00
yuyi
d3c1e671f1
fmt: minor optimization in struct.v ( #14898 )
2022-06-30 19:52:49 +03:00
ylluminate
3f147cbc38
CHANGELOG.md: fix the 0.2.4 heading ( #14900 )
2022-06-30 19:51:22 +03:00
Markus F.X.J. Oberhumer
74bb5ae17a
os: add an optional "mode" parameter to os.mkdir and os.mkdir_all ( #14887 )
2022-06-30 13:49:47 +03:00
Larpon
7c3571b274
sokol: allow thirdparty window control ( #14896 )
2022-06-30 13:47:59 +03:00
Alexander Medvednikov
ec75860453
V 0.3
2022-06-30 10:41:25 +03:00
yuyi
9f59dbd319
fmt: fix import module { Foo } ( #14894 )
2022-06-30 09:48:39 +03:00
yuyi
92f441e894
cgen: minor cleanup in str.v ( #14882 )
2022-06-30 04:04:12 +03:00
yuyi
f2be115f7d
parser: fix the incorrect location of the type declaration name ( #14879 )
2022-06-29 16:14:03 +03:00
Joe Conigliaro
1b0754e4f3
gen.golang: correct use of const github_job
2022-06-29 21:15:46 +10:00
Joe Conigliaro
c3866bb7b1
gen.golang: skip tests only on ubuntu-docker-musl
2022-06-29 21:11:28 +10:00
Joe Conigliaro
86549feafa
gen.golang: globally skip go backend tests & run only on ubuntu-tcc
2022-06-29 20:55:43 +10:00
Joe Conigliaro
5462f06d6c
gen.golang: correct error message
2022-06-29 19:09:36 +10:00
yuyi
f8461e2b3c
parser: check const declaration using multiple assign ( #14886 )
2022-06-29 12:03:56 +03:00
ghosttk
fae26197b9
os: add exo-open to the list of tried launchers in os.open_uri/1 ( #14884 )
...
Add 'exo-open' for xfce4 desktop environment.
2022-06-29 11:59:25 +03:00
Hitalo de Jesus do Rosário Souza
c481b80ec3
docs: add a jwt example to vlib/crypto/README.md ( #14872 )
2022-06-29 11:57:05 +03:00
Joe Conigliaro
51649b924b
gen.golang: dont push run_args in run_file assignent
2022-06-29 18:54:26 +10:00
Joe Conigliaro
eec60a3018
gen.golang: add run support & testrunner
2022-06-29 18:49:53 +10:00
yuyi
3ae59a7837
checker: optimize casting sumtype error message ( fix #14023 ) ( #14877 )
2022-06-28 17:13:58 +03:00
Delyan Angelov
b47d35a0bb
ci: compile golang_builder.v without warnings (fix v -prod build-tools)
2022-06-28 15:00:54 +03:00
Delyan Angelov
2bcbd0b636
ci: comment unused import strings
2022-06-28 14:16:39 +03:00
Delyan Angelov
6165b119f6
scanner,parser,checker: do show the first error on -Wfatal-errors
2022-06-28 14:05:32 +03:00
Alexander Medvednikov
64b8284419
go: remove unused code (comments)
2022-06-28 11:14:48 +03:00
yuyi
ce6bc2c26d
checker: handle void in struct field init ( fix #13944 ) ( #14876 )
2022-06-28 11:06:25 +03:00
Alexander Medvednikov
a4eb5b6356
gen: basic initial work on the Go backend
2022-06-28 09:41:15 +03:00
Emirhan Yener
28068e8ecf
gg: add draw_polygon_filled test ( #14871 )
2022-06-28 08:30:45 +03:00
yuyi
42df154399
ast: add elem_type_pos to ChanInit ( #14873 )
2022-06-28 08:30:02 +03:00
yuyi
09630dd0bc
parser: check interface name using single letter capital ( #14878 )
2022-06-28 08:29:23 +03:00
Emirhan Yener
6b2d3a826b
gg: add draw_polygon_filled fn with rotation parameter ( #14867 )
2022-06-27 21:34:43 +03:00
Mehmet Ali
ae7c566232
doc: remove TODO C2V now that it's out ( #14866 )
2022-06-27 21:34:07 +03:00
yuyi
6be287d476
cgen: minor cleanup in ref_or_deref_arg() ( #14862 )
2022-06-27 21:33:35 +03:00
yuyi
044698746e
parser: minor cleanup in parse_type.v ( #14863 )
2022-06-27 21:33:18 +03:00
Larpon
2d40ba1f49
cgen: call GC_INIT in sokol_main too, when compiling with -apk ( #14869 )
2022-06-27 21:24:39 +03:00
Delyan Angelov
b1a14c6cf7
tests: use a platform neutral module with C declarations (sokol.audio), instead of time in private_redeclaration_of_C_timeval.vv .
2022-06-27 19:48:46 +03:00
Delyan Angelov
94d6670e8f
checker: make the type C.X is private re-declaration error more informative
2022-06-27 18:32:21 +03:00
Delyan Angelov
0ef8382824
tests: show timing info in the output of run_project_folders_test.v
2022-06-27 18:31:07 +03:00
yuyi
1af94c7edf
checker: fix error for array_of_aliases.pop() ( #14861 )
2022-06-27 11:50:46 +03:00
WoodyAtHome
34517c340d
net: support blocking sockets in TcpSocket.connect ( #14849 )
2022-06-27 11:01:55 +03:00
yuyi
ef7f9779a3
parser, checker: fix postfix expr check ( fix #14852 ) ( #14857 )
2022-06-27 04:28:24 +03:00
yuyi
5a79a54fe4
all: fix all remaining unsafe 0 ( #14856 )
2022-06-26 17:04:23 +03:00
Alexander Medvednikov
cb60392302
examples: fix unsafe 0
2022-06-26 07:12:15 +03:00
Alexander Medvednikov
ca30397e7a
cli: fix compilation
2022-06-26 07:08:05 +03:00
Alexander Medvednikov
e76f74fd73
checker: unsafe 0 for references (default value)
2022-06-26 06:40:40 +03:00
yuyi
546f9a544f
parser: fix a typo in an error message ( #14848 )
2022-06-26 00:04:08 +03:00
Emirhan Yener
d42aadda0f
gg: fix draw arch functions alpha color ( #14850 )
2022-06-26 00:03:43 +03:00
Leon Arndt
d7f962ef6e
examples: remove empty comment from Tetris ( #14845 )
2022-06-25 05:47:44 +03:00
yuyi
ef643e106b
checker: check unknown chan element type ( #14843 )
2022-06-25 05:19:41 +03:00
yuyi
90287f6aaa
checker: check error for cast sumtype ( fix #14771 ) ( #14847 )
2022-06-25 05:19:16 +03:00
CC
d336b7b877
examples: add another vweb example, showing file upload, transform, and file download ( #14842 )
2022-06-24 09:23:47 +03:00
Delyan Angelov
ccc3271493
docs: restore the important sentence about the mutable args that have to be marked on call
2022-06-23 21:15:21 +03:00
Emirhan Yener
e5bbb23389
examples: fix 2048 gameplay ( #14838 )
2022-06-23 21:07:30 +03:00
Wertzui123
c10ba6d81a
os: add .cmd to the list of Windows executable suffixes ( #14839 )
2022-06-23 20:12:29 +03:00
Delyan Angelov
b0fe21f018
ci: fix long lines/links in docs.md
2022-06-23 20:09:20 +03:00
Alexander Medvednikov
c17200c33d
doc: clear up concurrency and immutable fn args
2022-06-23 17:46:57 +03:00
Larpon
298dc77c38
ci: add pure -os android checks ( #14837 )
2022-06-23 11:22:55 +03:00
yuyi
e9a8f5fcc7
cgen: fix ref_struct.str() with null pointer ( #14836 )
2022-06-23 08:35:21 +03:00
Wertzui123
587101a1ea
os: fix find_abs_path_of_executable function (on Windows) ( #14835 )
2022-06-23 03:36:15 +03:00
Delyan Angelov
2524207d1c
tools: support c2v.exe in v translate, use os.quoted_path, cleanup errors.
2022-06-23 03:31:10 +03:00
Alexander Medvednikov
78c527b243
tutorials: improve c2v tutorial a bit
2022-06-23 02:45:14 +03:00
Alexander Medvednikov
dbc51a4579
readme: add c2v demo
2022-06-23 02:33:09 +03:00
l-m
ed8c63cc0b
builtin: add a contains_only method on string ( #14830 )
2022-06-23 01:41:42 +03:00
Delyan Angelov
a7108ff05c
docs: use the actual most recent output of c2v in the example
2022-06-23 01:39:39 +03:00
Delyan Angelov
b8d9bfec16
docs: fix C primes example in the tutorials (fixes c2v translation on linux)
2022-06-23 01:35:45 +03:00
Delyan Angelov
436081a9f5
ci: fix v check-md tutorials/
2022-06-23 01:30:22 +03:00
Delyan Angelov
1b87a4770c
tutorials: rename the folder containing spaces, to fix git checkouts on windows
2022-06-23 01:08:07 +03:00
Delyan Angelov
856270cac2
tutorials: restore the old tutorials/building_a_simple_web_blog_with_vweb/ folder.
2022-06-23 00:11:59 +03:00
Alexander Medvednikov
989c5e26f5
c2v: use https git clone
2022-06-22 22:49:29 +03:00
Alexander Medvednikov
fe673e7963
tutorials: rename vweb tutorial
2022-06-22 22:48:40 +03:00
Alexander Medvednikov
ae2183043b
tutorials: c2v
2022-06-22 22:47:43 +03:00
Dialga
5cd5d551e3
v.pkgconfig: fix building standalone pkgconfig ( #14825 )
...
* Update main.v
* add test to prevent future regressions
Co-authored-by: Delyan Angelov <delian66@gmail.com >
2022-06-22 22:38:50 +03:00
Alexander Medvednikov
c9ab086029
cmd/tools: enable c2v
2022-06-22 22:10:46 +03:00
yuyi
e6c3de2f46
cgen: format cgen.init() generated c codes ( #14824 )
2022-06-22 21:39:15 +03:00
Larpon
3fb88500a2
os: improve Android interop ( #14827 )
2022-06-22 21:38:27 +03:00
yuyi
585b5145fa
cgen: fix auto string method generated for []&int{len:1} ( #14829 )
2022-06-22 14:54:04 +03:00
Delyan Angelov
6a4ba22eae
tests: flush test headers to ensure stable output with VJOBS>1
2022-06-22 12:46:32 +03:00
pancake
23d1c792c0
native: fix macho generation for macos11-amd64 ( #14821 )
2022-06-22 11:58:27 +03:00
Delyan Angelov
74fb473301
ci: use unique concurrency.group for native_backend_tests.yml
2022-06-22 11:23:40 +03:00
Delyan Angelov
6c060b76fd
ci: fix v building inside native_backend_tests.yml
2022-06-22 11:19:00 +03:00
Delyan Angelov
48b2ab157b
ci: add a separate native_backend_tests.yml, to run the native tests on all the available github actions vm environments
2022-06-22 09:11:01 +03:00
yuyi
c64c4907a2
parser: check closure var name conflict ( #14823 )
2022-06-22 09:04:15 +03:00
Delyan Angelov
e2e3992e0d
ci: remove continue-on-error: true for most ci jobs ( #14811 )
2022-06-22 00:20:57 +03:00
ghosttk
8172fecb51
vweb: remove the extra '/' in scan_static_directory ( #14806 )
2022-06-21 15:13:09 +03:00
Larpon
9f5e442dab
tools: add bump flags to vcomplete ( #14813 )
2022-06-21 15:11:42 +03:00
yuyi
c160ba2a8d
checker: stricter mutable reference check ( fix #14803 ) ( #14805 )
2022-06-21 13:23:21 +03:00
Delyan Angelov
c6f94e9cab
tools: distribute vpm queries randomly between the available backend servers
2022-06-21 12:58:37 +03:00
yuyi
cab6355a38
cgen: fix array of reference sumtype index() ( #14812 )
2022-06-21 12:37:54 +03:00
Delyan Angelov
f08c768c8e
tools: add a new readonly VPM server mirror url, to mitigate failures of the main vpm.vlang.io
2022-06-21 12:27:41 +03:00
Ulises Jeremias Cornejo Fandos
e505fcdac0
encoding.csv: update reader.v ( #14807 )
2022-06-21 08:31:47 +03:00
yuyi
f6f77e5264
clipboard: make clipboard.Clipboard public on windows ( #14810 )
2022-06-21 08:21:54 +03:00
David 'Epper' Marshall
524df8da1b
math: add zpl stuff ( #14543 )
2022-06-21 00:17:49 +03:00
Delyan Angelov
473d26ce47
builtin: enforce linking to libgc.a with -prod on macos
2022-06-20 21:29:27 +03:00
pancake
1caff5b379
native: initial support for apple-m1 ( #14795 )
2022-06-20 21:25:12 +03:00
yuyi
8703e336e0
checker: cleanup in fn_decl() ( #14802 )
2022-06-20 17:56:02 +03:00
Delyan Angelov
1fc9e1a716
tools: build c2v in non verbose mode by default
2022-06-20 16:03:39 +03:00
Delyan Angelov
fa2e8d8459
tools: use os.system for the c2v runs to monitor the progress more easily
2022-06-20 15:50:38 +03:00
Delyan Angelov
0e4198f23b
tools: fix v vet file.v for return if x { y // comment } else { z }
2022-06-20 13:29:22 +03:00
yuyi
cf1fc6f090
ast: fix array of reference sumtype appending ( #14797 )
2022-06-20 12:23:53 +03:00
Alexander Medvednikov
924239026c
pref: disable gc for translated code
2022-06-19 20:07:45 +03:00
Alexander Medvednikov
bc60b0d1a3
builder: add -c when building object files
2022-06-19 19:57:52 +03:00
Alexander Medvednikov
d215618f4c
sokol: mark pub structs
2022-06-19 19:47:47 +03:00
yuyi
de136f6baf
checker: improve pub struct check ( fix #14446 ) ( #14777 )
2022-06-19 17:42:22 +03:00
Delyan Angelov
37ef1ee453
tools: do show the output of c2v, when it fails
2022-06-19 17:08:21 +03:00
Delyan Angelov
7b1ade237b
tools: fix the first run of v translate hw.c
2022-06-19 16:19:56 +03:00
Delyan Angelov
b9cb56572f
ci: use VTEST_JUST_ESSENTIAL=1 for the -cstrict test-self task in ubuntu-clang too
2022-06-19 16:08:24 +03:00
Alexander Medvednikov
6875a173ec
cmd: enable v translate, download and install c2v
2022-06-19 15:52:42 +03:00
Delyan Angelov
97be840a6d
ci: use VTEST_JUST_ESSENTIAL=1 for the ubuntu -cstrict gcc task (prevent 2 hour runs)
2022-06-19 13:29:36 +03:00
lemon
e0310964d9
native: initial support for defer ( #14779 )
2022-06-18 23:51:31 +03:00
Alexander Medvednikov
10051e005a
parser, cgen: temporary prefix ++ for translated code
2022-06-18 13:30:47 +03:00
wahur666
18dfaf6164
tools: handle fn attributes/comments more robustly, when v missdoc is run ( #14774 )
2022-06-18 11:02:39 +03:00
yuyi
01fdd5d07f
cgen: add a minor optimisation for array.push_many ( #14770 )
2022-06-17 09:44:13 +03:00
Alexander Medvednikov
b89617726c
pref: is_o
2022-06-16 20:51:21 +03:00
Louis Schmieder
5df3d8ac75
orm: mysql fixes ( #14772 )
2022-06-16 20:19:49 +03:00
Alexander Medvednikov
fb5a40d1c8
builder: handle linker errors when building .o files
2022-06-16 15:19:13 +03:00
yuyi
26714fadc5
ast, checker, cgen: improve sorting globals and consts ( #14769 )
2022-06-16 14:32:41 +03:00
Alexander Medvednikov
9c72b85f72
checker: temporary c2v struct init fix
2022-06-16 14:24:17 +03:00
Danilo Lekovic
df239b9208
doc: fix 'specifing' typo ( #14768 )
2022-06-16 11:12:58 +03:00
yuyi
f2962c34dd
cgen: format module_init generated c code ( #14764 )
2022-06-16 11:01:17 +03:00
Delyan Angelov
205221074c
tools: support v watch -k run examples/gg/rectangles.v (keep a program running)
2022-06-15 18:00:10 +03:00
yuyi
0c1708db23
cgen: minor cleanup in stmt() ( #14763 )
2022-06-15 17:44:00 +03:00
yuyi
5135952c9c
v.util: add a retry loop for tool compilation in launch_tool() ( #14760 )
2022-06-15 11:59:53 +03:00
yuyi
7f38b92ca8
cgen: simplify sorting globals and consts ( #14761 )
2022-06-15 11:56:17 +03:00
yuyi
7c50d276c7
ast: minor cleanup in is_comptime_type() ( #14759 )
2022-06-14 14:21:45 +03:00
lemon
e4e858b132
transformer: fix a bug with string literal length ( #14757 )
2022-06-14 12:42:45 +03:00
yuyi
6d8a0ad15d
ast, checker, cgen: sort consts with call expr ( fix #14748 ) ( #14755 )
2022-06-14 10:50:20 +03:00
Spydr
2f1a896d18
native: integer-to-string conversion ( #14758 )
2022-06-14 00:35:25 +03:00
Leo Developer
67716b5b59
cgen: fix comptime if attributes for test_ functions ( #14756 )
2022-06-13 21:22:25 +03:00
yuyi
5efa67906c
cgen: sort const array init order ( fix #14748 ) ( #14749 )
2022-06-13 21:09:24 +03:00
yuyi
3535927bcd
parser: correct error message for seclector_expr_assign.vv ( #14747 )
2022-06-12 20:29:54 +03:00
Delyan Angelov
139c34c07d
gg: optimise app.gg.show_fps() (cache ctx.text_size() results, round frame to int without interpolation, center text inside the background rectangle)
2022-06-12 16:07:00 +03:00
Delyan Angelov
4682e17ac1
gg: fix v -d show_fps run examples/gg/stars.v
2022-06-12 15:17:04 +03:00
Delyan Angelov
7e06203da8
gg: support -d show_fps for all gg apps
2022-06-12 14:20:32 +03:00
Delyan Angelov
ff8e286c88
compress.gzip: support gzip.decompress(data, verify_length: false, verify_checksum: false)?
2022-06-12 11:25:01 +03:00
Spydr
5c104cf981
native: implement neg() for arm64 ( #14745 )
2022-06-12 09:42:39 +03:00
Spydr
8fa1e30dd2
native: int-to-string conversion detecting zeros and negative values ( #14743 )
2022-06-11 21:20:13 +03:00
Alexander Medvednikov
f08266ab66
doc: autofree/gc update
2022-06-11 20:44:28 +03:00
Joe Conigliaro
f3351b6a29
pref: maintain order of 'debug' in compile defines as mod cache key depends on it
2022-06-12 02:22:04 +10:00
Delyan Angelov
5cea8d30fa
ci: make crun_test.v more robust by reducing the tested gap from 5x to 4x
2022-06-11 18:44:02 +03:00
yuyi
a538ab7e8c
cgen: minor cleanup for sort globals and consts ( #14742 )
2022-06-11 18:42:22 +03:00
yuyi
cdf4ffc513
cgen: sort globals and consts definitions ( #14739 )
2022-06-11 17:17:49 +03:00
lemon
c7a619d16e
native: support else, break, continue ( #14738 )
2022-06-11 11:50:19 +03:00
Dialga
da7a166708
v.pkgconfig: fix duplication in short flags to the standalone pkgconfig binary ( #14740 )
2022-06-11 11:06:55 +03:00
spaceface
26d051475a
cgen: ensure closures are kept alive when using the GC ( #14736 )
2022-06-10 19:48:50 +03:00
Delyan Angelov
b27b6b2047
tools: let v gret make an easily visible diff.png image after regressions, and upload it too, to make CI failures easier to diagnose
2022-06-10 15:38:50 +03:00
yuyi
fcaf529228
parser, checker: check undefined ident in if expr using generic type name ( #14734 )
2022-06-10 11:57:26 +03:00
Larpon
690a8422d1
vcomplete: add -no-parallel to flag completions ( #14735 )
2022-06-10 11:57:12 +03:00
Delyan Angelov
f4869bcdc6
ci: add apt-get update before apt-get install in gg-regressions
2022-06-10 11:50:30 +03:00
Delyan Angelov
ea71ea3ec1
examples: speed up mandelbrot.v a little, increase iterations/details too
2022-06-09 20:10:00 +03:00
yuyi
922f003729
cgen: fix fixed array global variable ( fix #14712 ) ( #14730 )
2022-06-09 16:53:19 +03:00
Larpon
be23ddc253
ci: remove VFLAGS: -gc none from vab runs ( #14731 )
2022-06-09 15:37:53 +03:00
yuyi
784361f153
checker: fix generic method on aliases receiver type ( #14729 )
2022-06-09 15:36:31 +03:00
Delyan Angelov
e1360ccf8c
ci: add VTEST_JUST_ESSENTIAL=1 ./v test-self mode. Use it for alpine-docker-musl-gcc .
2022-06-09 15:26:52 +03:00
Ben
39e54a508b
os: correct description of windows_volume function ( #14726 )
2022-06-09 10:56:58 +03:00
spaceface
4ed9780b80
all: enable -gc boehm by default ( #14577 )
2022-06-09 00:44:29 +03:00
yuyi
e6580fefaa
ast: cleanup in generic_insts_to_concrete() ( #14724 )
2022-06-08 23:17:03 +03:00
Spydr
8563696476
native: added new helper functions ( #14723 )
2022-06-08 23:16:15 +03:00
Larpon
f58e5a94c2
gg: fire resize event before init if necessary on Android ( #14725 )
2022-06-08 21:43:20 +03:00
Ben
c6b1c8d07a
os: add windows_volume function ( #14721 )
2022-06-08 21:26:24 +03:00
Mikey
5ac9b5c9f1
term.ui: don't print event data in readme example (vlang#14719) ( #14720 )
2022-06-08 09:36:22 +03:00
Delyan Angelov
4b3c3d9082
checker: add error for if c >= A && c <= Z { in non generic functions
2022-06-07 20:43:31 +03:00
Larpon
96a9faf2fd
strings: add split_capital ( #14716 )
2022-06-07 18:43:06 +03:00
David Valdespino Pavon
1d462136bc
net.http: cookie parsing fixes ( #14420 )
2022-06-07 12:52:43 +03:00
Larpon
8027919285
ci: update vab install (vlang/vab#176) ( #14713 )
2022-06-07 12:51:43 +03:00
Delyan Angelov
82594c0156
v.vcache: improve the output of -d trace_usecache_n
2022-06-07 12:39:30 +03:00
Delyan Angelov
a942ecf737
v.vcache: support -d trace_usecache_n too (less verbose tracing for just the initialisation of CacheManager)
2022-06-07 12:24:53 +03:00
Delyan Angelov
82d23dedf1
builtin: add flush_stdout and flush_stderr to builtin.js.v, for feature parity with builtin.c.v
2022-06-07 12:15:35 +03:00
yuyi
7780f56c31
cgen: fix cast to generic interface ( #14708 )
2022-06-07 08:32:25 +03:00
ChAoS_UnItY
73b59c7b16
cgen: fix none literal str() function calling ( #14704 )
2022-06-07 01:29:27 +03:00
yuyi
abf35270cf
checker: fix json decoder with generic struct ( #14700 )
2022-06-06 19:25:02 +03:00
ChAoS_UnItY
ce26d5bc5c
cgen: fix mutable receiver type calling mapping function causes C error ( fix #14230 ) ( #14696 )
2022-06-06 18:34:04 +03:00
Delyan Angelov
778fe2cde0
ast: use [direct_array_access] for attrs []Attr lookup methods
2022-06-06 14:43:04 +03:00
Delyan Angelov
6398043094
cgen: fix missing function names in declarations on [c2v_variadic][c: xyz]fn deh_fprintf(fstream &C.FILE, fmt &i8)
2022-06-06 14:33:24 +03:00
Alexander Medvednikov
7f67981637
checker: allow literal args as references in translated code
2022-06-06 13:24:36 +03:00
yuyi
8a2236d3f8
cgen: fix generic interface with non-generic method ( #14694 )
2022-06-06 12:30:48 +03:00
Alexander Medvednikov
e89a6269e4
checker: do not require fn main when building an object file
2022-06-06 12:29:57 +03:00
yuyi
ce771876a3
cgen: fix nested map index check ( fix #14683 ) ( #14687 )
2022-06-06 06:29:22 +03:00
ChAoS_UnItY
df80b33dc0
cgen: fix array init with it ( fix #14679 ) ( #14680 )
2022-06-05 19:41:54 +03:00
Leo Developer
3a90d8ef14
compress: add a new module compress.gzip too ( #14686 )
2022-06-05 18:53:45 +03:00
Ikko Ashimine
7b25957a26
builtin: fix typo in array.v ( #14688 )
2022-06-05 18:49:40 +03:00
ChAoS_UnItY
b000728845
compress.gzip / deflate: rename gzip module into deflate module ( #14682 )
2022-06-05 08:48:38 +03:00
yuyi
4cf6abd99d
checker: check using literal argument as reference parameter ( #14674 )
2022-06-05 08:44:35 +03:00
ChAoS_UnItY
f6ebbc99cd
cgen: fix array type as interface ( fix #14677 ) ( #14681 )
2022-06-05 05:05:48 +03:00
yuyi
5d429140a4
json: fix json decode with missing map type field ( #14678 )
2022-06-04 20:27:11 +03:00
Wertzui123
d71fd04c81
thirdparty/sokol: apply speaker/headset bug fix from latest upstream sokol_audio.h ( #14676 )
2022-06-04 20:24:07 +03:00
Delyan Angelov
3c5ae41712
examples: simplify the shebang in the v_script.vsh example
2022-06-04 20:15:39 +03:00
Delyan Angelov
3ac3375b43
cgen: fix for (int i = 0; i < 10; i++, a++) { (multiple expressions in the inc part)
2022-06-04 20:03:59 +03:00
Delyan Angelov
82eb495617
ci: on windows-msvc, skip const_fixed_array_containing_references_to_itself_test.v
2022-06-04 13:05:27 +03:00
Delyan Angelov
f2171b4148
ci: fix macos clang failures with const_fixed_array_containing_references_to_itself_test.v
2022-06-04 09:15:37 +03:00
Delyan Angelov
4cfff58fdf
checker: allow for references to fixed array consts inside their initialisation const a = [ ... &a[0] ...]!
2022-06-04 09:04:12 +03:00
Alexander Medvednikov
a8461a900d
vweb: use http.Cookie
2022-06-04 06:52:46 +03:00
yuyi
66572d5ead
ast: cleanup is_lit() ( #14672 )
2022-06-03 21:02:36 +03:00
Delyan Angelov
c15d1c6e7e
cgen,ci: fix cast_bool_to_int_test.v on windows-tcc
2022-06-03 20:53:10 +03:00
Delyan Angelov
6f9070e06d
cgen: do not initialise externally declared globals (with -cstrict with [c_extern]).
2022-06-03 19:14:01 +03:00
Delyan Angelov
dbaecdc058
cgen: simplify int(bool_var) casts; support [c_extern] tag for global declarations
2022-06-03 18:48:08 +03:00
yuyi
daa94de93f
cgen: fix autofree_variable() ( fix #14576 ) ( #14602 )
2022-06-03 17:41:30 +03:00
yuyi
dcbd8d6405
cgen: fix if expr with optional method call ( #14600 )
2022-06-03 15:57:39 +03:00
ChAoS_UnItY
65066098d8
compress: Add gzip module & refactor compress & compress.zlib module ( #14599 )
2022-06-03 09:00:11 +03:00
yuyi
251716fa0e
vrepl: fix error for exitasdfasdf in repl ( fix #14593 ) ( #14598 )
2022-06-02 19:59:57 +03:00
Delyan Angelov
9f7656f328
ci: vfmt vlib/v/checker/check_types.v
2022-06-02 19:02:34 +03:00
Delyan Angelov
c892b3203e
checker: speed up check_expected_call_arg, by only calling Table.type_to_str on errors
2022-06-02 18:58:20 +03:00
Hunam
41414b5d5f
vlib: add net.http.mime ( #14516 )
2022-06-02 18:07:25 +03:00
Delyan Angelov
aae5b9fb95
ast.table: cache the returned values of Table.type_to_str_using_aliases/2
...
This results in 9% speedup of the checker stage for V itself.
2022-06-02 17:53:30 +03:00
Delyan Angelov
ed759b2ec9
ci: vfmt vlib/v/parser/parser.v
2022-06-02 15:55:13 +03:00
Delyan Angelov
031629faa1
tools: add cmd/tools/measure/scanner_speed.v and cmd/tools/measure/parser_speed.v
2022-06-02 13:50:25 +03:00
Delyan Angelov
9a0ec7f367
strings: update docs for .str() and for .free()
2022-06-02 10:41:32 +03:00
yuyi
545eaae77b
ast: fix IfExpr.str() ( #14595 )
2022-06-02 10:28:31 +03:00
Alexander Medvednikov
8b0e843cb8
checker, cgen: c2v variadic fixes
2022-06-02 09:35:25 +03:00
yuyi
10fb16e00b
parser: fix optional with multiple statements ( #14592 )
2022-06-02 08:23:16 +03:00
Claudio Cesar de Sá
5bf246fce6
examples: some new graphs algorithms and improving 2 others ( #14556 )
2022-06-02 07:11:29 +03:00
Ben
e201665e92
os: fix file_ext function ( #14566 )
2022-06-02 07:09:46 +03:00
Wertzui123
f971da9a93
help: add Windows to the list of supported native backends in v help build-native ( #14589 )
2022-06-02 07:08:46 +03:00
ChAoS_UnItY
a95cdac635
cgen: fix type not being unaliased ( fix #14568 ) ( #14591 )
2022-06-02 06:21:01 +03:00
yuyi
55951e0943
checker: minor cleanup in if_expr() ( #14584 )
2022-06-02 06:20:09 +03:00
Hunam
d0a1608ede
ci: re-enable Go2V test suite ( #14588 )
2022-06-02 06:19:38 +03:00
yuyi
33a2d00445
cgen: fix fixed array of aliases struct ( #14583 )
2022-06-01 16:56:12 +03:00
Delyan Angelov
bf70f0b436
v: add support for v crun examples/hello_world.v, use crun mode for .vsh files by default. ( #14554 )
2022-06-01 14:47:52 +03:00
Delyan Angelov
c91b646372
examples: document how to produce the shared library, needed for a standalone run of examples/dynamic_library_loading/use.v
2022-06-01 13:58:49 +03:00
yuyi
786045c7da
parser: fix comptime if script mode ( fix #6419 ) ( #14578 )
2022-06-01 13:27:27 +03:00
Delyan Angelov
5a2c271bd4
cgen: do not #include signal.h, on -os wasm32 and -d no_segfault_handler
2022-06-01 13:21:22 +03:00
Delyan Angelov
2fa64f1471
ci: skip embed_file_test.v for now
2022-06-01 12:06:02 +03:00
yuyi
fefb9643b2
checker, cgen: fix array index optional with if expr ( #14575 )
2022-06-01 09:18:59 +03:00
Delyan Angelov
846ddfd728
v: always embed file data of \$embed_file(file) constructs, even without -prod, unless -d embed_only_metadata is given.
2022-06-01 09:08:18 +03:00
Alexander Medvednikov
f40c30c3dc
cgen: fix goto label
2022-06-01 06:34:04 +03:00
Alexander Medvednikov
c54c9b817c
cgen: c2v infix fix
2022-06-01 06:14:28 +03:00
Larpon
84e375e38a
toml: update readme with value_opt() usage ( #14569 )
2022-05-31 19:02:33 +03:00
yuyi
80cc88427b
scanner: minor cleanup in scanner.v ( #14565 )
2022-05-31 11:52:47 +03:00
playX
db34adaec8
builtin.js: fix string.int method ( #14564 )
2022-05-31 11:52:11 +03:00
Delyan Angelov
dc30089c74
v.util, v.builder: fix util.module_is_builtin on macos with -usecache
2022-05-31 09:30:45 +03:00
Ben
4ffdcf8058
os: add existing_path function ( #14536 )
2022-05-31 06:32:12 +03:00
Delyan Angelov
928dafeb6d
strconv: make f64_to_str_lnd1 public (fix building vlang/coreutils printf)
2022-05-30 22:14:22 +03:00
Delyan Angelov
fc64f09f0b
crypto.md5: improve performance of md5.blockblock_generic
2022-05-30 21:56:39 +03:00
Delyan Angelov
0f3b2c2ae7
builtin: use C.fwrite (buffered) for _write_buf_to_fd ( #14558 )
2022-05-30 19:15:05 +03:00
Delyan Angelov
58ebc0680e
builtin: fix sporadic linking failures on v -cc gcc -gc boehm examples/hello_world.v
2022-05-30 15:17:01 +03:00
yuyi
844ba2a177
checker: vfmt overload_return_type.vv ( #14557 )
2022-05-30 13:49:13 +03:00
Hunam
78d1b7f4ef
net.http: Response.text -> Response.body ( #14478 )
2022-05-29 20:27:18 +03:00
yuyi
2c5febe25e
scanner: fix string interpolation with inner curly braces ( fix #12242 ) ( #14553 )
2022-05-29 19:28:23 +03:00
yuyi
79d861ad4f
parser: fix cast or dump arguments ending with comma ( #14552 )
2022-05-29 09:15:55 +03:00
Delyan Angelov
63d15086e7
docs: document explicitly, that maps support if v := m[k] { too
2022-05-28 21:36:13 +03:00
Delyan Angelov
c006d5c242
cgen: add support for v -cmain SDL_main sdl_example.v
2022-05-28 21:16:48 +03:00
yuyi
c0ef6dbde8
cgen: fix cross assign in closure ( #14549 )
2022-05-28 20:47:54 +03:00
yuyi
7dcc19df55
ast: fix call_expr.str() with propagate_option or propagate_result ( #14550 )
2022-05-28 20:47:29 +03:00
Delyan Angelov
c6a6eb9a3c
ci: temporary workaround for cross assignment in a closure leading to cgen error
2022-05-28 13:21:59 +03:00
yuyi
b8e8768928
parser, cgen: fix cross assign with parentheses ( #14545 )
2022-05-28 12:02:17 +03:00
yuyi
a46cf10e92
checker: fix declare assign literal with closure ( #14544 )
2022-05-28 11:50:37 +03:00
Delyan Angelov
4894f61998
toml: add pub fn (d Doc) value_opt(key string) ?Any { and some tests for toml.parse_dotted_key/1
2022-05-28 09:18:18 +03:00
yuyi
a971b9a99a
parser: fix match expr case with struct init ( #14538 )
2022-05-27 18:51:40 +03:00
Larpon
f3e7f24ee6
tools: implement v missdoc --diff oldv newv ( #14537 )
2022-05-27 18:19:06 +03:00
spaceface
52a3e5e780
cgen: fix a race condition in the closure implementation ( #14532 )
2022-05-27 17:35:02 +03:00
Delyan Angelov
f7995c8916
checker: fix error position in fn f() int { return 1,2 }
2022-05-27 16:53:24 +03:00
Delyan Angelov
36cb552918
ci: vfmt cmd/tools/vpm.v
2022-05-27 15:22:47 +03:00
Delyan Angelov
156aa661ee
tools: fix v install https://github.com/nedpals/vex.git ( fix #14483 )
2022-05-27 15:21:01 +03:00
Louis Schmieder
a83ac948a0
orm: document & fix pg ( #14533 )
2022-05-26 22:53:09 +03:00
yuyi
b97ef09b2d
checker: cleanup checker.v ( #14530 )
2022-05-26 22:52:42 +03:00
Delyan Angelov
bb6ef8bba8
cgen: fix parallel cgen for json encoding of struct fields that have default values
2022-05-26 16:55:44 +03:00
Delyan Angelov
8c969efe6b
tests: make json_test.v less noisy, to see errors easier
2022-05-26 15:27:54 +03:00
Wertzui123
1017335365
x.ttf: fix typo in README ( #14528 )
2022-05-26 11:17:15 +03:00
yuyi
3849cdcecc
fmt: fix fn return types list ending with comma ( #14529 )
2022-05-26 04:20:22 +03:00
Delyan Angelov
410b57b2fa
all: add support for struct field deprecation ( #14527 )
2022-05-26 00:44:18 +03:00
Larpon
95cc535fc7
ci: use missdoc as subcmd ( #14524 )
2022-05-25 19:07:07 +03:00
Larpon
9f5e999b4a
tools: add v missdoc --verify mode ( #14525 )
2022-05-25 19:06:11 +03:00
Larpon
6c08af63ff
embed_file: rename debug_embed_file_in_prod -> force_embed_file ( #14523 )
2022-05-25 18:26:17 +03:00
yuyi
59e57f0c62
fmt: fix fmt of Ok<[]Token>{[]} ( #14522 )
2022-05-25 15:17:30 +03:00
kahsa
dd8c96f6bc
net.html: use -d debug_html instead of -g, prevent undesired output, while debugging user programs ( #14521 )
2022-05-25 11:23:56 +03:00
Delyan Angelov
31c234485a
cgen: split keys and values in generated new_map_init calls into separate lines
2022-05-25 10:26:17 +03:00
yuyi
e19ac0c4a7
checker: check fn call with argument mismatch ( #14519 )
2022-05-25 09:00:26 +03:00
yuyi
79a75c5ac0
parser: fix fmt error for json decode ( #14520 )
2022-05-25 08:59:22 +03:00
yuyi
0eb3f8854d
fmt: fix file with just imports ( fix #14267 ) ( #14513 )
2022-05-24 20:14:08 +03:00
Ben
f431020764
os: minor clean ups on filepath.v ( #14506 )
2022-05-24 11:29:32 +03:00
yuyi
f35f7fe997
fmt: fix using rand.seed() when import rand and rand.seed ( #14511 )
2022-05-24 11:21:49 +03:00
yuyi
a5b98cb267
parser: check fn decl multi return types without parentheses ( #14508 )
2022-05-24 05:15:31 +03:00
yuyi
5ade39f8db
cgen: fix sizeof('str') and sizeof(r'str') ( #14507 )
2022-05-24 05:14:38 +03:00
Delyan Angelov
953ef1f8c9
pref: add support for -dump-files - and for -dump-modules -
2022-05-23 19:51:21 +03:00
Delyan Angelov
dda49fe735
v.builder: support -dump-c-flags with -cc msvc too
2022-05-23 18:29:39 +03:00
yuyi
a3c0a9b791
checker: minor optimization in fn_call() and method_call() ( #14503 )
2022-05-23 08:00:57 +03:00
yuyi
4ef9e2c05a
parser: fix sizeof(c'str') ( fix #14499 ) ( #14502 )
2022-05-23 01:59:39 +03:00
Alexander Medvednikov
863eeca2e0
checker: vfmt checker.v
2022-05-23 00:12:37 +03:00
Daniel Däschle
5e95bdc451
checker: allow but deprecate propagating result as option ( #14500 )
2022-05-23 00:11:29 +03:00
yuyi
7f03b89611
checker: check method call argument type mismatch ( #14496 )
2022-05-22 22:16:46 +03:00
spaceface
ba859c584b
builtin: add static GC support on Windows with TCC ( #14497 )
2022-05-22 21:25:46 +03:00
Delyan Angelov
5328dabad1
time: simplify some very commonly used t.format methods
2022-05-22 21:09:49 +03:00
spaceface
e5ff2ab455
ci: run on all branches on forks ( #14498 )
2022-05-22 20:19:04 +03:00
yuyi
1f3336c9d3
checker: fix map get anon fn value with mut argument ( fix #14479 ) ( #14493 )
2022-05-22 16:28:53 +03:00
Alexander Medvednikov
245d28d57a
checker: c2v infix fix
2022-05-22 14:53:21 +03:00
Daniel Däschle
d3ffd983c8
markused: add _result_ok ( #14495 )
2022-05-22 14:52:38 +03:00
Subhomoy Haldar
3647fb4def
rand: move dist functions to top module and PRNG interface; minor cleanup ( #14481 )
2022-05-22 13:21:52 +03:00
Delyan Angelov
64a686f41f
examples: speed up mandelbrot.v by using a constant size thread pool, processing smaller chunks
2022-05-22 11:12:16 +03:00
yuyi
50ab2cfd1a
fmt: fix 'strings' name variable call generate auto import ( fix #9713 ) ( #14485 )
2022-05-21 15:01:58 +03:00
Delyan Angelov
0ceb16f285
v.builder: use /NOLOGO, when building cached object files with msvc
2022-05-21 12:56:24 +03:00
Delyan Angelov
c0dcc80e18
cgen: support -profile - for _test.v files too
2022-05-21 10:59:01 +03:00
Delyan Angelov
a7afb2d1eb
time: remove import math dependency, by implementing a simpler version of mceil
2022-05-21 02:04:17 +03:00
Ben
971c55cf30
os: add norm_path and abs_path function ( #14435 )
2022-05-21 01:16:29 +03:00
Daniel Däschle
efc5cab8c3
checker,cgen: allow result if guard ( #14474 )
2022-05-20 19:34:53 +03:00
Alexander Medvednikov
53c217fe5e
cgen: do not generate _vinit() for translated .o code
2022-05-20 19:28:37 +03:00
Vincenzo Palazzo
17bba712bd
checker: ban unsafe pointer/fn comparison ( #14462 )
2022-05-20 18:30:16 +03:00
Daniel Däschle
d81fbb1ccd
ci: only run on master ( #14476 )
2022-05-20 18:27:35 +03:00
Delyan Angelov
dd1049f21d
thirdparty: fix typo in atomic.h, cleanup comments.
2022-05-20 14:21:31 +03:00
yuyi
28b0cbddad
parser: check error for script mode that define main function ( fix #14467 ) ( #14469 )
2022-05-20 14:20:18 +03:00
yuyi
913164bc73
builtin: minor cleanup in string_interpolation.v ( #14471 )
2022-05-20 14:19:27 +03:00
yuyi
bf44572f30
fmt: fix chain calls with comments ( #14470 )
2022-05-20 11:47:44 +03:00
StunxFS
11bdb04d0c
json: fix struct field default value support ( #14304 )
2022-05-20 11:22:17 +03:00
Delyan Angelov
ca00b59b3f
tests: make potential failures in urllib_test.v more informative
2022-05-20 08:49:56 +03:00
David 'Epper' Marshall
120f31b4d9
math: update documentation ( #14457 )
2022-05-20 08:45:54 +03:00
David 'Epper' Marshall
23568f19da
url: fix parse ( #14456 )
2022-05-20 02:58:58 +03:00
crthpl
95d24e543d
checker, cgen: fix shared non-decl assignment ( #14466 )
2022-05-20 02:58:11 +03:00
yuyi
55e7daa2f9
cgen: simplify auto_str_methods.v ( #14463 )
2022-05-19 22:29:15 +03:00
crthpl
46f94e8d68
cgen: fix autostr of shared fields ( #14455 )
2022-05-19 17:00:27 +03:00
Daniel Däschle
a52fbc5e51
checker: forbid optional variable ( #14460 )
2022-05-19 16:04:44 +03:00
yuyi
3291c59ebf
cgen: minor cleanup in auto_str_methods.v ( #14461 )
2022-05-19 14:02:07 +03:00
Delyan Angelov
634e8c3624
vfmt: keep selective imported names used for generic calls
2022-05-19 12:48:43 +03:00
yuyi
15c62bc8e8
parser: improve error messages of 'for val in array' ( #14459 )
2022-05-19 11:53:27 +03:00
Delyan Angelov
25812e52f0
ci: use V_CI_CSTRICT=1 consistently for every v -cstrict test-self
2022-05-19 11:52:31 +03:00
Delyan Angelov
a52590572f
tests: fix the push_work_on_channel.vv output
2022-05-19 11:30:36 +03:00
Delyan Angelov
3d5617c4fa
tests: re-add the disambiguated for (val in [TokenValue(+), TokenValue(-)]) { test
2022-05-19 08:31:03 +03:00
Delyan Angelov
809b1ca3b4
Revert "parser: fix 'val in array' as condition in for stmt ( fix #14440 ) ( #14451 )"
...
This reverts commit b482c0512b .
2022-05-19 08:29:30 +03:00
yuyi
b482c0512b
parser: fix 'val in array' as condition in for stmt ( fix #14440 ) ( #14451 )
2022-05-18 20:38:53 +03:00
Delyan Angelov
805a7d9713
ci: skip more .vv files on specific jobs
2022-05-18 20:04:59 +03:00
yuyi
5b96f7e8fd
checker: split up infix.v from checker.v ( #14449 )
2022-05-18 14:52:53 +03:00
yuyi
4cbfa884c5
cgen: fix another error for 'in array of sumtype' ( #14448 )
2022-05-18 14:39:35 +03:00
Delyan Angelov
f2447a4bd8
tests: do not use -prod for compiling .vv files in vlib/v/checker/tests/ and vlib/v/parser/tests/
2022-05-18 13:39:57 +03:00
Delyan Angelov
2cc3b74e19
tests: cleanup compiler_errors_test.v using language features (chan), instead of raw sync.new_channel and unsafe { ch.push } calls
2022-05-18 13:39:56 +03:00
Larpon
9de0c725f6
checker: add test for empty #flag node, ( fix #14291 ) ( #14447 )
2022-05-18 13:38:58 +03:00
Adam Oates
a786c58d0a
os: add fn user_names() ( #14424 )
2022-05-18 13:37:34 +03:00
yuyi
417a6dc506
cgen: fix error for 'in array of sumtype' ( #14444 )
2022-05-18 08:51:31 +03:00
Larpon
8eea861c93
vcomplete: improve flag completion, add missdoc ( #14415 )
2022-05-18 08:50:32 +03:00
Delyan Angelov
ed17779434
math.big: fix Integer.bit_len() when there are no digits in the number
2022-05-18 08:29:08 +03:00
Delyan Angelov
ebac3bebb1
pref: pass -v after a command, to the command only, do not set verbose mode on
2022-05-18 07:03:00 +03:00
playX
a608516b82
checker: c2v fixed array fix ( #14436 )
2022-05-18 02:35:05 +03:00
spaceface
b5fb848508
cgen: reduce the closure memory usage ( #14437 )
2022-05-18 02:34:51 +03:00
Delyan Angelov
65d9c8fa6f
tools: add a vet_known_failing_windows skip list to v test-cleancode
2022-05-17 20:19:37 +03:00
Delyan Angelov
dfa2d63616
ci: use VJOBS=1 for the macos v test-cleancode task too; cleanup periodic.yml
2022-05-17 19:55:28 +03:00
Delyan Angelov
4e56147223
ci: vfmt builtin_d_use_libbacktrace.c.v
2022-05-17 19:41:57 +03:00
Alexander Medvednikov
2a06290ac7
cgen: fix eq generation for translated code
2022-05-17 15:30:05 +03:00
Ned
db4b49a5ca
builtin: print libbacktrace output to stderr, on panics/segfault crash ( #14434 )
2022-05-17 14:56:34 +03:00
Delyan Angelov
da42f0d42b
ci: add an early step 'All code is formatted' to more workflows.
2022-05-17 13:14:08 +03:00
Delyan Angelov
3fc4459485
ci: ignore orm_joined_tables_select_test.v on tasks, that do not have sqlite installed
2022-05-17 12:53:07 +03:00
yuyi
020845f6c3
cgen: fix alias of array that has builtin method ( #14432 )
2022-05-17 12:26:26 +03:00
yuyi
d7b1e57186
v.builder: improve builder error messages ( fix #14386 ) ( #14421 )
2022-05-17 12:12:20 +03:00
yuyi
60e817ff32
cgen: minor optimization in index_of_array/map() ( #14429 )
2022-05-17 12:08:44 +03:00
yuyi
d6aa85d059
parser: fix panic for parse invalid map type ( #14431 )
2022-05-17 12:05:10 +03:00
playX
7c6eaa8204
checker: allow to use [n]anyptr as [n]otherptr in check_types (c2v fix) ( #14433 )
2022-05-17 11:55:04 +03:00
Delyan Angelov
78ab3296c9
checker: fix orm bug, when a joined table field context replaced the original table field context
2022-05-17 11:45:17 +03:00
WoodyAtHome
02c8a6057c
builtin.string: new fn (s string) is_ascii() bool ( #14418 )
2022-05-17 08:01:03 +03:00
Alexander Medvednikov
d10f83ce15
cgen: fix c2v struct eq
2022-05-17 03:39:48 +03:00
playX
bc397bb0e1
checker: c2v array fix ( #14426 )
2022-05-17 00:08:41 +03:00
Delyan Angelov
32dd801201
checker: apply fix for ui suggested by spaceface
2022-05-16 21:33:02 +03:00
Delyan Angelov
9cb8bb2968
Revert "Revert "checker: allow using methods as vars when expecting a ctx arg ( #14414 )""
...
This reverts commit e5c7fe3006 .
2022-05-16 21:29:47 +03:00
yuyi
c624de8523
cgen: fix struct field array index error ( #14417 )
2022-05-16 19:37:39 +03:00
Delyan Angelov
e5c7fe3006
Revert "checker: allow using methods as vars when expecting a ctx arg ( #14414 )"
...
This reverts commit 36bec823c2 .
2022-05-16 14:19:33 +03:00
Delyan Angelov
39874ae168
clipboard: fix v -gc boehm run x.v, where x.v does c.paste() ( fix #14281 )
2022-05-16 12:54:30 +03:00
yuyi
d59f4e9479
ast, cgen: fix generic method with variadic generic argument ( #14404 )
2022-05-16 12:26:38 +03:00
Larpon
ef6225c542
vvet: fix false positive, add test ( #14403 )
2022-05-16 12:24:21 +03:00
yuyi
0ab4133128
cgen: minor cleanup in struct_init() ( #14405 )
2022-05-16 12:22:51 +03:00
spaceface
36bec823c2
checker: allow using methods as vars when expecting a ctx arg ( #14414 )
2022-05-16 12:05:08 +03:00
WoodyAtHome
c2b763655d
net.smtp: handle UTF-8 subjects according to RFC 1342 ( #14410 )
2022-05-16 11:09:36 +03:00
Delyan Angelov
1cf683d482
checker: add a suggestion for misspelled mod.const_name + a test
2022-05-16 10:29:58 +03:00
Delyan Angelov
b4c529066a
tests: simplify cmd/tools/modules/testing/common.v
2022-05-16 10:29:57 +03:00
Ben
cbb24d34c9
os: fix is_abs_path function for Windows systems ( #14397 )
2022-05-16 09:59:37 +03:00
yuyi
7fe3ef9a6e
fmt: fix fmt error of anon fn with if expr ( fix #14393 ) ( #14413 )
2022-05-16 09:48:21 +03:00
Larpon
5068b8b293
ftp: document all public methods ( #14408 )
2022-05-16 08:52:12 +03:00
Jah-On
02e026e298
clipboard: add [heap] tag to the Clipboard structs ( #14412 )
2022-05-16 08:45:40 +03:00
WoodyAtHome
eeff02a8ee
net.openssl: read doesn't block infinitely ( #14406 )
2022-05-16 08:44:34 +03:00
spaceface
c01a8a1737
checker,gen: allow using methods as function pointers ( #14407 )
2022-05-15 18:28:37 +03:00
Delyan Angelov
c2bc9f4960
sync: only run channel_select_test.v when VTEST_RUN_FLAKY=1
2022-05-15 12:43:04 +03:00
crthpl
e4065bd57b
checker,cgen: fix if expressions in lock expression ( #14384 )
2022-05-15 12:31:07 +03:00
David 'Epper' Marshall
c28051020a
time: fix calculate_date_from_offset ( #14399 )
2022-05-15 10:55:24 +03:00
Delyan Angelov
b50f7fdc71
ci: simplify ci_sanitized.yml again; use v.exe fmt -verify vlib/builtin for windows/msvc instead of v test-cleancode
2022-05-15 10:54:31 +03:00
Delyan Angelov
c70e18ea8f
ci: add a skip list in compiler_test.v (for tmpl_parse_html.vv)
2022-05-15 10:23:13 +03:00
Delyan Angelov
3a09ccc80a
ci: restore .github/workflows/ to its state at cee7856, when all checks were done
2022-05-15 10:23:12 +03:00
Larpon
dd6629e932
examples: fix 2048 scaling on Android ( #14380 )
2022-05-15 09:14:18 +03:00
David 'Epper' Marshall
8d141878ce
math: cbrt fix ( #14395 )
2022-05-14 21:06:38 +03:00
Delyan Angelov
67963e0ff2
ci: further cleanup of ci_sanitized.yml
2022-05-14 20:34:01 +03:00
Delyan Angelov
1225a865a3
ci: simplify ci_sanitized.yml
2022-05-14 20:29:56 +03:00
yuyi
fe9f97074b
cgen: fix appending struct to interface array ( #14388 )
2022-05-14 17:49:42 +03:00
Alexander Medvednikov
3adad32355
tmpl: fix a test
2022-05-14 17:48:50 +03:00
Alexander Medvednikov
b42c824cdb
vweb: simplify @foo by removing V_TEMPLATE rule
2022-05-14 17:46:30 +03:00
Daniel Däschle
f0d46413d9
ci: require code to be formatted before everything else (minimise CI queue length) ( #14396 )
2022-05-14 15:38:15 +03:00
JalonSolov
b3e80a3100
examples: add missing v.mod file ( #14392 )
2022-05-14 14:48:42 +03:00
j. redhead
441637eeb4
checker: fix optionals in infix expression check ( fix #14354 ) ( #14390 )
2022-05-14 00:54:49 +03:00
Delyan Angelov
cee7856c0f
ci: add a quick v test-cleancode check, before more costlier tasks
2022-05-13 12:24:11 +03:00
Delyan Angelov
714ce4e7fc
ci: fix .out regression after d407a64
2022-05-13 11:18:17 +03:00
Delyan Angelov
c1bafe7a5a
ci: extract v_apps_and_modules_compile.yml
2022-05-13 11:02:24 +03:00
playX
6ec4185017
checker: allow to pass alias to array as a pointer (c2v) ( #14389 )
2022-05-13 10:17:28 +03:00
Daniel Däschle
d407a6449d
parser: fix dollar ( closes #14292 ) ( #14378 )
2022-05-13 08:30:10 +03:00
Delyan Angelov
ed12a5c84c
math.big: reduce memory usage of Integer.str() (free intermediary Integers), optimise some operations using [direct_array_access] ( #14353 )
2022-05-13 08:21:34 +03:00
yuyi
3c95504a35
checker, cgen: fix generic fn with array and fixed array arguments ( #14385 )
2022-05-13 06:57:48 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! ( #14366 )
2022-05-13 06:56:21 +03:00
Delyan Angelov
df029da942
Revert "ci: run code-formatting job before everything else (try 2) ( #14379 )"
...
This reverts commit 0972e67f72 .
2022-05-12 23:29:37 +03:00
Daniel Däschle
0972e67f72
ci: run code-formatting job before everything else (try 2) ( #14379 )
2022-05-12 21:58:11 +03:00
Delyan Angelov
8ef9dc6247
ci: run v fmt -w vlib/v/checker/fn.v (fix CI regression after 4952967)
2022-05-12 21:24:12 +03:00
Delyan Angelov
668d1b04d2
parser: make script mode errors more informative, when a top level declaration is encountered, after script mode had already started
2022-05-12 21:14:00 +03:00
Hunam
20139ad756
checker: fix typo ( #14368 )
2022-05-12 12:23:32 +03:00
playX
4952967366
checker: alias C2V fix ( #14377 )
2022-05-12 12:19:31 +03:00
yuyi
f48f7014f0
checker: check error for generic sumtype types ( #14374 )
2022-05-12 11:57:57 +03:00
penguindark
e93a8766e5
regex: fix #14370 , last IST not managed in advance tests ( #14372 )
2022-05-12 11:49:57 +03:00
Delyan Angelov
b7ca4c1668
checker: fix a compiler panic on fntest()?(&int,&int){return test()?}
2022-05-12 11:36:32 +03:00
yuyi
8830af5c89
rand: minor cleanup in choose() ( #14376 )
2022-05-12 11:20:38 +03:00
yuyi
5bc4fea9e0
checker: check error for cast function to string ( #14375 )
2022-05-12 10:04:38 +03:00
CC
901b8f0c24
builtin: add a map.clear() method ( #14373 )
2022-05-12 09:43:01 +03:00
spaceface
49382f1f43
gen: make the closure implementation more performant ( #14352 )
2022-05-12 00:05:14 +03:00
Emily Hudson
c19b037880
net: select with deadlines ( #14369 )
2022-05-12 00:03:48 +03:00
yuyi
cd4fa041ff
checker: check generic sumtype declare error ( #14367 )
2022-05-11 17:39:58 +03:00
Larpon
34a252ef84
os: add raw_execute on Windows ( #14363 )
2022-05-11 16:56:03 +03:00
David 'Epper' Marshall
26b81d68b5
time: update doc comments ( #14359 )
2022-05-11 16:55:19 +03:00
Larpon
0ec1c8d9f0
szip: expose zip_folder ( #14356 )
2022-05-11 16:48:41 +03:00
yuyi
3afc7c4c6d
parser: check error for generic struct parameter ( #14362 )
2022-05-11 13:24:54 +03:00
Delyan Angelov
cf536b848b
Revert "strings: reduce time spent in Builder.writeln (very frequently called)"
...
This reverts commit b53b1cc7cb .
2022-05-11 09:19:37 +03:00
yuyi
8f765ed5f1
checker: minor cleanup and speedups in fn_call() ( #14343 )
2022-05-10 16:41:47 +03:00
yuyi
5697d4375b
cgen: fix error for printing aliases of multi fixed array ( #14348 )
2022-05-10 14:03:18 +03:00
yuyi
606d8cfaca
checker: check error for returning aliases of fixed array ( #14349 )
2022-05-10 14:01:55 +03:00
Isaiah
9e09b709e3
net.http: fix crash on Windows when using Boehm GC ( #14351 )
2022-05-10 14:00:55 +03:00
yuyi
940c78bdfd
checker: minor cleanup in method_call() ( #14342 )
2022-05-09 18:01:44 +03:00
Subhomoy Haldar
79f8a3c796
rand: update README.md ( #14341 )
...
* update README for rand module
* use concrete values
* make sure code works
2022-05-09 17:59:20 +03:00
StunxFS
d24dce8eb3
parser,checker: support $compile_error('message') and $compile_warn('message') ( #14320 )
2022-05-09 08:18:26 +03:00
Dialga
4400f9891e
szip: fix extracting dot folders ( #13387 )
2022-05-09 07:45:36 +03:00
yuyi
8519996201
checker: fix error for match sumtype that referenced before ( #14338 )
2022-05-09 07:32:51 +03:00
Merlin Diavova
106487d62f
pg: resolve PG string datetime values to V time.Time ones ( #14336 )
...
Co-authored-by: Merlin Diavova <md@merlindiaova.org >
2022-05-08 15:37:46 +03:00
David 'Epper' Marshall
650fb493bd
regex: add split ( #14329 )
2022-05-08 15:21:39 +03:00
Delyan Angelov
084f2867b6
time: let time.parse_rfc3339('2015-01-06T15:47:32.080254511Z') succeed (dockerd timestamps, Go's RFC3339Nano).
2022-05-08 14:54:57 +03:00
WoodyAtHome
a0a3499bdc
net.smtp: correct date in smtp body ( #14326 )
2022-05-08 09:15:45 +03:00
Alexander Medvednikov
0526499d5f
tools: hide tcc warning on macos for now
2022-05-08 08:01:55 +03:00
Merlin Diavova
f8747d05dc
pg: add type 18 for pg boolean data type ( #14335 )
2022-05-08 07:17:43 +03:00
StunxFS
d5e70552eb
checker: check error for json.decode ( fix #6732 ) ( #14305 )
2022-05-08 07:17:11 +03:00
David 'Epper' Marshall
aef95721a4
strings: builder: add clear ( #14328 )
2022-05-08 07:15:42 +03:00
yuyi
b04d46770b
ast, checker, cgen: fix error for generic method with generic fn type argument ( fix #14239 ) ( #14333 )
2022-05-07 20:22:20 +03:00
yuyi
724e7f037a
cgen: fix error for if cond with optional expr ( #14334 )
2022-05-07 20:20:00 +03:00
David 'Epper' Marshall
a91226c376
docs: cleanup ( #14327 )
2022-05-07 20:18:42 +03:00
Delyan Angelov
b53b1cc7cb
strings: reduce time spent in Builder.writeln (very frequently called)
2022-05-07 12:55:41 +03:00
Delyan Angelov
7ecd65221e
v.util: support -d trace_cached_read_source_file
2022-05-07 12:55:41 +03:00
Delyan Angelov
56cf0b0a2e
builtin: inline manually isnil calls in array.push_many (very frequently called)
2022-05-07 12:55:40 +03:00
Delyan Angelov
7f974a275a
docs: fix teh typo
2022-05-07 12:55:40 +03:00
Delyan Angelov
f956acd2f6
ci: restore the v -autofree . step for gitly (gitly now has a workaround)
2022-05-07 12:55:40 +03:00
Delyan Angelov
9e8e364493
ci: comment out the go2v testing step for now
2022-05-07 12:55:39 +03:00
Alexander Medvednikov
ca42ace367
Revert "checker: remove more unnecessary void errors"
...
This reverts commit 89c1e7f980 .
2022-05-07 11:03:12 +03:00
Alexander Medvednikov
35cfa0da7c
doc: closures work on arm64 too
2022-05-07 11:02:53 +03:00
playX
6a6c005dc0
checker: c2v fixes ( #14332 )
2022-05-07 09:50:41 +03:00
Alexander Medvednikov
9fb8de14dd
doc: closures now work on Windows
2022-05-07 09:49:33 +03:00
Alexander Medvednikov
89c1e7f980
checker: remove more unnecessary void errors
2022-05-07 09:09:18 +03:00
yuyi
70184ad1f8
scanner: minor simplification in scanner.v ( #14331 )
2022-05-07 08:30:15 +03:00
Alexander Medvednikov
14f06ead1b
cgen: fix c2v consts; enum_decl()
2022-05-07 00:58:37 +03:00
yuyi
621574c12a
checker: fix error for generic method on nested struct ( #14322 )
2022-05-07 00:51:04 +03:00
Hunam
0699f324b5
builtin: add map.values() ( #14301 )
2022-05-06 20:42:01 +03:00
Lathanao
ce99a306c0
net.http: make parse_form return POST requests with json data as a map with a json key, containing the json payload ( #14289 )
2022-05-06 20:23:36 +03:00
StunxFS
87de6df0e6
docs: update keyword list ( #14319 )
2022-05-06 20:17:45 +03:00
Ekopalypse
2027a1969b
v.builder: harmonise the default settings of the different Windows compilers ( #14314 )
2022-05-06 19:28:13 +03:00
Daniel Däschle
76cdf75299
builtin,cgen: rename Option to _option ( #14317 )
2022-05-06 19:25:54 +03:00
yuyi
45fe87c9e3
checker: minor cleanup in fn_call() ( #14307 )
2022-05-05 21:15:54 +03:00
yuyi
3091f31019
checker: check for optional argument in dump() ( #14316 )
2022-05-05 21:15:22 +03:00
Claudio Cesar de Sá
634796ae42
examples: 2 new examples for graph algorithms (topological sorting) ( #14303 )
2022-05-05 18:08:08 +03:00
Andréas Livet
9fde5b067b
docs: add missing function names in the builtin example doc comments ( #14318 )
2022-05-05 17:22:25 +03:00
Daniel Däschle
89fe82b732
checker: fix returning error on reference results ( #14313 )
2022-05-05 17:02:49 +03:00
yuyi
b6058bfd6e
parser, checker: fix generic method on nested struct ( fix #14089 ) ( #14310 )
2022-05-05 11:24:20 +03:00
playX
8afdb1c3ef
checker: c2v: allow passing fixed array as pointer to functions; bool <-> int ( #14309 )
2022-05-05 11:23:57 +03:00
StunxFS
7499506cf8
.gitignore: minor cleanup ( #14279 )
2022-05-05 10:17:24 +03:00
Delyan Angelov
785e9af8f1
ci: comment out the v -autofree . step for gitly temporarily
2022-05-05 09:20:08 +03:00
Delyan Angelov
7170a09382
vfmt: fix stackoverflow on long nested infix expressions
2022-05-05 07:41:43 +03:00
Delyan Angelov
01c1892995
tools: fix building vdoctor.v with v build-tools
2022-05-04 23:30:44 +03:00
Delyan Angelov
a6b3e5d6a5
ci: wrap the too long line in README.md that failed ./v check-md -hide-warnings .
2022-05-04 21:19:57 +03:00
Ned
76a7354506
builtin: add libbacktrace as option for generating stack traces ( #14277 )
2022-05-04 21:17:05 +03:00
yuyi
4242e7610f
checker: add comptime_selector() ( #14286 )
2022-05-04 19:25:58 +03:00
yuyi
e2aa5c9b3f
parser: make peek_token_after_var_list() private ( #14288 )
2022-05-04 19:25:45 +03:00
Ikko Ashimine
223b96a59a
builtin: fix typo in array_bare.v ( #14299 )
2022-05-04 19:25:17 +03:00
Delyan Angelov
1a4d9017e2
builtin: improve support for large arrays ([]int{len: 1_000_000_000} now works), fix an arr.repeat() bug ( #14294 )
2022-05-04 18:42:06 +03:00
Alexander Medvednikov
af8be14639
readme: minor github markdown fix
2022-05-04 18:06:41 +03:00
yuyi
ac90a2b53d
checker: check error for fn call argument mismatch ( fix #14280 ) ( #14283 )
2022-05-04 12:13:22 +03:00
playX
3bd6455178
checker: allow rune->any int and vice versa when translated ( #14285 )
2022-05-04 12:08:34 +03:00
Alexander Medvednikov
3d4b8dffdf
checker: temporary c2v const fix
2022-05-04 08:28:27 +03:00
yuyi
f321422964
checker, cgen: check comptime selector that has no field name ( #14282 )
2022-05-04 07:06:52 +03:00
Alexander Medvednikov
1e9156fd71
checker: c2v rune comparison fix
2022-05-04 06:49:45 +03:00
yuyi
3732db2bcc
cgen: cleanup in gen_array_contains_methods() ( #14274 )
2022-05-03 20:46:07 +03:00
playX
146051b231
checker: allow fixed array to pointer and vice versa when translated ( #14275 )
2022-05-03 20:44:45 +03:00
Delyan Angelov
04a77c731e
tests: add // vtest flaky: true to atomic_test.v
2022-05-03 20:42:12 +03:00
yuyi
63eacede95
checker: check argument mismatch of array.filter/all/any() ( #14273 )
2022-05-03 16:56:18 +03:00
Hunam
6da300428e
doc: add JS backend mention ( #14265 )
2022-05-03 12:51:12 +03:00
yuyi
276bd8060c
cgen: fix error for fixed array in operate ( #14269 )
2022-05-03 12:45:04 +03:00
Delyan Angelov
0e5c1cee48
builtin: improve musl/Alpine support (define weak backtrace/backtrace_symbols/backtrace_symbols_fd symbols) ( #14250 )
2022-05-03 09:17:53 +03:00
Delyan Angelov
4da2908d63
vdoc: fix panic on empty // comment on v doc -f html file.v; turn expected code block after empty example to a warning
2022-05-03 00:02:12 +03:00
StunxFS
cf92224248
cleanup: delete x.v in project root folder ( #14260 )
2022-05-02 22:58:14 +03:00
Delyan Angelov
ab1c265679
builtin: add missing panic_result_not_set/1 callback function.
2022-05-02 22:40:26 +03:00
spaceface
db185598d2
checker: refactor comptime_if_branch ( #14259 )
2022-05-02 22:24:20 +03:00
yuyi
990afe37e1
checker: fix a bug in generics array init ( #14258 )
2022-05-02 16:18:33 +03:00
yuyi
d72a25098a
parser: minor cleanup in interface_decl() ( #14257 )
2022-05-02 16:17:46 +03:00
yuyi
25c1b174ca
checker: fix generic fn infering fn type argument ( fix #14243 ) ( #14256 )
2022-05-02 16:17:27 +03:00
yuyi
b9cf2db6a8
parser: fix inline array's element access ( #14253 )
2022-05-02 16:16:32 +03:00
playX
afbe6bf3a2
cgen: fix const decl gen when translated ( #14255 )
2022-05-02 15:01:59 +03:00
Isaiah
a4fd349cf1
builder: allow -compress to work on windows too, when upx is installed ( #14252 )
...
Allow `-compress` flag on Windows if upx is installed. If upx not installed, same behavior as on linux/mac
2022-05-02 14:28:31 +03:00
yuyi
968d2b4654
cgen: fix fixed array init with it ( #14251 )
2022-05-02 02:00:45 +03:00
spaceface
332e821518
checker, gen: add support for a [minify] struct attribute ( #14247 )
2022-05-02 01:59:17 +03:00
Delyan Angelov
aed2d0caf2
make files: add a make check target, that runs v test-all locally
2022-05-01 13:38:30 +03:00
David 'Epper' Marshall
91c1157810
time: relative update ( #14240 )
2022-05-01 10:47:05 +03:00
Daniel Däschle
ec92d467d1
cgen: fix unsafe return error ( #14233 )
2022-04-30 17:31:28 +03:00
playX
0b54196962
checker: allow pointer index for translated code ( #14231 )
2022-04-30 17:30:55 +03:00
Daniel Däschle
9f8a34a528
all: rename result to _result ( #14232 )
2022-04-30 17:10:30 +03:00
Delyan Angelov
63d413f93c
tools: support v missdoc . instead of v run cmd/tools/missdoc.v .
2022-04-30 16:12:39 +03:00
Delyan Angelov
c0b37409d2
tools: support a v vet -p file.v option that will warn about private functions with missing documentation
2022-04-30 16:09:30 +03:00
Delyan Angelov
8da42bfc85
tests: fix ./v -W build-tools CI failure
2022-04-30 13:49:36 +03:00
Delyan Angelov
5277ce7dce
tests: support for marking _test.v files with // vtest flaky: true, to reduce false positives from the CI
2022-04-30 13:30:02 +03:00
David 'Epper' Marshall
a2338dbb7c
docs: document more builtin functions/methods ( #14229 )
2022-04-30 12:31:23 +03:00
Delyan Angelov
dcdfdf4dd8
tools: make v up more informative on failure
2022-04-30 10:11:02 +03:00
spaceface
dab649ec8a
cgen: rewrite the closure implementation ( #14223 )
2022-04-30 09:32:46 +03:00
Alexander Medvednikov
ce31a01a70
checker: allow voidptr arithmetic in translated code
2022-04-30 05:52:37 +03:00
yuyi
cd30b6ea82
parser: make sure interface field names use uppercase letters ( #14228 )
2022-04-30 05:29:33 +03:00
Daniel Däschle
08fd0ce0de
all: basic implementation of result type ( #14140 )
2022-04-30 01:59:14 +03:00
StunxFS
db185e6580
checker: check for reserved type names in for in ( fix #14072 ) ( #14212 )
2022-04-30 01:25:29 +03:00
Benjamin Thomas
48eb40cd2c
doc: suggest a basic auto-reload setup ( #14216 )
2022-04-29 20:57:04 +03:00
David 'Epper' Marshall
881d0c04f1
time: add custom formatter ( #14202 )
2022-04-29 15:57:08 +03:00
yuyi
ec865cfb37
parser: check interface methods name ( fix #14217 ) ( #14218 )
2022-04-29 15:48:03 +03:00
yuyi
317acfda97
checker: check struct field name using uppercase letters ( #14220 )
2022-04-29 14:57:14 +03:00
Wertzui123
872f739396
builtin: ignore C++ 0xE06D7363 exception errors on windows ( #14225 )
2022-04-29 14:55:29 +03:00
StunxFS
995485c649
builtin: add string.len_utf8() method ( #14208 )
2022-04-29 10:23:57 +03:00
StunxFS
8b798acadd
cgen: fix use of C reserved words inside defer statement ( fix #14101 ) ( #14211 )
2022-04-29 08:04:59 +03:00
Alexander Medvednikov
77645fcf35
builtin: define atoi & ftell
2022-04-29 04:31:51 +03:00
spaceface
14309594fe
ast: add a type_size() method ( #14213 )
2022-04-28 23:35:10 +03:00
David 'Epper' Marshall
5a42350a78
docs: add a v fmt -w . step in the contributing guide ( #14210 )
2022-04-28 23:31:22 +03:00
StunxFS
e24482a143
transformer: minor optimization for 'string literal'.len ( #14207 )
2022-04-28 22:35:16 +03:00
playX
e56385d57d
checker: disable op overloading on structures for translated code ( #14209 )
2022-04-28 20:46:46 +03:00
yuyi
7aca67fb60
ast, parser: fix complex map init ( #14206 )
2022-04-28 17:37:19 +03:00
yuyi
dd94ab890a
cgen: fix go anon fn call with ref argument ( fix #14192 ) ( #14197 )
2022-04-28 14:43:20 +03:00
yuyi
c802688690
ast: fix error for complex map operating ( #14204 )
2022-04-28 13:20:56 +03:00
Atom
a225b25117
arrays: rephrase doc string ( #14205 )
2022-04-28 13:17:53 +03:00
Delyan Angelov
4538efd8f4
eval: small cleanup in the handling of $if platform {
2022-04-28 13:15:09 +03:00
Delyan Angelov
e0ed8f8278
eval: make the interpreter backtrace more efficient and informative.
2022-04-28 12:31:30 +03:00
Delyan Angelov
f72297c331
eval: add support for C.read/3, C.malloc/1, $if openbsd {
2022-04-28 11:30:36 +03:00
Delyan Angelov
be04ec0620
pref: add support for -thread-stack-size 4194304 (default set to 8MB) ( #14168 )
2022-04-28 08:46:33 +03:00
yuyi
7dd5d9ee61
checker: fix error for array of sumtype appending literal value ( #14200 )
2022-04-28 08:44:30 +03:00
yuyi
09f8b6a380
checker: check error in for_c_stmt with optional call ( #14190 )
2022-04-28 08:43:16 +03:00
tzSharing
eb03fad934
gg: improve some loops in draw_rounded_rect* methods ( #14195 )
2022-04-27 22:57:48 +03:00
Delyan Angelov
f53b9b4f12
ci: fix tcc compilation of atomic_test.v
2022-04-27 22:50:18 +03:00
Alexander Medvednikov
7dbfa86f25
all: atomic int fixes
2022-04-27 18:31:21 +03:00
yuyi
82ac39eca6
math: fix error for math.abs(0.0)/math.abs(0) (related #14165 ) ( #14191 )
2022-04-27 13:23:37 +03:00
yuyi
752e105f25
cgen: fix error for generic sumtype casting to typenode ( #14188 )
2022-04-27 11:32:43 +03:00
tzSharing
85f616877f
gg: fix gg.draw_rounded_rect_empty() graphical abnormalities and some optimizations ( #14186 )
2022-04-27 11:22:57 +03:00
playX
b76095f28a
checker: allow + - * on pointers for translated code ( #14183 )
2022-04-26 21:00:44 +03:00
R cqls
c26b7666c7
gg: some stuff required to have svg and png screenshots working on v ui ( #14180 )
2022-04-26 20:59:36 +03:00
yuyi
be513b4c27
cgen: split up array_init() ( #14178 )
2022-04-26 20:58:47 +03:00
Larpon
1c48a8d760
strconv: add missing doc strings ( #14164 )
2022-04-26 18:09:36 +03:00
yuyi
660201c188
cgen: fix error for cast to empty interface ( fix #14162 ) ( #14176 )
2022-04-26 13:26:48 +03:00
Brian Callahan
b9a0e2d285
sokol: support compilation on OpenBSD ( #14169 )
2022-04-26 13:14:00 +03:00
yuyi
38afd74d26
ast, checker, cgen: fix error for multi-return in or expr ( fix #14167 ) ( #14172 )
2022-04-26 12:17:05 +03:00
playX
95880dfe5c
checker: allow indexing through alias to int ( #14177 )
2022-04-26 12:15:35 +03:00
playX
dce2173ac9
checker: c2v fixes ( #14161 )
2022-04-26 01:34:26 +03:00
Alexander Medvednikov
501b293e84
checker: remove already handled "undefined" errors
2022-04-25 16:53:34 +03:00
Larpon
d799abd139
regex: rephrase doc string ( #14159 )
2022-04-25 16:03:13 +03:00
yuyi
e42dc8e228
checker: fix error for match aliases ( #14157 )
2022-04-25 14:42:43 +03:00
yuyi
f89c81087b
checker: check error for array.index() argument ( #14147 )
2022-04-25 14:42:31 +03:00
yuyi
aeba110d01
cgen: fix error for printing multi fixed array ( #14141 )
2022-04-25 14:42:05 +03:00
Larpon
283d181047
cli: add missing doc strings ( #14158 )
2022-04-25 14:41:46 +03:00
yuyi
88f22b4367
cgen: fix error for anon fn decl inside ternary ( #14150 )
2022-04-25 12:36:03 +03:00
Delyan Angelov
60e205a193
tests: add ability to check the output of commands for .starts_with, .ends_with and .contains strings, in v test-all
2022-04-25 12:20:38 +03:00
Delyan Angelov
d35d67c2bd
eval: enable v interpret examples/hanoi.v
2022-04-25 12:20:37 +03:00
Nick Treleaven
d8a5df9044
checker: error if smaller signed == unsigned ( #14078 )
2022-04-25 12:09:25 +03:00
Delyan Angelov
147e6e669f
cgen: fix pushing to an array of string pointers ( fix #14156 )
2022-04-25 11:26:24 +03:00
yuyi
922cee9162
parser, checker, cgen: fix error for fn call using anon fn call argument ( #14155 )
2022-04-25 11:26:14 +03:00
Delyan Angelov
1291b621f6
ci: bump test retries for go_anon_fn_variable_call_test.v to 3
2022-04-25 10:32:41 +03:00
fleur
ddbe812f1b
cgen: add callconv support for fns from ptr ( #14151 )
2022-04-25 08:51:03 +03:00
Haren S
11ee2b6409
builder: improve macOS 10.5 and PPC support ( #14152 )
2022-04-25 08:17:00 +03:00
stackotter
563469ed9f
vfmt: fix array_init line wrapping ( #14154 )
2022-04-25 08:11:44 +03:00
yuyi
c819f0f86f
checker, cgen: fix printing in 'for v in a' ( #14146 )
2022-04-24 13:30:13 +03:00
Alexander Medvednikov
9355048b6c
tmpl: minor fixes and optimizations
2022-04-23 16:01:44 +03:00
Delyan Angelov
3388caa6c5
ci: bump vtest retry to 6 for channel_select_test.v (fails sporadically in the windows-gcc job)
2022-04-23 15:36:19 +03:00
Delyan Angelov
365e7d6b34
vfmt: ignore parser warnings, cleanup code
2022-04-23 11:10:12 +03:00
yuyi
d934472b17
checker: simplify checking array.contains() argument ( #14133 )
2022-04-22 22:34:13 +03:00
yuyi
b86320a669
parser: minor cleanup in stmt() ( #14136 )
2022-04-22 22:33:13 +03:00
Claudio Cesar de Sá
a2db44bc38
examples: add 2 more graph search examples (DFS and BFS), move them into examples/graphs ( #14131 )
2022-04-22 12:01:29 +03:00
yuyi
5dce091379
checker, cgen: fix generic empty interface to multi struct ( #14132 )
2022-04-22 11:02:51 +03:00
Alexander Medvednikov
9b565bf765
cgen: fix enum switch bug in translated code
2022-04-22 02:31:32 +03:00
tzSharing
03d21a727e
gg: fix gg.draw_rounded_rect_filled() graphical abnormalities ( #14128 )
2022-04-22 00:16:10 +03:00
Larpon
506259adb6
os: add behavior info to is_dir_empty documentation ( #14110 )
2022-04-21 18:21:00 +03:00
yuyi
26b0e7fd34
fmt: remove extra parentheses ( #14125 )
2022-04-21 18:20:32 +03:00
Delyan Angelov
2080557f50
ast: allow a := match x { 101 { ... for {...} ... y }
2022-04-21 13:31:06 +03:00
yuyi
8a18f9175a
cgen: fix error for if expr with nested match expr ( #14122 )
2022-04-21 13:02:31 +03:00
yuyi
448938be0d
parser: fix generic anon fn decl with type only argument ( #14124 )
2022-04-21 12:53:13 +03:00
yuyi
99eb9fdaab
checker: fix error for fn with array of aliases argument ( #14123 )
2022-04-21 12:52:09 +03:00
yuyi
f13583b04a
checker: check array builtin method's arguments ( #14119 )
2022-04-21 12:51:04 +03:00
yuyi
8013bd43b0
checker: check map builtin method's arguments ( #14120 )
2022-04-21 12:49:46 +03:00
Delyan Angelov
5e8c4a3aff
ci: enable again the v install ui task
2022-04-21 11:21:59 +03:00
StunxFS
2a0b372d0d
tools: minor cleanup in fast.v ( #14117 )
2022-04-21 10:46:35 +03:00
ChAoS_UnItY
c5824c36f2
checker, cgen: allow static (fixed) arrays in in operator ( #14121 )
2022-04-21 10:32:29 +03:00
Delyan Angelov
c789ea5a15
ci: temporarily use git clone https://github.com/vlang/xyz ~/.vmodules/xyz instead of v install xyz
2022-04-21 09:20:15 +03:00
sunnylcw
4491b535ec
doc: add link to V's standard library documentation at the start ( #14114 )
2022-04-21 00:26:20 +03:00
Delyan Angelov
31b28af179
bootstrap: remove -I ./thirdparty/stdatomic/nix from make files ( #14111 )
2022-04-21 00:12:50 +03:00
lemon
960225f7a7
builtin: fix -cc gcc -gc boehm on linux and macos ( #14115 )
2022-04-21 00:12:17 +03:00
Nick Treleaven
1533b77404
builtin: remove unnecessary casts for defunct small unsigned warning ( #14108 )
2022-04-20 21:47:09 +03:00
yuyi
0260c2a552
checker: minor cleanup in assign_stmt() ( #14107 )
2022-04-20 21:03:41 +03:00
Hunam
0374f021c5
os: small cleanup of function description ( #14112 )
2022-04-20 20:58:41 +03:00
mjh
1546645f63
datatypes: fix bst child access, when .root is 0 ( #14080 )
2022-04-20 16:49:18 +03:00
Larpon
a1342e85c3
os: add info about overwritten content to write_file ( #14109 )
2022-04-20 15:29:58 +03:00
yuyi
52ea0b8cc3
ast: minor cleanup of types.v ( #14103 )
2022-04-20 14:24:13 +03:00
yuyi
ce4c2afc9c
checker, cgen: use 'stmts.last()' instead of 'stmts[stmts.len - 1]' ( #14105 )
2022-04-20 14:23:32 +03:00
yuyi
44ba19716b
checker: fix error for fn with multi return ( #14095 )
2022-04-20 13:09:40 +03:00
yuyi
0c3b69eaef
checker: fix error for assign array of aliases ( #14096 )
2022-04-20 13:08:47 +03:00
Alexander Medvednikov
364656b312
builtin: define C.abs()
2022-04-20 13:03:30 +03:00
Isaiah
0887b59254
vpm: fix get_all_modules() ( #14097 )
2022-04-20 12:15:30 +03:00
yuyi
8cc79e4299
checker: check error for arguments of array.contains() ( #14102 )
2022-04-20 11:00:59 +03:00
playX
711e90cf99
v.util: add math to builtin_module_names (temporary fix for C2V) ( #14100 )
2022-04-20 10:57:55 +03:00
playX
f6a0c26a85
checker: c2v fixes ( #14091 )
2022-04-20 01:09:34 +03:00
Delyan Angelov
9646e4b9d8
sync: use #insert for atomic.h, so that bootstrapping can be simplified
2022-04-19 20:06:20 +03:00
Delyan Angelov
006df58451
checker, cgen: add support for #insert, to simplify bootstrapping V
2022-04-19 19:37:04 +03:00
JalonSolov
daf5d32327
checker: fix error message when number of generic parameters is incorrect ( #14090 )
2022-04-19 18:34:23 +03:00
yuyi
a318a2e09e
examples: fix optional in string interpolation and format error ( #14079 )
2022-04-19 13:29:53 +03:00
yuyi
e16ce3af88
token: minor cleanup of token.v ( #14083 )
2022-04-19 13:28:27 +03:00
yuyi
6164654d11
checker: check fn return type mismatch ( #14081 )
2022-04-19 13:04:41 +03:00
Nick Treleaven
4400efeb9f
checker: Revert part of small_unsigned == signed ( #13967 ) ( #14075 )
...
`gcc -W` doesn't error for e.g. u16 == i32, only for u32 == i16.
Any u16 value can fit in an i32.
2022-04-18 21:30:09 +03:00
yuyi
7ef64bde50
checker: check error for fn decl with optional arguments ( #14076 )
2022-04-18 21:22:31 +03:00
yuyi
d0a11f50ca
cgen: minor cleanup of infix_expr.v ( #14070 )
2022-04-18 15:05:19 +03:00
Delyan Angelov
379b638b57
ci: update windows-install-sqlite.bat to latest sqlite
2022-04-18 14:25:57 +03:00
yuyi
fe371845da
ast, checker, cgen: fix aggregations type check ( #14066 )
2022-04-18 12:38:08 +03:00
spaceface
775c4c34b5
builtin: compile the gc statically by default ( #14063 )
2022-04-18 10:50:21 +03:00
Ikko Ashimine
56a3539ea9
io: fix typo in readerwriter.v ( #14060 )
...
seperate -> separate
2022-04-17 17:40:14 +03:00
yuyi
17c34b09a6
checker, cgen: minor cleanup of last expr stmt expression ( #14057 )
2022-04-17 14:08:43 +03:00
yuyi
cb44f5981e
checker, cgen: fix error for if expr with generic sumtype ( #14056 )
2022-04-17 08:19:44 +03:00
Vincenzo Palazzo
4f14f7714f
checker: ensure that the variant SubType exists ( #14053 )
...
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com >
2022-04-16 19:29:10 +03:00
Vincenzo Palazzo
48486e1afb
ci: reformatted tools/vcreate.v ( #14054 )
...
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com >
2022-04-16 19:09:08 +03:00
Cameron Katri
1fc54a1e5b
vcreate: Allow custom default license ( #14046 )
2022-04-16 17:43:25 +03:00
Delyan Angelov
8a57f7ed2d
v.util: always compile vfmt with -d vfmt to enable more efficient parsing
2022-04-16 14:05:55 +03:00
Julien de Carufel
16ead4e63c
cgen: fix infix generics bug ( #14048 )
2022-04-16 13:23:19 +03:00
Alexander Medvednikov
43931a8e77
doc: byte => u8
2022-04-16 13:02:56 +03:00
Delyan Angelov
5b7e538119
v.pref: show the VCROSS_COMPILER_NAME notice only when the output is not a .c file
2022-04-16 10:46:03 +03:00
Delyan Angelov
4a71b27c52
ci: add test_byte_vs_u8 to int_test.v
2022-04-15 21:42:07 +03:00
Delyan Angelov
d75c408868
ci: fix typeof_simple_types_test.v
2022-04-15 21:22:32 +03:00
Delyan Angelov
82c5621621
ci: fix typeof_simple_types_test.v
2022-04-15 21:21:44 +03:00
Delyan Angelov
675f8b6300
ci: fix generic_fn_infer_struct_test.v
2022-04-15 21:21:12 +03:00
Delyan Angelov
ad231cec2f
ci: fix code_test.v
2022-04-15 21:20:03 +03:00
Delyan Angelov
87a373d82c
ci: fix coutput_test.v
2022-04-15 21:18:55 +03:00
Delyan Angelov
c7aedb8e8d
ci: fix fmt_test.v
2022-04-15 21:16:31 +03:00
Delyan Angelov
375361b787
ci: fix ./v check-md -hide-warnings .
2022-04-15 21:08:09 +03:00
Delyan Angelov
840f474fb5
ci: fix ./v -progress test-cleancode
2022-04-15 21:04:10 +03:00
Delyan Angelov
e802e0b9cb
ci: fix more test-all failures
2022-04-15 21:02:03 +03:00
Delyan Angelov
bb2a324d61
ci: more gen.js fixes
2022-04-15 20:51:04 +03:00
Delyan Angelov
868d3e1008
ci: fix failing tests for mysql, crypto.rc4, strings
2022-04-15 20:51:04 +03:00
Alexander Medvednikov
c03fe020bf
parser: do not allow [x]byte{}
2022-04-15 20:40:37 +03:00
Delyan Angelov
6f5a513d8b
ci: fix v build-examples
2022-04-15 20:31:10 +03:00
Delyan Angelov
e18cb9748f
ci: fix v check-md doc/docs.md
2022-04-15 20:25:19 +03:00
Delyan Angelov
173e6a943b
checker: fix tests (adjust byte to u8 in .out files too)
2022-04-15 20:15:03 +03:00
Delyan Angelov
cc8803c602
builtin: fix failing embed_file_test.v (pub fn (data &u8) vbytes(len int) []u8 {)
2022-04-15 19:57:00 +03:00
Alexander Medvednikov
78cb6e2b41
all: handle fixed []u8
2022-04-15 18:35:56 +03:00
Alexander Medvednikov
1c6f63ac0a
tests: use u8 everywhere
2022-04-15 18:34:15 +03:00
Alexander Medvednikov
fbb9e65c0f
all: ~500 more byte=>u8
2022-04-15 18:25:45 +03:00
Alexander Medvednikov
ae6a25f44e
websocket, utf: u8 fixes
2022-04-15 16:24:02 +03:00
Alexander Medvednikov
e97ebf8cfc
sokol: byte => u8
2022-04-15 16:12:05 +03:00
Alexander Medvednikov
258d1f77dc
net: fix byte buffers
2022-04-15 15:57:45 +03:00
Alexander Medvednikov
af73e195da
net: byte fixes
2022-04-15 15:55:39 +03:00
Alexander Medvednikov
fb192d949b
all: replace []byte with []u8
2022-04-15 15:35:35 +03:00
Alexander Medvednikov
0527ac633e
ast: remove .byte
2022-04-15 15:30:37 +03:00
Alexander Medvednikov
dbcf6e9c33
os: fix Process on windows
2022-04-15 15:23:05 +03:00
Alexander Medvednikov
c14984899b
builtin: fix windows fn definitions
2022-04-15 15:18:21 +03:00
Alexander Medvednikov
a1372e284c
builtin: update alloc fn definitions
2022-04-15 15:16:10 +03:00
Alexander Medvednikov
c3ad4e2069
encoding.base64: use u8
2022-04-15 15:10:34 +03:00
Alexander Medvednikov
d4a0d6f73c
all: byte => u8
2022-04-15 14:58:56 +03:00
Alexander Medvednikov
b49d873217
builtin: [1000]u8 fix
2022-04-15 14:48:39 +03:00
Alexander Medvednikov
014c3c97f0
all: byte => u8
2022-04-15 14:45:52 +03:00
Alexander Medvednikov
7f3b91e688
builtin: more byte => u8
2022-04-15 14:10:11 +03:00
Alexander Medvednikov
1e7eb713fb
cgen: remove byte references from cheaders.v
2022-04-15 14:04:53 +03:00
Alexander Medvednikov
ba7b329c73
builtin: more byte=>u8
2022-04-15 13:55:56 +03:00
Alexander Medvednikov
e6ff1508d2
all: make u8 the primary type, byte the alias
2022-04-15 13:43:03 +03:00
Delyan Angelov
566f150b24
net.http: add parse_request_head/1, cleanup existing code
2022-04-15 10:33:44 +03:00
Delyan Angelov
c3ee4fb2a2
crypto: make public all Digest.checksum() methods
2022-04-15 09:02:42 +03:00
Alexander Medvednikov
3b36f16365
all: volatile globals
2022-04-15 02:39:38 +03:00
Alexander Medvednikov
0dff050735
builtin: u8/byte clean up
2022-04-14 16:43:34 +03:00
yuyi
2d6d6c9ac9
json: fix json decode with sumtype of multi array type ( #14035 )
2022-04-14 15:36:24 +03:00
yuyi
c4dff0d797
cgen: format the generated source code by gen_str_for_union_sum_type() ( #14026 )
2022-04-14 15:26:10 +03:00
yuyi
72c2dc805d
cgen: fix error for generics struct that parent has str to string ( #14037 )
2022-04-14 15:23:50 +03:00
Delyan Angelov
f6c9a60f99
pref: only show the support cross compiler warning/VCROSS_COMPILER_NAME message for the C backend
2022-04-14 15:04:00 +03:00
Delyan Angelov
bf62b2e33e
vfmt: stabilise the attribute sorting order (sort first by length of atributes, then in alphabetical order of their names)
2022-04-14 14:53:45 +03:00
Delyan Angelov
f1f75897b3
sync: use asserts in channel code only when -d debug is passed
2022-04-14 14:00:57 +03:00
Delyan Angelov
a62560d2c1
ci: fix generation of vc/v_win.c in gen_vc.yml
2022-04-14 13:44:18 +03:00
Delyan Angelov
e555335bf0
ci: fix windows-msvc builds, as well as the windows-cross job, turn on deprecation notices for [windows_stdcall] and [_fastcall]
2022-04-14 13:36:51 +03:00
fleur
68401d9dc8
gen: add callconv attribute for fn and type ( #14027 )
2022-04-14 11:29:52 +03:00
Delyan Angelov
5905590e78
builder, pref: use i686-w64-mingw32-gcc for cross compiling 32bit windows apps with v -m32 -os windows hw.v
2022-04-14 10:42:25 +03:00
Vincenzo Palazzo
48c295150f
checker: fixes typechecking for a sum type with an alias type ( #13974 )
2022-04-13 18:38:26 +03:00
yuyi
dc08105022
json: fix error for json decode with sumtype ( #14025 )
2022-04-13 18:06:28 +03:00
Delyan Angelov
e5809363de
docs: describe the contents of vlib/v/gen/c/testdata/ and how to write tests for the checker, that still do not have good codegen counterpart
2022-04-13 14:55:26 +03:00
Alexander Medvednikov
d7adb67d52
cgen: fix [cinit]
2022-04-13 02:55:47 +03:00
Alexander Medvednikov
2525a30b5f
cgen: [cinit] attr for globals
2022-04-13 00:30:51 +03:00
yuyi
e3e5bef139
ast, parser: fix formatting of if with inline comments ( fix #7796 ) ( #14018 )
2022-04-13 00:15:27 +03:00
Nick Treleaven
c780de6282
checker: disallow 'small_unsigned == signed' ( #13967 )
2022-04-12 19:37:30 +03:00
fleur
6718958058
cgen: add a [_fastcall] fn attribute ( #14016 )
2022-04-12 17:06:56 +03:00
牧心
a810fbb80e
cgen: fix infix_expr_in_optimization compile error when treating some kind cannot directly use '==' ( #14015 )
2022-04-12 16:19:44 +03:00
Delyan Angelov
8788512c4d
checker: make using err.msg and err.code produce an *actual* notice, even with the present compatibility hack (will be *removed* in 2022-06-01)
2022-04-12 14:56:02 +03:00
Delyan Angelov
4c7cdd2a2d
checker,cgen: use faster sym.idx == ast.error_type_idx integer comparisons, instead of sym.name == "IError"
2022-04-12 14:49:51 +03:00
Delyan Angelov
62032c43db
ast: fix Table.rewrite_already_registered_symbol calls (they were setting sym.idx to 0)
2022-04-12 14:49:51 +03:00
Delyan Angelov
9b43713ec5
net: simplify TcpListener.accept, use C.accept(l.sock.handle, 0, 0), since we do not care about the local address of the accepted connection
2022-04-12 11:47:41 +03:00
Delyan Angelov
716cb17aea
math.big: wrap all asserts in module code (not in tests) in $if debug {} ( #14012 )
2022-04-12 09:38:53 +03:00
crthpl
afb07e0e16
cgen: fix deadlock when returning multiple values in lock ( #14014 )
2022-04-12 09:21:27 +03:00
yuyi
3e3b2e25db
parser, fmt: fix the formatting of fn headers with inline comments ( #14010 )
2022-04-11 22:31:06 +03:00
Larpon
07207db998
examples: reduce C. prefix usage, rename fontstash enums ( #14011 )
2022-04-11 22:23:06 +03:00
Delyan Angelov
cb969e0934
tools: fix the behaviour of regress.v , when oldv.v is not compiled
2022-04-11 21:57:33 +03:00
Delyan Angelov
382586da6d
ci: fix toml segfault (remove unused low level builtin option IError.msg compatibility hack)
2022-04-11 21:49:59 +03:00
Delyan Angelov
e64c8cce62
ci: bump size of EMPTY_STRUCT_DECLARATION's _dummy_pad field to 8 (a voidptr, instead of char)
2022-04-11 17:53:18 +03:00
yuyi
5551cb248c
ast, parser, fmt: fix formatting of consts with embedded comments ( #14008 )
2022-04-11 17:27:41 +03:00
牧心
25d8faabf6
cgen: fix alloc empty struct array error ( #14007 )
2022-04-11 14:16:09 +03:00
Delyan Angelov
843ce43077
strconv: cleanup atof.c.v - use a ParserState enum, clarify comments
2022-04-11 12:01:47 +03:00
Delyan Angelov
e4dfffd70b
toml: remove math import (used only for math.max and math.max_u32)
2022-04-11 10:22:31 +03:00
Nick Treleaven
1938bc48e7
toml.scanner: make end_of_text, at, next and peek return u32 ( #13998 )
2022-04-11 10:12:04 +03:00
yuyi
fa66183f43
checker: check error for map of generic struct init ( #13999 )
2022-04-11 10:07:23 +03:00
Delyan Angelov
a0e7a46be4
rand: speed up MT19937RNG.u64
2022-04-10 13:07:35 +03:00
Delyan Angelov
6c25f5b291
rand: fix needless array allocation in MT19937RNG.u64()
2022-04-10 13:02:31 +03:00
Subhomoy Haldar
3f90809035
rand: add missing pub modifiers for .byte() and .u32() methods ( #13992 )
2022-04-10 11:43:46 +03:00
牧心
11d9a67e3b
cgen: fix invalid operands to an_alias in an_array_of_aliased_values ( #13994 )
2022-04-10 11:42:17 +03:00
Delyan Angelov
8517b8f8b0
examples: use #[] in news_fetcher.v to simplify the code
2022-04-10 11:11:53 +03:00
Delyan Angelov
88c4a64a15
examples: make examples/sokol/drawing.v more symmetrical
2022-04-10 10:40:14 +03:00
yuyi
93a5d03182
parser: improve embedded struct parsing/better error for Architecture []string ( #13995 )
2022-04-10 10:24:36 +03:00
Vincenzo Palazzo
3571f66a82
pref: fix access in invalid position on v search '' ( #13993 )
2022-04-10 10:21:58 +03:00
yuyi
473bc0254d
checker: check error for array of generic struct init ( #13987 )
2022-04-09 21:50:34 +03:00
Delyan Angelov
89d64b21ea
ci: remove manual free(f) in an autofree test, after 58febe46, which does it automatically now
2022-04-09 20:06:27 +03:00
Delyan Angelov
df30b79971
checker: allow for arr.any(opt_fn()?), add test
2022-04-09 19:50:10 +03:00
Daniel Oberhoff
58febe4607
cgen: fix autofree of heap variables ( #13823 )
2022-04-09 17:37:39 +03:00
yuyi
704e3c6e72
cgen: fix error for fn with fixed array argument ( fix #13976 ) ( #13982 )
2022-04-09 15:57:27 +03:00
Nick Treleaven
bf385d2ac9
docs: add links to download C compilers ( #13984 )
2022-04-09 15:53:37 +03:00
pancake
804f2f56d4
vpm: support v install -once module_name( #13977 )
2022-04-09 14:29:41 +03:00
pancake
e3da3101f6
vpm: simplify output for v list ( #13975 )
2022-04-09 14:26:01 +03:00
Delyan Angelov
60e718e7c6
test: save removing the nonexistent binary output for v fmt and v vet tests
2022-04-09 13:04:52 +03:00
Vincenzo Palazzo
2d867a2766
ast: fix reported errors, when arrays of types defined in modules are involved ( #13952 )
2022-04-08 17:38:34 +03:00
yuyi
2a88b313d4
cgen: format json encode/decode generated c codes ( #13972 )
2022-04-08 17:27:05 +03:00
yuyi
617608b23d
cgen: fix optional struct declarations for empty structs ( #13970 )
2022-04-08 14:51:37 +03:00
Larpon
45a427e68b
clipboard: fix segfault when pasting to some X11 apps. Fixes #13891 ( #13971 )
2022-04-08 13:32:38 +03:00
Larpon
52f1c615a6
fontstash: document all functions ( #13969 )
2022-04-08 13:22:23 +03:00
Joe Conigliaro
a0c07454b1
checker: remove debug code from previous commit
2022-04-08 18:27:14 +10:00
Joe Conigliaro
426e9d1734
checker: fix condition for checking if tmpl var is inherited
2022-04-08 18:25:08 +10:00
Joe Conigliaro
e1c8b07fa5
checker/tests: format test added in prev commit & rename chekcer prop
2022-04-08 17:41:23 +10:00
Joe Conigliaro
8dc2601080
all: comptime_call - simplify tmpl scoping, solves many issues.
2022-04-08 17:33:24 +10:00
mir.zhou
6425000ce4
example: fix the tuicool.com crawler example (changed html structure) ( #13962 )
2022-04-07 18:18:10 +03:00
Delyan Angelov
5a695c81dc
ci: fix the recorded output for compare_structs.c.must_have after eea46c4
2022-04-07 18:08:56 +03:00
crthpl
b232a3b0d1
cgen: fix .filter() and .map() on shared arrays ( #13954 )
2022-04-07 18:05:11 +03:00
Delyan Angelov
eea46c4e1a
cgen: fix error, when a struct with over 8 fields, is used as a method receiver directly.
2022-04-07 17:20:14 +03:00
Subhomoy Haldar
022fae1e7f
rand: make mt19937 automatically seeded, add seed_len to wyrand ( #13966 )
2022-04-07 16:00:30 +03:00
Pascal Masschelier
95753ffb30
examples: fix process_stdin_trick example ( #13953 )
2022-04-07 13:55:12 +03:00
playX
6a820c2845
checker: allow all binary operations when translating code produced by c2v ( #13964 )
2022-04-07 12:22:24 +03:00
Vincenzo Palazzo
4666a27e5f
ci: introduce v benchmarks inside the ci workflow ( #13949 )
2022-04-07 12:21:13 +03:00
Larpon
d34ef69229
tools: improve deprecation detection in missdoc.v ( #13960 )
2022-04-07 12:20:14 +03:00
yuyi
e7fd8c4e7c
cgen: fix error for dereference mut interface in loop ( fix #13913 ) ( #13941 )
2022-04-07 12:01:54 +03:00
yuyi
a58dde48f8
cgen: fix error for optional multi return ( #13959 )
2022-04-07 09:12:23 +03:00
yuyi
c9dcdf6744
cgen: fix json decode with optional argument ( fix #13943 ) ( #13958 )
2022-04-06 19:34:22 +03:00
Larpon
56e6fd01c5
gg: document pub functions in text_rendering and m4/vector ( #13961 )
2022-04-06 19:34:02 +03:00
Delyan Angelov
c5d8d27b90
ci: fix -cstrict failures for vweb_test.v etc.
2022-04-06 08:54:01 +03:00
Vincenzo Palazzo
6412f8ba0b
checker: add a known error on alias cast with generics ( #13946 )
2022-04-05 19:09:46 +03:00
Larpon
1482db6d1a
gg: add missing doc strings to android, recorder and gg.c.v ( #13936 )
2022-04-05 18:42:01 +03:00
Vincenzo Palazzo
359f16fdfd
parser: fixed parsing prototype function with recursive type ( #13922 )
2022-04-05 18:39:49 +03:00
yuyi
0cba579a7b
cgen: simplify codegen for optional consts ( #13948 )
2022-04-05 17:54:23 +03:00
Delyan Angelov
2ecfd1b351
ci: fix clang sanitize errors for json_decode
2022-04-05 17:52:10 +03:00
Larpon
11ccf06441
time: add missing doc string to parse.v ( #13933 )
2022-04-05 13:21:37 +03:00
Larpon
2350dbbd57
gg: add missing doc strings to pub fns in image.* ( #13934 )
2022-04-05 13:21:03 +03:00
Larpon
0b046c14a8
clipboard: add doc strings to all implementations ( #13932 )
2022-04-05 13:06:32 +03:00
Delyan Angelov
f5e4d17cf3
json: return errors with more context, on failed json.decode() calls.
2022-04-05 12:06:08 +03:00
Alexander Medvednikov
829fed4af0
ci: build vpm again
2022-04-05 08:02:47 +03:00
Nick Treleaven
7d8db1042d
vdoc: don't highlight less than expression as generic function ( #13938 )
2022-04-05 05:58:47 +03:00
yuyi
f6b8e1e13f
cgen: fix error for const using nested optionals ( #13939 )
2022-04-05 05:58:11 +03:00
Delyan Angelov
0bd8fbc9a8
term, term.ui: fix a panic on !=linux unixes when running examples/term.ui/
2022-04-04 19:25:25 +03:00
Nick Treleaven
2cd9c91e98
vdoc: highlight terminal examples for -comments -color ( #13937 )
2022-04-04 18:13:24 +03:00
Larpon
aa9e2ebb25
gg: document all draw functions ( #13931 )
2022-04-04 18:09:19 +03:00
pancake
5369379738
repl: handle exit(n) ( #13930 )
2022-04-04 16:22:34 +03:00
Alexander Medvednikov
92bfd9b353
cgen: fixed array index for translated code
2022-04-04 12:09:29 +03:00
StunxFS
725b472d37
checker: fix typos ( #13929 )
2022-04-04 10:07:53 +03:00
Nick Treleaven
91b40304b7
vdoc: highlight .., ... as punctuation & postfix ops as operators ( #13924 )
2022-04-04 09:21:54 +03:00
StunxFS
1211b2e941
v: minor change in the output for an unknown help topic ( #13927 )
2022-04-04 08:36:10 +03:00
Alexander Medvednikov
719a3b5de3
cgen: fix fixed arrays assignment in translated code
2022-04-04 06:20:54 +03:00
Alexander Medvednikov
a55e930c00
checker: fix pointer checks in translated code
2022-04-04 05:35:15 +03:00
Alexander Medvednikov
cc227d8520
checker: fix non-numeric type check for translated code
2022-04-04 04:59:14 +03:00
Nick Treleaven
d10135e2c4
vdoc: HTML highlight generic function as function, not name ( #13923 )
2022-04-03 23:41:02 +03:00
Delyan Angelov
44603f8e59
checker: add suggestions for misspelled mod.func_name() calls
2022-04-03 20:07:52 +03:00
Vincenzo Palazzo
51c1d666c2
checker: fix operator overloads (for large structs with > 8 fields, the method receiver is normally auto converted to a reference) ( #13889 )
2022-04-03 19:30:29 +03:00
StunxFS
38853568b4
encoding.csv: allow passing a custom delimiter to the new_reader function ( #13910 )
2022-04-03 19:13:43 +03:00
Nick Treleaven
782d5374c9
builtin: add an array.drop(n) method ( #13907 )
2022-04-03 17:05:50 +03:00
Delyan Angelov
a1e9cae5d2
tests: add a vlib/v/tests/known_errors/known_errors_test.v test runner
2022-04-03 12:54:22 +03:00
yuyi
0497b885dc
checker: minor cleanup in find_unreachable_statements_after_noreturn_calls() ( #13903 )
2022-04-03 11:19:19 +03:00
yuyi
8c55a9ecd3
builtin: minor optimization of array.push() and array.push_noscan() ( #13904 )
2022-04-03 11:04:18 +03:00
Cameron Katri
340543dfc0
cli: add automatic manpage generation with -man ( #13911 )
2022-04-03 10:12:47 +03:00
Delyan Angelov
71dc6c224a
tests: make vlib/net/udp_test.v more stable, and less noisy on the tests-sanitize-address-gcc job
2022-04-02 20:00:26 +03:00
Cameron Katri
d585fbea8a
time: implement Time.strftime(fmt string) as a wrapper for strftime(3) ( #13898 )
2022-04-02 18:33:37 +03:00
Nick Treleaven
42f92db0ab
v.doc: parse multi-line examples (so they get highlighted) ( #13894 )
2022-04-02 18:29:12 +03:00
yuyi
faa55b46de
cgen: fix array of fixed array ( fix #13895 ) ( #13901 )
2022-04-02 18:00:59 +03:00
yuyi
0bf0c73a49
checker: fix error for returning optional ( #13902 )
2022-04-02 17:25:01 +03:00
pancake
af79c1e6ef
os: implement os.config_dir() like in Go's UserConfigDir ( #13893 )
2022-04-01 22:04:43 +03:00
Vincenzo Palazzo
d7817863c6
checker: type inference over a generic type should compile ( #13824 )
2022-04-01 19:31:27 +03:00
Delyan Angelov
9d2529b611
ci: reduce repetitions in test_global_mutex in init_global_test.v
...
With the old number of repetitions (2500000), that test alone could take over
30 seconds, in the CI environment.
2022-04-01 19:23:15 +03:00
yuyi
6987f2c087
time: fix error for time.local() on windows ( #13892 )
2022-04-01 17:16:46 +03:00
Vincenzo Palazzo
02c80bd445
time: fix repetitive time.now().local().local().local() offsetting the time further and further ( #13861 )
2022-04-01 00:11:17 +03:00
Nick Treleaven
9c1981a309
vdoc: show // comment prefix and hide any \x01 character ( #13880 )
2022-03-31 20:00:06 +03:00
yuyi
bc98c11d9d
parser, checker, cgen: minor cleanup of go_expr() ( #13875 )
2022-03-31 19:58:04 +03:00
yuyi
db3bbb58cf
cgen: fix error for cross assign of the reserved name variable ( #13884 )
2022-03-31 19:55:21 +03:00
Nick Treleaven
a87cd9663e
vdoc: highlight inline examples for -f html ( #13879 )
2022-03-31 19:32:32 +03:00
R cqls
5c43493183
sokol: add support for compiling with -d darwin_sokol_glcore33 on macos ( #13885 )
2022-03-31 16:52:21 +03:00
Delyan Angelov
fb5df9665e
ci: use ./v instead of v in "Shader examples could be build" step
2022-03-31 13:53:02 +03:00
Delyan Angelov
fa3fa2e74f
ci: add again sudo apt-get update for the Install dependencies step
2022-03-31 13:44:42 +03:00
Cameron Katri
b15240185e
builder,cgen: iOS fixes ( #13883 )
2022-03-31 11:51:13 +03:00
Delyan Angelov
4222fd0862
ci: add vlang/pdf testing task, simplify other_ci.yml using v should-compile-all
2022-03-31 11:35:20 +03:00
Delyan Angelov
74eabba52e
tools: add a v should-compile-all examples/*.v examples/gg/ tool, to simplify CIs of V modules.
2022-03-31 11:13:20 +03:00
kylepritchard
6137ce23c0
math: allow acos(0) ( fix #13876 ) ( #13877 )
2022-03-30 21:36:50 +03:00
yuyi
ae1cb5697e
cgen: minor cleanup in ref_or_deref_arg() ( #13874 )
2022-03-30 21:06:38 +03:00
yuyi
d40a502981
checker: minor cleanup in fn_call() ( #13873 )
2022-03-30 21:05:17 +03:00
Delyan Angelov
61f078664c
ci: entirely delete the Code CI / arm64-ubuntu-tcc Cirrus job, since it does not honor trigger_type: manual, but simply timeouts after severah hours, showing fake positives in the github CI
2022-03-30 16:00:01 +03:00
Subhomoy Haldar
7ef7188f4b
math.big: add bit_len, optimize gcd, add documentation ( #13872 )
2022-03-30 15:52:09 +03:00
Delyan Angelov
8121a8ada0
ci,cgen: comment out including stdbool.h for now
...
Fails tcc tests on windows, see: https://github.com/vlang/v/runs/5749951315?check_suite_focus=true
and vlib/v/checker/tests/globals_run/function_stored_in_global.vv
2022-03-30 14:26:20 +03:00
Delyan Angelov
566735b298
cgen: add nil to c_reserved (it is a macro defined in MacTypes.h on macos)
2022-03-30 13:33:03 +03:00
Cameron Katri
093994655c
v.builder: fix iOS compilation from non-macOS, allow -cc to override the default cross compiler ( #13866 )
2022-03-30 10:26:13 +03:00
Cameron Katri
3e69d3813b
v.builder: fix linker flags for systems with Procursus ( #13865 )
2022-03-30 10:15:52 +03:00
Delyan Angelov
cc637e5ee8
checker: make the misssing shared/mut modifer in fn and method calls error clearer
2022-03-30 01:45:40 +03:00
yuyi
55d9464890
checker: fix error for marking as referenced ( #13859 )
2022-03-30 01:33:10 +03:00
yuyi
42a67831bf
parser: fix printing slice of multiline raw string ( #13856 )
2022-03-29 18:06:11 +03:00
yuyi
c71770d9c5
checker: fix error for array of anon fn call ( #13858 )
2022-03-29 18:04:30 +03:00
Delyan Angelov
04cc037955
ci: fix -cstrict compilation of term.ui tests
2022-03-29 18:03:05 +03:00
Delyan Angelov
7ee93c8a20
docs: show the full information for deprecated functions
2022-03-29 15:17:55 +03:00
yuyi
fd34ebd84e
checker: check the count of generics in fn arguments ( #13855 )
2022-03-29 10:04:19 +03:00
Delyan Angelov
4f551d76c0
term.ui: fix conflicting C struct declarations when compiling programs, importing term.ui before term, on windows
2022-03-29 09:31:24 +03:00
yuyi
509367b293
cgen: minor cleanup in expr_is_multi_return_call() ( #13846 )
2022-03-28 20:38:23 +03:00
Nick Treleaven
476f19c090
vdoc: tweak keyword, attribute and light theme CSS ( #13853 )
...
Make keywords bold.
Make attributes use a monospace font (like code).
Tweak light theme foreground colors:
* Make default-text, operator-text and punctuation-text a bit darker,
improving the contrast.
* Make builtin-text a bit darker and more green (similar to dark theme).
* Make function-text a bit darker and more greeny-blue (similar to dark
theme).
* Make attribute-text a bit less transparent for better contrast.
2022-03-28 20:38:00 +03:00
yuyi
dd1a8cbadc
parser: check error for struct field type using 'mut' ( #13847 )
2022-03-28 18:13:38 +03:00
yuyi
62553dcc2e
cgen: fix crash for casting bool to int ( fix #13825 ) ( #13844 )
2022-03-28 12:20:47 +03:00
Nick Treleaven
c7a92425f0
doc: tweak built-in functions section & move dump section here ( #13841 )
2022-03-27 18:05:44 +03:00
Nick Treleaven
afdf8f50e7
doc: move enum methods to enum section from sum types ( #13843 )
2022-03-27 17:46:20 +03:00
Nick Treleaven
3a4bb09de2
doc: improve Arrays section ( #13842 )
2022-03-27 17:45:00 +03:00
Subhomoy Haldar
f75ce9dd82
rand: move functions from rand.util to the main module ( #13840 )
2022-03-27 17:38:59 +03:00
yuyi
875ad1f6ea
ast: minor cleanup in ast.v ( #13839 )
2022-03-27 16:21:40 +03:00
Nick Treleaven
d748529337
doc: add links to notable array related subheadings ( #13838 )
2022-03-27 14:29:20 +03:00
Nick Treleaven
02f72c8230
builtin: improve docs for array methods that take an it expression, like .map, .filter etc ( #13836 )
...
Move explanation about boolean `it` expressions to `filter`, as `sort`
doesn't take a boolean expression. Also move `any` example.
Add 2 filter examples.
Add map example from docs.md.
2022-03-27 14:28:15 +03:00
Nick Treleaven
dc9fd2bd7e
doc: tweak array methods section ( #13837 )
2022-03-27 14:26:23 +03:00
Delyan Angelov
a07d066e8f
tools: cleanup all temporary files on successfull v check-md .
2022-03-27 10:24:10 +03:00
Delyan Angelov
0e496a8de2
tests: add an autofree regression test before return value ownership changes
2022-03-27 09:50:37 +03:00
Delyan Angelov
bea0d500d0
parser: ignore upper letter case restriction for fn C.xyz declarations
2022-03-26 21:20:28 +02:00
Nick Treleaven
fcb57312b9
parser: error if parameter name starts with a capital ( #13827 )
2022-03-26 19:56:34 +02:00
Delyan Angelov
8c396356bb
context: make the examples in the vlib/context/README.md immediately runnable
2022-03-26 13:25:45 +02:00
Delyan Angelov
7f28d91190
ci: fix again -usecache regression on macos
2022-03-26 09:47:44 +02:00
Alexander Medvednikov
0248349e7c
cgen: global/const fixes
2022-03-25 23:33:01 +03:00
Nick Treleaven
ea4410cdb5
builtin: document the rune.length_in_bytes method ( #13826 )
2022-03-25 20:09:39 +02:00
Delyan Angelov
347db755c8
tests: sort the test files before further processing in valgrind_test.v
2022-03-25 09:41:45 +02:00
Delyan Angelov
ddc2c49365
cgen: autofree out of scope variables in reverse order of their creation
2022-03-25 09:39:12 +02:00
Delyan Angelov
d6c40865f9
strings: cleanup unsafe casts in some of strings.Builder ops ( #13819 )
2022-03-25 00:07:15 +02:00
Delyan Angelov
5b492e26dd
builtin: support a.flags.set(.noslices | .noshrink), use it in the particles example ( #13818 )
2022-03-24 23:37:13 +02:00
Nick Treleaven
a4ab3c1f14
checker: disallow mut_ptr = &immutable_var ( #13814 )
2022-03-24 20:43:25 +02:00
Delyan Angelov
9bbb52e9cc
checker: add a check for dump(c), where typeof(c) == "char"
2022-03-24 12:11:59 +02:00
yuyi
78d9975798
ast, cgen: restore Type.str() and fix error for it ( #13815 )
2022-03-24 11:45:06 +02:00
yuyi
1566f7f766
checker: minor cleanup in check_types.v ( #13816 )
2022-03-24 08:59:05 +02:00
Delyan Angelov
5b668dba2b
sync: document sync.thread_id()
2022-03-23 19:52:20 +02:00
Delyan Angelov
ce576d01c4
sync: add sync.thread_id() u64 { ( #13810 )
2022-03-23 19:19:14 +03:00
Nick Treleaven
2e963e36ac
rand: add pub fn shuffle<T>(mut a []T) { function + tests ( #13811 )
2022-03-23 15:31:26 +02:00
yuyi
35cd8112a5
ast, checker, cgen: fix error for printing alias that has str method ( #13809 )
2022-03-23 11:52:48 +02:00
Vincenzo Palazzo
8b072aa962
checker: check if generic values have the same types ( #13718 )
2022-03-23 09:13:10 +02:00
yuyi
dff39bac78
cgen: fix error for defining global anonymous functions ( #13808 )
2022-03-23 08:09:15 +02:00
yuyi
e3dca82f9c
strconv: minor cleanup in f64_to_str_lnd1() ( #13804 )
2022-03-22 20:15:59 +02:00
yuyi
0337882240
checker: check redefine global 'main' function ( #13803 )
2022-03-22 17:39:12 +02:00
Larpon
894080b844
ci: update sdl ci to compile shader example ( #13805 )
2022-03-22 17:36:23 +02:00
Ikko Ashimine
82120d02a8
tools: fix typo in vbug.v ( #13802 )
2022-03-22 15:47:03 +02:00
yuyi
a9837ba95d
cgen: minor cleanup in go_expr() ( #13801 )
2022-03-22 12:07:46 +02:00
yuyi
56f5ed4789
strconv: fix error for string interpolation of float format ( #13800 )
2022-03-22 12:00:18 +02:00
Nick Treleaven
afbccf79f7
builtin: don't memdup element for array.pop (depends on how cgen works) ( #13789 )
...
The voidptr returned is immediately dereferenced in cgen so the memory
is copied before the array can be appended to: `*(int*)array_pop(&a)`
2022-03-21 23:34:35 +02:00
yuyi
f66d2f5d43
cgen: simplify in index_of_array() and add test ( #13792 )
2022-03-21 22:03:45 +02:00
Delyan Angelov
381cf4b61d
ci: bump retries to 3, for flaky vlib/v/tests/go_array_wait_test.v
2022-03-21 21:47:01 +02:00
yuyi
c0437afbcd
cgen: fix error for casting int to interface ( #13790 )
2022-03-21 21:18:11 +02:00
Delyan Angelov
9ad64b0bd8
vweb: support -d trace_request and -d trace_response
2022-03-21 19:48:47 +02:00
Delyan Angelov
178afd006b
examples: avoid flash of unstyled content in the vweb_assets example
2022-03-21 19:13:53 +02:00
Delyan Angelov
3bae489e35
examples: make the vweb_assets.v example more robust (always change work folder to the folder of the executable). Document the vweb.Context.handle_static behaviour.
2022-03-21 19:05:18 +02:00
Delyan Angelov
f2e0ab5912
docs: add formatting example for "[${10.0000:.2f}]"
2022-03-21 14:42:18 +02:00
yuyi
5815ab8d00
cgen: minor cleanup in index.v ( #13788 )
2022-03-21 13:10:10 +02:00
yuyi
81bb1ea71f
tests: cleanup go_anon_fn_variable_call_test.v ( #13786 )
2022-03-21 13:04:43 +02:00
El Koulali András
f5036629ca
cgen: add true and false to C reserved words ( #13781 )
2022-03-21 11:00:30 +02:00
yuyi
d9cca53bd0
checker: check error for index of optional ( #13785 )
2022-03-21 10:17:57 +02:00
Delyan Angelov
21e9b1deb0
ci: fix -usecache failure on macos
2022-03-21 08:52:25 +02:00
Alexander Medvednikov
80c94ea73e
cgen: fix c2v consts in .o files
2022-03-21 04:56:37 +03:00
yuyi
c4b424717c
cgen: fix error for map get anon fn value ( #13782 )
2022-03-21 00:20:55 +02:00
Delyan Angelov
aaf87e04a2
tools: make the mini greeting text in the REPL more informative
2022-03-20 23:22:46 +02:00
Delyan Angelov
7216b5df11
tools: force showing V errors in color in interactive REPLs
2022-03-20 23:04:20 +02:00
Delyan Angelov
caa0e25939
cgen: fix struct type dependency sorting, when struct field types, are aliases to struct types from other modules ( #13779 )
2022-03-20 20:23:48 +02:00
Delyan Angelov
71edaa071a
builtin: use malloc, instead of calloc in array.ensure_cap/1
2022-03-20 15:08:42 +02:00
yuyi
0a78847782
checker: check error for unknown type in anon fn field of struct ( #13778 )
2022-03-20 13:28:35 +02:00
yuyi
8c3687aa10
checker: check error for struct field init with nobody anon fn ( #13777 )
2022-03-20 13:04:31 +02:00
Delyan Angelov
8ab0bcb6aa
Revert "builtin: improve performance for common array ops, based on VTune analysis"
...
This reverts commit 57db261538 .
2022-03-20 12:57:27 +02:00
Delyan Angelov
57db261538
builtin: improve performance for common array ops, based on VTune analysis
2022-03-20 12:42:04 +02:00
yuyi
3e40cd5baa
ast, checker, cgen: fix error for go anon fn variable call ( #13776 )
2022-03-20 07:45:23 +02:00
Delyan Angelov
c05634ebd1
ci: fix sanitize job failures after 02b889d
2022-03-19 21:45:58 +02:00
Delyan Angelov
02b889dac3
cgen: generate smaller switch statements for sumtypes/enums with else{}
2022-03-19 21:12:27 +02:00
Delyan Angelov
eb7c9cec3d
parser: short circuit if conditions in Parser.name_expr
2022-03-19 20:31:03 +02:00
Delyan Angelov
4dd68d3965
ast: small cleanup of using simple string interpolation in a string builder .write_string/1 parameter
2022-03-19 17:25:53 +02:00
Delyan Angelov
0cc63107ff
cgen: fix duplicate auto generation of free methods, add test
2022-03-19 01:01:08 +02:00
Delyan Angelov
ee6b23c2a7
toml: use toml.parse_text and toml.parse_file in the tests
2022-03-18 23:32:06 +02:00
yuyi
5237d1d446
cgen: fix error for empty interface ( #13764 )
2022-03-18 22:41:06 +02:00
Larpon
156efec278
toml: deprecate input.auto_config() and toml.parse() ( #13770 )
2022-03-18 22:33:51 +02:00
yuyi
3e41be1ff4
checker: minor cleanup in check_or_last_stmt() ( #13763 )
2022-03-18 22:27:53 +02:00
Delyan Angelov
1734e72638
v.vmod: make the v.mod parser more robust, show line numbers in errors, add tests
2022-03-18 22:23:11 +02:00
yuyi
5f79fa8a30
checker: handle invalid smartcast with if/match none ident or selector ( fix #12317 ) ( #13762 )
2022-03-18 17:50:54 +03:00
Nick Treleaven
f903ef24e8
cgen: simplify slicing fixed array ( #13767 )
2022-03-18 17:50:30 +03:00
yuyi
bb2ddb98a3
parser: check if guard condition ( #13765 )
2022-03-18 17:49:20 +03:00
Delyan Angelov
54b0a2aa62
toml: fix toml.scanner.new_simple/1 to *always* create a scanner, based on text, not a file path
2022-03-18 16:14:44 +02:00
Delyan Angelov
0ca87ad09f
parser: fix small performance regression after 1d83ab6b (by avoiding needless interpolation in hot paths)
2022-03-18 12:52:03 +02:00
Delyan Angelov
236bcda549
tools: speedup v fmt -verify when there are no file differences, avoiding diff.color_compare_files
2022-03-18 12:15:55 +02:00
Delyan Angelov
817bedec5d
checker: show available sumtype variants in match branches on typos
2022-03-18 11:50:28 +02:00
Nick Treleaven
00563a130d
cgen: fix double evaluation of rvalue array expression in slice ( #13737 )
2022-03-18 11:43:15 +02:00
ylluminate
d87b5d40b6
docs: add installation-issues discussion in README ( #13761 )
2022-03-18 11:32:56 +02:00
Hunam
8a2d3f6470
strings: add a Builder.ensure_cap() method ( #13755 )
2022-03-18 10:36:53 +02:00
yuyi
136f39a2d4
cgen: cleanup in if_expr() ( #13754 )
2022-03-17 01:09:49 +02:00
Delyan Angelov
7a4715288c
checker: make the errors for call expression shared/mut mismatches more detailed
2022-03-16 22:45:35 +02:00
yuyi
7f62346213
cgen: fix error for if expr returning sumtype ( #13752 )
2022-03-16 15:43:17 +02:00
yuyi
315e07abf6
checker: minor cleanup in match_expr() ( #13753 )
2022-03-16 15:39:57 +02:00
yuyi
33167960ed
checker: check the sumtype mismatch returned by match expr ( #13751 )
2022-03-16 09:31:38 +02:00
yuyi
57cba4d3f0
ast: minor cleanup in is_blank_ident() ( #13748 )
2022-03-16 09:30:37 +02:00
Delyan Angelov
089c93b613
x: add a mostly empty vlib/x/x.v file, to workaround a v doc bug
...
The bug is that `v doc` ignores README.md in a folder without .v files,
leading to tree nodes with empty # links and no content.
2022-03-15 20:19:39 +02:00
yuyi
49155ec312
parser: notice unnecessary parenthesis of reference ( fix #11179 ) ( #13739 )
2022-03-15 16:11:53 +02:00
yuyi
92cafd8851
checker: check invalid 'mut' keyword in infix expr ( #13742 )
2022-03-15 14:50:17 +03:00
yuyi
1d83ab6be1
parser: check using invalid keyword with none ident ( #13743 )
2022-03-15 12:58:03 +02:00
playX
78b1cbefff
builtin.wasm_bare: fix malloc invocation ( #13740 )
2022-03-15 12:55:39 +02:00
pancake
c5174c2c69
doc: fix minor typos in build-c ( #13738 )
2022-03-15 08:14:46 +02:00
Nick Treleaven
34dd4f34ab
checker: fix cgen error on sliced references ( #13736 )
2022-03-14 19:52:37 +02:00
yuyi
ea3c0166c0
ast: fix error for typeof aggregate ( #13735 )
2022-03-14 18:42:47 +02:00
serg-meus
d6eb6d5bae
doc: update struct access modifiers ( #13734 )
2022-03-14 18:38:36 +02:00
yuyi
dbb18e3656
parser: fix error for match branch with array expression ( #13733 )
2022-03-14 16:19:05 +02:00
pancake
a1d0db792e
native: initial support for typeof() expressions ( #13730 )
2022-03-14 15:15:06 +02:00
kylepritchard
a8f6574471
math: allow i64 in digits function and add count_digits function ( #13729 )
2022-03-14 10:41:01 +02:00
playX
c8b0f51c13
builtin.wasm_bare: use walloc as malloc/free implementation ( #13731 )
2022-03-14 09:20:20 +02:00
Delyan Angelov
4d99157cd5
ci: add go2v build & test job to other_ci.yml
2022-03-13 19:03:42 +02:00
yuyi
f7feb634d2
checker: fix error for if mut with immutable variable ( #13728 )
2022-03-13 16:33:50 +02:00
Mihai Galos
9495aacf3e
datatypes.fsm: add a fsm_graph.v tool ( #13723 )
2022-03-13 11:40:03 +02:00
Adam Oates
424ef0b2b8
stbi: fixed panic when trying to load JPG ( #13724 )
2022-03-13 09:57:34 +02:00
yuyi
27f9bc9ba0
checker: check error for match mut with immutable variable ( fix #9704 #8976 ) ( #13725 )
2022-03-13 09:53:29 +02:00
Delyan Angelov
83762fa4a4
native: align the disassembly/comment column in the -v -b native output
2022-03-12 11:09:09 +02:00
Subhomoy Haldar
40504e8600
rand: further bridge gap b/w rand module and PRNG interface ( #13719 )
2022-03-12 09:41:12 +02:00
Delyan Angelov
a3e9409196
strconv: fix a double free bug in v_sprintf/remove_tail_zeros_old, reduce leaks
2022-03-11 19:32:08 +02:00
yuyi
795fe5844c
strconv: fix strconv.v_printf() ( #13716 )
2022-03-11 17:00:57 +02:00
yuyi
10ab758aa7
ast: minor cleanup in pref_arch_to_table_language() ( #13714 )
2022-03-11 14:56:48 +02:00
Delyan Angelov
8dc4b1d9a3
builtin: use malloc_noscan more (for map metas and in []byte.hex())
2022-03-11 11:26:22 +02:00
yuyi
1993bf2a12
parser: cleanup map syntax ( #13713 )
2022-03-11 12:15:52 +03:00
yuyi
c1c3ae2a18
parser: minor cleanup in fn_args() ( #13711 )
2022-03-11 10:42:03 +02:00
yuyi
3f351036a2
parser: fix error for fn with type only argument ( fix #13704 ) ( #13709 )
2022-03-10 22:52:06 +02:00
yuyi
dd06698ee3
ast: rename TypeSymbol.is_public to TypeSymbol.is_pub ( #13710 )
2022-03-10 22:18:57 +02:00
Delyan Angelov
f3388df577
ci: fix dump_expression.vv when v is actually vprod (-‸ლ)
2022-03-10 18:13:00 +02:00
Delyan Angelov
e8c8f0e7c0
v.ast: fix dump(os.real_path(Makefile)) printing main.os.real_path
2022-03-10 11:24:46 +02:00
Nick Treleaven
4bea35b028
vlib/arrays: fix copy to not use memcpy for array, map, string ( #13703 )
2022-03-10 01:30:51 +03:00
JalonSolov
de2fc87995
os: handle trailing backslash on windows path when quoting ( #13705 )
2022-03-10 01:29:37 +03:00
Nick Treleaven
7231a3f135
vlib: add mut for the first parameter of builtin.copy, arrays.copy and crypto ( #13702 )
2022-03-09 20:26:00 +02:00
yuyi
4c33003f86
checker: check error for infix compare optional ( #13701 )
2022-03-09 20:20:21 +02:00
Nick Treleaven
54de04a916
arrays: improve fold/reduce docs ( #13700 )
2022-03-09 20:04:49 +02:00
yuyi
6c7243f2f7
checker: remove redundant 'c.expected_type = ast.void_type' ( #13687 )
2022-03-09 12:33:23 +02:00
Mihai Galos
d5b087de10
vlib: add a datatypes.fsm module ( #13668 )
2022-03-09 12:14:54 +02:00
pancake
3f1e232c9b
native: support comparing two idents and avoid printing idents ( #13686 )
2022-03-08 19:52:30 +02:00
Delyan Angelov
10474f35f6
net.http: clarify error message in Request.ssl_do
2022-03-08 18:17:34 +02:00
Delyan Angelov
137fade014
Makefile: support CFLAGS and LDFLAGS for the vc/v.c to v bootstrap.
2022-03-08 14:48:20 +02:00
yuyi
3fe8204062
checker: fix if expr with enum value ( #13685 )
2022-03-08 11:55:17 +02:00
Delyan Angelov
f6aba9a3fe
util: make check_module_is_installed more robust to ~/.vmodules paths with spaces
2022-03-08 11:33:03 +02:00
yuyi
cea3149369
checker: fix match expr with enum type value ( #13683 )
2022-03-08 09:50:17 +02:00
Nick Treleaven
17fcc788f2
arrays: add generic copy fn ( #13677 )
2022-03-08 09:44:04 +02:00
Delyan Angelov
beb1b8ce1b
tools: add v scan file.v
2022-03-07 18:25:38 +02:00
pancake
b20c911d3e
native: generate relocatable ELFs and support relative strings ( #13671 )
2022-03-07 18:24:01 +02:00
Subhomoy Haldar
0fd4c699dd
tools: modify .gitattributes to categorize *.vsh and v.mod files properly ( #13674 )
2022-03-07 18:15:18 +02:00
yuyi
e6270b05dc
checker: check unsigned integer compared with negative value ( #13670 )
2022-03-07 10:26:40 +02:00
Alexander Medvednikov
36ec47cd20
all: replace "NB:" with "Note:" (docs/comments)
2022-03-06 20:01:22 +03:00
Delyan Angelov
f74b65b63f
docs: change term.input to term.ui in vlib/term/README.md
2022-03-06 15:50:22 +02:00
yuyi
c8e33ad219
cgen: fix error for array of reference auto_str ( #13665 )
2022-03-06 12:15:31 +02:00
Delyan Angelov
b0f651bf81
sync: enable tcc compilation of sync programs on Amazon Linux 2 (and other Red Hat distros like CentOS) by default ( #13664 )
2022-03-05 19:13:47 +02:00
yuyi
6380b9eb15
cgen: minor cleanup of struct.v ( #13661 )
2022-03-05 17:19:20 +02:00
yuyi
22fda7c3dd
cgen: fix error for time struct init with update ( #13660 )
2022-03-05 13:28:48 +02:00
yuyi
8136157f87
checker: fix error for 'or expr with nested match expr' ( #13658 )
2022-03-05 13:06:08 +02:00
Ned
0e5ae7126f
x/json2: fix decoder errors ( #13655 )
...
* x/json2: fix decoder errors, refactoring
* x/json2: add error-catching tests
* x/json2: add missing docs
* x/json2: fmt
2022-03-05 13:02:43 +02:00
kahsa
3ef437e679
sokol: reorder and add missing funcs ( #13652 )
2022-03-04 14:39:38 +03:00
Ned
437fa02f27
x.json2: add customized JSON output capability via Encoder ( #13654 )
2022-03-04 14:39:23 +03:00
Hunam
74d5106e8f
cli: print cli errors in red where possible ( #13647 )
2022-03-04 12:28:11 +02:00
yuyi
f70e5bd69b
parser: check assign expr with undefined variable ( #13653 )
2022-03-04 10:33:14 +02:00
ChAoS_UnItY
63b41e67fa
v.parser: change body_start_pos to function declaration's lcbr, resolve #13642 ( #13646 )
2022-03-03 19:51:27 +02:00
Devin Bayer
9cc73fd0f8
docs: fix the .vsh doc example ( #13645 )
2022-03-03 19:47:05 +02:00
Delyan Angelov
4331d6dea0
v.builder: only add /DEBUG:FULL when -cflags does NOT contain custom /DEBUG options ( #13643 )
2022-03-03 16:47:41 +02:00
yuyi
a98eebde7f
checker: add a notice for potentially incorrect smartcasts ( #13644 )
2022-03-03 16:36:40 +02:00
kahsa
1e76cccd48
doc: add a struct reference example ( #13638 )
2022-03-03 13:20:49 +02:00
yuyi
ac1b31dbba
checker: fix error for array of interface init in for_in ( #13636 )
2022-03-03 12:32:55 +02:00
Delyan Angelov
3364f2aadf
cgen: use ADDR for sumtype conversion instead of HEAP (fix regression after 7f8f571)
2022-03-03 11:44:24 +02:00
yuyi
288b13b51d
all: cleanup smartcasts in the compiler ( #13639 )
2022-03-03 10:48:31 +02:00
Delyan Angelov
4e7db5bab0
v.builder: streamline get_os_cflags/0, use pref.os_from_string to centralise string -> v.pref.OS conversion
2022-03-03 10:43:50 +02:00
ChAoS_UnItY
6a3d34ae11
checker: fix #13626 , when unwrapped type is fixed array, and selector expr is 'len' ( #13627 )
2022-03-02 20:46:18 +02:00
Delyan Angelov
57c6454656
ci: bump timeout-minutes to 30 for 'Bootstraping works' job
2022-03-02 19:51:40 +02:00
yuyi
36e80266e6
ast: fix error for 'for smartcast' - part 2 ( #13635 )
2022-03-02 16:01:20 +02:00
yuyi
ffe6ff3cc8
cgen: fix error for print smartcast variable ( #13634 )
2022-03-02 12:32:54 +02:00
yuyi
22017ff8f4
parser: fix error for 'for smartcast' - part 1 ( #13629 )
2022-03-02 12:18:03 +02:00
yuyi
7f8f571ed2
cgen: fix error for optional cast to interface ( #13623 )
2022-03-01 19:21:55 +02:00
kahsa
6d57315aca
net: fix html dom debug print ( #13625 )
2022-03-01 19:20:40 +02:00
Ikko Ashimine
aa633dab41
utf8: fix typo in utf8_util.v ( #13624 )
2022-03-01 19:06:48 +02:00
Delyan Angelov
fd91811fe2
v.util: add set_source_for_path/2 to enable external tools to use util.formatted_error on pathless sources
2022-03-01 18:55:25 +02:00
yuyi
996bd41ce8
checker: simplify for smartcast in for_stmt() ( #13619 )
2022-03-01 12:31:48 +02:00
Joe Conigliaro
3b6e122d9d
all: comptime_call - update tmpl scope vars with caller scope vars after their properties got updated in checker
2022-03-01 02:13:29 +11:00
yuyi
0028e557f9
checker: cleanup smartcast in checker.v ( #13618 )
2022-02-28 17:06:37 +02:00
yuyi
9a2df0df0e
cgen: fix fn mut argument of interface type ( #13616 )
2022-02-28 13:31:04 +02:00
yuyi
013589e9fe
parser: minor cleanup in global_decl() ( #13617 )
2022-02-28 13:30:17 +02:00
Subhomoy Haldar
a0d9e6e1c2
rand: extend PRNG interface, add buffering support ( #13608 )
2022-02-28 13:17:54 +02:00
yuyi
efeb3e04da
ast: add table.is_sumtype_or_in_variant() ( #13615 )
2022-02-28 11:38:20 +03:00
yuyi
81c787ef91
checker: fix match expr with assign sumtype variable ( #13614 )
2022-02-28 11:37:59 +03:00
yuyi
bc16c61f6f
parser: check using 'mut' on fn_decl return type ( #13610 )
2022-02-27 14:23:43 +02:00
yuyi
0fb1eaef04
parser: check the redefinition of built-in IError ( #13606 )
2022-02-26 09:52:40 +02:00
Mihai Galos
4215bb125c
examples: improve the sendbus example ( #13604 )
2022-02-26 09:50:44 +02:00
yuyi
0d9792bdf2
ast: cleanup in find_method_with_generic_parent() ( #13600 )
2022-02-26 02:11:56 +03:00
Larpon
d80f5165dd
fmt: keep trailing comments after fn header decl ( #13596 )
2022-02-25 16:36:48 +03:00
yuyi
83ea97b1a3
parser: fix optional expr with array value ( #13599 )
2022-02-25 15:54:12 +03:00
Larpon
73f931b52e
fmt: improve single line const comment placement ( #13595 )
2022-02-25 14:46:12 +02:00
Delyan Angelov
9535d38645
ci: fix concurrency.group name for containers_ci.yml
2022-02-24 16:00:57 +02:00
Bastian Buck
fa645516c3
crypto: implement Output Feedback (OFB) Mode for AES and DES ( #13583 )
2022-02-24 14:38:21 +02:00
Bastian Buck
0d07a64230
crypto: implement Counter (CTR) Mode for AES and DES ( #13582 )
2022-02-24 12:06:33 +02:00
Delyan Angelov
9523c23e14
ci: bump timeout-minutes to 25 for ci_cross.yml
2022-02-24 12:04:04 +02:00
yuyi
d30ad344e8
checker: check error for array of sumtype appendding ( #13593 )
2022-02-24 11:07:03 +02:00
kahsa
f6891c405a
doc: fix header size ( #13594 )
2022-02-24 10:51:10 +02:00
yuyi
a28249c119
ast: fix for in iterator of generic struct ( fix #13579 ) ( #13585 )
2022-02-24 10:48:52 +02:00
kahsa
9662b79662
doc: improve embedded struct section ( #13574 )
2022-02-23 15:54:00 +02:00
Subhomoy Haldar
114a341f5f
rand: simplify rand.PRNG, move to optional types for error handling ( #13570 )
2022-02-23 12:36:14 +02:00
Bastian Buck
5c0b7b0d05
crypto: implement Cipher Feedback (CFB) Mode for AES and DES ( #13566 )
2022-02-23 11:55:16 +03:00
yuyi
b5e7cef1b1
ast: define 'const invalid_type_idx = -1' ( #13573 )
2022-02-23 11:54:43 +03:00
yuyi
c3ec738126
checker: check struct field reference type mismatch ( #13575 )
2022-02-23 11:53:22 +03:00
gcxfd
838a8f2183
docs: improve the documentation for struct embedding ( #13560 )
2022-02-22 19:09:54 +02:00
mahdi ramezaan zaade
2712e43802
doc: add an example on how to get a cloned slice ( #13567 )
2022-02-22 17:22:33 +02:00
Delyan Angelov
d2e8302d21
ci: show failing compilation output in draw_fns_api_test.v (make diagnostic easier)
2022-02-22 16:53:06 +02:00
yuyi
6486fffc5a
checker: cleanup map = {} processing ( #13563 )
2022-02-22 16:04:54 +02:00
Vincenzo Palazzo
6a876d4170
datatypes: small fix for the BST node constructor ( #13569 )
2022-02-22 15:41:30 +02:00
Larpon
1032cf5c04
checker: only cast as ast.Var if not unresolved, fixes #13561 ( #13562 )
2022-02-22 15:23:15 +02:00
Delyan Angelov
33d379d530
ci: vfmt vlib/net/socket.v
2022-02-22 15:21:20 +02:00
gcxfd
ee1de06678
net: extract a common Socket struct, reuse it by embedding in TcpSocket & UdpSocket ( #13559 )
2022-02-22 10:34:38 +02:00
Vincenzo Palazzo
7bd8503170
datatypes: add a binary search tree implementation ( #13453 )
2022-02-22 10:28:01 +02:00
Delyan Angelov
4a765bc33b
cgen: support -d trace_gen_source_line_info
2022-02-21 23:04:10 +02:00
Delyan Angelov
f2e5bb447e
os: remove dead code
2022-02-21 22:57:24 +02:00
yuyi
07e9ed1a1d
cgen: fix interface embedding method call ( #13553 )
2022-02-21 17:49:38 +02:00
playX
b842e89acc
all: initial implementation of compile-time types ( #13549 )
2022-02-21 17:42:54 +02:00
yuyi
83cdd8bedd
ast: add comments for struct 'StructInit' and 'StructInitField' ( #13551 )
2022-02-21 12:48:53 +02:00
simon place
8ba4a3dd01
math.complex: make mutable the Complex.re and Complex.im fields ( #13540 )
2022-02-21 12:39:45 +02:00
kahsa
809772db4e
gg: improve Context scale for Android ( #13545 )
2022-02-21 12:12:21 +02:00
gcxfd
8b033c3993
tools: add a -theme-dir folder/ parameter to v doc ( #13550 )
2022-02-21 12:08:46 +02:00
yuyi
04654ed518
parser: check error for defer propagate ( fix #13534 ) ( #13536 )
2022-02-20 12:29:08 +02:00
yuyi
75ebac006d
cgen: fix struct init with multi nested embed update expr ( #13529 )
2022-02-19 20:46:44 +02:00
gcxfd
dbae2d6af4
net: add UdpSocket.address() method ( #13524 )
2022-02-19 20:45:55 +02:00
yuyi
09f08e1fee
cgen: fix error for interface and embedded struct build ( #13530 )
2022-02-19 20:43:40 +02:00
eyun
67e33bf9bc
checker: make public the valid_comptime_if_os list ( #13518 )
2022-02-19 15:22:33 +02:00
eyun
2b974cdb97
docs: rename exec -> execute ( #13514 )
2022-02-19 15:20:46 +02:00
yuyi
0236931c78
cgen: fix generics with reference generic arguments ( #13525 )
2022-02-19 15:19:50 +02:00
Alexander Medvednikov
3fa6622ee8
doc: simplify the filter/map example a bit
2022-02-19 12:10:12 +03:00
Dialga
bcc4de19fc
v.builder: fix cross compiling directory with spaces ( #13522 )
2022-02-19 10:08:41 +02:00
yuyi
0208e9672d
checker: check array sort_with_compare callback function parameters ( #13511 )
2022-02-19 10:06:36 +02:00
Milo
4cdb244151
docs: update urls in roadmap ( #13509 )
2022-02-18 14:19:06 +02:00
Delyan Angelov
d86b18844e
net.unix: use byte() instead of u16() cast for addr.sun_family
2022-02-18 13:47:12 +02:00
Delyan Angelov
fad254dcce
ci: skip use_net_and_net_unix_together_test.v on windows
2022-02-18 12:45:32 +02:00
Delyan Angelov
3c38abc56e
rand: fix rand.uuid_v4()'s clock_seq_hi_and_reserved field
2022-02-18 12:43:38 +02:00
Delyan Angelov
c9867a9ae4
net: ensure that net and net.unix can be imported together in the same program
2022-02-18 11:47:56 +02:00
yuyi
14073ac0fe
checker: fix error for array of sumtype init ( #13501 )
2022-02-18 11:47:24 +02:00
Subhomoy Haldar
072480352c
math.big: add get_bit, set_bit, big_mod_pow ( #13507 )
2022-02-18 11:53:39 +03:00
Delyan Angelov
a886242700
ci: extract ubuntu-docker-musl and alpine-docker-musl-gcc to containers_ci.yml, so they can be easily turned on/off in private github actions
2022-02-18 10:31:01 +02:00
Delyan Angelov
3bcd11260f
ci: move alpine-docker-musl-gcc and ubuntu-docker-musl to other_ci.yml
2022-02-18 10:25:04 +02:00
Delyan Angelov
ef5ea0ef21
ci: fix vweb failures (restore the ability to *force* vweb to listen to *only* local interfaces)
2022-02-18 10:18:04 +02:00
Alexander Medvednikov
3d46005195
tools/fast: bring back -usecache
2022-02-18 10:41:53 +03:00
Joe Conigliaro
f4051e0252
checker: make sure generic struct instantiation uses a known type. closes #13506
2022-02-18 17:54:52 +11:00
Anton Zavodchikov
da9331f8ff
vweb: support ipv6 ( #13498 )
2022-02-17 23:13:36 +03:00
Delyan Angelov
eb45a321a5
tools: add cmd/tools/regress.v to simplify bisecting for regression bugs/features:
...
Support finding which commit introduced a regression:
./v run cmd/tools/regress.v --old COMMIT --command './v run /abs/path/to/regression_bug.v'
Support also finding which commit introduced a feature (or made code compile/run):
./v run cmd/tools/regress.v --old COMMIT --command '! ./v run /abs/path/to/feature.v'
NB: the '! ' is a POSIX shell feature. It may not work on Windows outside of WSL.
Its meaning is to invert the exit code for the next command, i.e. 0 -> 1, non 0 -> 0
If it does not work for you, you need to write a more explicit script that will exit
with 0 code for all commits, where the feature does NOT work, and with non 0 code for
all commits, where the feature does work.
2022-02-17 18:07:28 +02:00
Joe Conigliaro
d739abbb3f
cgen: move var decl out of loop in global_decl()
2022-02-18 00:42:54 +11:00
Delyan Angelov
ebb66aa82c
tools: support git bisect run cmd/tools/oldv --bisect --command "./v run /abs/path/to/regression.v"
2022-02-17 15:34:55 +02:00
Delyan Angelov
554a689213
ci: be more verbose when running make.bat on the CI
2022-02-17 13:26:23 +02:00
Joe Conigliaro
07b15a209a
cgen: fix for prev commit - get usecache working with clang (fix duplicate symbols)
2022-02-17 22:24:58 +11:00
Joe Conigliaro
6fc654821f
cgen: get usecache working with clang (fix duplicate symbols)
2022-02-17 22:17:07 +11:00
Delyan Angelov
245b70cabc
checker: bump iface_level_cutoff_limit to 100 (fix ci)
2022-02-17 11:46:04 +02:00
Delyan Angelov
230dc26858
checker: bump iface_level_cutoff_limit to 99 (fix ci)
2022-02-17 11:42:34 +02:00
yuyi
4f9039991f
parser: cleanup in check_undefined_variables() ( #13496 )
2022-02-17 10:16:52 +02:00
Delyan Angelov
901a4d8b84
checker: restrict too deep recursion, to prevent stackoverflows on windows
...
For v itself, the nesting levels do not exceed 15, so a limit of 40 seems reasonable.
2022-02-17 10:04:11 +02:00
yuyi
842fd7a27e
parser: check assign expr with undefined variables of struct_init ( #13495 )
2022-02-17 10:21:03 +03:00
Delyan Angelov
89b99ad4c3
scanner: remove the restriction for \x00 in strings ( #13493 )
2022-02-16 23:41:05 +02:00
blackshirt
54b10e99a1
ed25519: make public ed25519.internal.edwars25519.Element ( #13488 )
2022-02-16 22:56:14 +02:00
Tarcisio Gruppi
f68144774d
fmt: fix map missing a comma after enum keys, leading to non parsable code ( #13481 )
2022-02-16 21:08:29 +02:00
Delyan Angelov
d3b8ac2e46
ci: remove the -silent flag for CI jobs (the failing tests are listed at the end of the run anyway)
2022-02-16 21:02:36 +02:00
yuyi
f8b8950b96
checker: check mut interface arguments ( #13479 )
2022-02-16 11:53:41 +02:00
Alexander Medvednikov
5a14748e7c
cgen: c2v enum fix
2022-02-16 12:05:32 +03:00
Delyan Angelov
9c24d09dc3
strconv: bug fix for "${239.5:0.0f}" ( #13483 )
2022-02-16 11:33:29 +03:00
starryskye
6d2a88e31f
net.smtp: add STARTTLS and implicit SSL support ( #13473 )
2022-02-16 09:18:51 +02:00
vyrus001
d4fc8601e0
builder: fix clang failing to link on windows due to an -ftlo error ( #13470 )
2022-02-16 09:13:26 +02:00
Mihai Galos
b8d656b308
examples: enhance the call_v_from_python example, with a fn accepting 2 f64 params ( #13480 )
2022-02-16 09:12:49 +02:00
blackshirt
3ac4155f0c
crypto: add an ed25519 digital signature module ( #13476 )
2022-02-15 21:28:14 +02:00
Delyan Angelov
ff34b79d39
crypto: implement rand.bytes(needed_bytes int) ?[]byte, use it consistently instead of the old rand.read(), which will change to be compatible with io and the pseudo random rand module
2022-02-15 18:39:33 +02:00
Larpon
80444c8ec4
strings: add find_between_pair ( #13468 )
2022-02-15 15:12:15 +02:00
Delyan Angelov
d25652fbcf
parser, ast: support -d for trace_rewrite_already_registered_symbol, trace_register_sym, trace_parse_stmt, trace_parse_comptime, trace_parse_text, trace_parse_file, trace_parse_vet_file
2022-02-15 13:20:40 +02:00
yuyi
fb3dd82400
cgen: fix interface embedding complex cases ( #13472 )
2022-02-15 12:41:40 +02:00
mint
73cf597bec
ci: remove now-useless mlibc stuff from Vinix workflow ( #13471 )
2022-02-15 11:19:28 +02:00
yuyi
f9fc136c24
all: rename InterfaceDecl.ifaces to InterfaceDecl.embeds ( #13475 )
2022-02-15 11:17:39 +02:00
crthpl
e23db2f9b7
cgen: fix autogen free method for struct with shared field ( #13469 )
2022-02-15 03:55:06 +02:00
Delyan Angelov
89e9f8a00c
ci: fix vinix compilation to commit aa18fc0 (Meson building mlibc fails in a01546b)
2022-02-14 21:25:50 +02:00
yuyi
dc0b0c83c6
ast: fix error for interface embedding call ( #13466 )
2022-02-14 19:22:44 +02:00
Delyan Angelov
f8bf3db568
markused: always include slice_ni & substr_ni too (support s#[] and a#[] in -skip-unused)
2022-02-14 19:05:30 +02:00
igor
efdbe9d92c
repl: fix list command deleting '/'; adapt the logo to the terminal size ( #13462 )
2022-02-14 16:18:20 +02:00
yuyi
8119a297f7
ast: fix error for 'struct embed is interface' ( #13465 )
2022-02-14 13:43:36 +02:00
yuyi
b2f984280b
checker: strengthen the judgment of generic type parameters replacement, merge generic type init tests ( #13460 )
2022-02-14 02:38:47 +02:00
yuyi
2e0f8ee9e2
ast: fix error for struct embedding with interface ( #13457 )
2022-02-14 02:33:47 +02:00
Vincenzo Palazzo
bf11df40e2
readline: give the possibility to ignore the empty line in the history ( #13452 )
2022-02-14 00:12:25 +02:00
blackshirt
57e850e932
crypto.sha512, crypto.sha256 : Make public the write() and sum() methods ( #13461 )
2022-02-14 00:10:50 +02:00
Delyan Angelov
74048e2f17
net: simplify the TcpConn.read_line/0 method, accumulate partially read lines, use a string builder, instead of concatenation
2022-02-13 22:42:38 +02:00
Vincenzo Palazzo
6ea4f361a1
urllib: fixed regression in the set function ( #13455 )
2022-02-13 15:06:00 +02:00
igor
9ff0c51e61
repl: reduce the vertical size used by V's logo, put it on the left of the info texts ( #13451 )
2022-02-13 11:41:36 +02:00
Delyan Angelov
bad30bdd79
os: allow using XDG_CACHE_HOME for choosing the folder returned by os.cache_dir() on windows too
2022-02-13 11:18:51 +02:00
yuyi
5071a54b99
cgen: split up into for.v, match.v, struct.v ( #13454 )
2022-02-13 07:52:49 +03:00
yuyi
b5379255da
checker, cgen: fix error for struct embed with fn type ( #13450 )
2022-02-12 20:55:40 +02:00
Ulises Jeremias Cornejo Fandos
4391ae563d
examples: improve the pendulum simulation, with several modes and diagrams ( #13446 )
2022-02-12 19:38:07 +02:00
Delyan Angelov
a74d28ae5f
sync,ci: bump vtest retry for channel_select_6_test.v
2022-02-12 19:22:27 +02:00
Delyan Angelov
799c95dc4e
tests: filter test_ fns with params from the list of automatically run test functions ( fix #13443 )
2022-02-12 17:30:20 +02:00
Delyan Angelov
11a0df5bee
tests: rename struct_with_reference_alias_field.v to struct_with_reference_alias_field_test.v
2022-02-12 15:29:22 +02:00
crthpl
0eee012ae9
cgen: fix x in shared_map ( #13442 )
2022-02-12 11:55:25 +02:00
Tim Basel
37c151efe5
docs, builtin, encoding.csv: update error implementations ( #13440 )
2022-02-12 11:54:10 +02:00
yuyi
ae0e90f5d8
cgen: fix struct init with embed field update ( #13444 )
2022-02-12 08:16:51 +03:00
yuyi
7178367de0
all: fix error for comptime for in field with generic fn ( fix #13409 ) ( #13439 )
2022-02-11 22:00:13 +02: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
Vincenzo Palazzo
61024d4b75
repl: support aliased module imports too ( #13423 )
2022-02-11 15:03:14 +02:00
Juergen Donnerstag
654bc49d3c
os: implement win_read_string on os.Process ( #13428 )
2022-02-11 13:02:00 +02:00
Artem
e0618f94e8
v help: add an example of using both -prof and run ( #13432 )
2022-02-11 11:24:07 +02:00
yuyi
a21f4563b3
checker: check the arity and the kinds of the type parameters in generic struct inits ( #13429 )
2022-02-11 11:21:07 +02:00
Vincenzo Palazzo
7f29418c63
strconv: change atof64 to return an error, if the parsed value is not a valid number ( #13424 )
2022-02-10 13:27:32 +02:00
Delyan Angelov
1c19573382
ci: use 'trigger_type: manual' for Cirrus CI's arm64_task/arm64-ubuntu-tcc job
2022-02-10 13:22:18 +02:00
kahsa
b205e2fc67
docs: improve the interface examples ( #13422 )
2022-02-10 12:28:40 +02:00
Delyan Angelov
9ed18efa53
checker: error on redefining any of the public builtin functions, not just ['print', 'println', 'eprint', 'eprintln', 'isnil', 'panic', 'exit'] ( #13419 )
2022-02-10 12:26:30 +02:00
Artem
43d6b97c21
docs: improve the hot reload section, add run command example ( #13418 )
2022-02-09 19:26:09 +02:00
yuyi
f2eb50008d
parser, checker: cleanup struct short syntax processing ( #13416 )
2022-02-09 18:31:16 +02:00
Vincenzo Palazzo
0d1d259bb4
net.urllib: keep the query parameter order ( #13405 )
2022-02-09 17:36:12 +02:00
yuyi
4be3c92640
checker: check generic struct init without type parameter ( #13404 )
2022-02-09 14:06:45 +02:00
Delyan Angelov
356ccf247f
cgen: add an earlier error, to pin point the use of closures on windows
2022-02-09 08:35:11 +02:00
Delyan Angelov
dd835acb8d
sync: add Once.do_with_param/2 method in addition to the existing Once.do/1 (workaround the absence of closures on windows)
2022-02-08 17:15:28 +02:00
Subhomoy Haldar
5d2995c4d5
tools: support ./v symlink -githubci ( #13403 )
2022-02-08 13:23:10 +02:00
Delyan Angelov
1dbde05267
ci,tools: improve the precision of report-missing-fn-doc, remove dependence on sed
2022-02-08 11:30:13 +02:00
Delyan Angelov
ff02f94fd6
tools: support --exclude/-e and --relative-paths/-r options in missdoc.v
2022-02-08 11:10:19 +02:00
Snavy
f0806822dd
docs: add a JSON section, and subsections for encoding and decoding ( #13396 )
2022-02-08 10:18:40 +02:00
playX
4ef7d26133
arrays: add rotate_left and rotate_right ( #13388 )
2022-02-07 13:20:45 +02:00
Larpon
5df83812a0
ci: fix undoc pub fn diff output ( #13389 )
2022-02-07 13:18:10 +02:00
Vincenzo Palazzo
10dcb2e0d9
parser: allow embedding interfaces from other modules ( #13385 )
2022-02-07 00:20:34 +02:00
Delyan Angelov
1dc239227d
docs, builtin: clean up the homepage of modules.vlang.io a little, do not use //==== comments for now in builtin
2022-02-06 23:51:40 +02:00
Delyan Angelov
7f70493e1d
vdoc: show the V commit hash too, not just 0.2.4
2022-02-06 23:50:11 +02:00
Delyan Angelov
191e99c248
v.doc: use the .parse_comments mode, instead of the older .toplevel_comments (the scanner/parser is now more robust)
2022-02-06 23:49:21 +02:00
Larpon
649ecab11f
ci: add report-missing-fn-doc job, to prevent adding new undocumented pub symbols in vlib ( #13386 )
2022-02-06 19:52:14 +02:00
Vincenzo Palazzo
d46ac40758
checker: add error for assigning none values ( #13383 )
2022-02-06 16:08:23 +02:00
Larpon
31df2c4f45
tools: tweak missdoc defaults, add CLI flags to control what's ignored ( #13384 )
2022-02-06 15:44:26 +02:00
kahsa
fd9aa8bee6
ci: require a minimal reproducible code sample in .github/ISSUE_TEMPLATE/bug_report.md ( #13382 )
2022-02-06 15:41:57 +02:00
Delyan Angelov
1be0cb0306
ci: do not fail silently in the Cirrus CI / Code CI / arm64-ubuntu-tcc job
2022-02-06 14:18:24 +02:00
div72
939bc9f26f
v.parser: fix compilation of normal .v files with -translated ( #13363 )
2022-02-06 12:53:20 +02:00
Ikko Ashimine
31739c2586
docs: fix typo ( #13381 )
2022-02-06 11:39:35 +02:00
Delyan Angelov
66f21cae55
rand: add pub fn rand.read(mut buf []byte) and pub fn rand.bytes(needed int) ?[]byte{} + tests
2022-02-06 10:54:34 +02:00
yuyi
ece73836aa
cgen: fix error for struct with reference alias field ( #13380 )
2022-02-06 10:52:36 +02:00
Vincenzo Palazzo
4e13ee22e9
repl: reproduce the void print function error ( #13372 )
2022-02-06 08:05:25 +02:00
Alexander Medvednikov
f23d2c8cf4
cgen: c2v variadic fixes
2022-02-06 03:36:38 +03:00
div72
cec7e91714
v.parser, v.checker, v.gen: add support for [translated] tag ( #13373 )
2022-02-06 00:16:02 +02:00
Sandro Martini
054c8b1f13
log: update Logger interface, so that Log is usable even as a Logger instance; add a test to ensure it ( #13376 )
2022-02-05 22:09:55 +02:00
Delyan Angelov
5faabe7464
Revert "cgen: fix error for struct with reference alias fields ( #13374 )"
...
This reverts commit 4d485ae687 .
2022-02-05 18:52:37 +02:00
yuyi
4d485ae687
cgen: fix error for struct with reference alias fields ( #13374 )
2022-02-05 18:23:54 +02:00
Asher
47ee292ba4
vweb: make Context.mount_static_folder_at more robust ( #13361 )
2022-02-05 15:10:26 +02:00
yuyi
173b4652fb
parser: check orm sql statements, using undefined variables in where expr ( fix #13367 ) ( #13368 )
2022-02-05 11:32:41 +02:00
Vincenzo Palazzo
c9a8d6448d
fmt: preserve formatting with comments in a empty map ( #13362 )
2022-02-05 10:05:35 +02:00
Vincenzo Palazzo
b9fce4ef09
checker: make sure that the operator check is made on the concrete type ( #13360 )
2022-02-05 00:11:24 +02:00
Delyan Angelov
a054f868a0
v.util: use a normalised relative file path in the error messages with /, even on windows, to make the compiler error tests more robust
2022-02-04 17:56:08 +02:00
Delyan Angelov
d02c0636d8
encoding.hex: fix shift warning
2022-02-04 15:16:08 +02:00
yuyi
a61b4809dc
ast, parser, checker: fix generic struct init with inconsistent generic types ( #13359 )
2022-02-04 14:24:38 +02:00
Delyan Angelov
89d399b035
examples: fix leak in examples/sokol/particles/, by marking s.pool and s.bin with .noslices
2022-02-03 18:52:52 +02:00
Delyan Angelov
85d36ed231
checker: stricter type casting error messages
2022-02-03 14:18:30 +02:00
kahsa
ede9f29323
doc: mention []rune.string() ( #13348 )
2022-02-03 11:29:02 +02:00
yuyi
be1e40dac0
cgen: fix error for sql statement inside fn call ( fix #13330 ) ( #13346 )
2022-02-02 18:05:31 +02:00
Delyan Angelov
9344c27021
builtin: save a call to array.ensure_cap in array.insert, array.push, array.push_many in most cases
2022-02-02 11:01:07 +02:00
crthpl
c0c07db7cc
cgen: fix struct field init from shared struct field ( #13343 )
2022-02-02 10:55:57 +02:00
penguindark
c3573454d1
regex: fix bug in replace_by_fn ( #13344 )
2022-02-02 10:52:18 +02:00
yuyi
b10b65e134
cgen: fix error for interface with multi-nested embed struct ( #13345 )
2022-02-02 09:11:29 +02:00
Delyan Angelov
b2c299da48
vweb: support vweb.run_at(app, localhost, 8099) ( #13337 )
2022-02-01 18:41:12 +02:00
Delyan Angelov
d8cce0a71d
ci: fix cgen for interface_struct_with_multi_nested_embed_test.v for gcc/clang
2022-02-01 17:12:15 +02:00
yuyi
a014844050
cgen: fix error for interface with multi nested embed structs ( fix #13331 ) ( #13336 )
2022-02-01 14:50:12 +02:00
Tarcisio Gruppi
51513ae19a
vfmt: keep file permissions with -w on !windows ( #13334 )
2022-02-01 14:49:06 +02:00
penguindark
7c1b249da0
regex: fix dot char problems on groups with * ( #13333 )
2022-02-01 13:49:37 +02:00
Delyan Angelov
310969a057
docs: clarify the interface methods section
2022-02-01 10:36:25 +02:00
Delyan Angelov
db50e79d26
tools: implement cgen tag for Markdown examples in v check-md ( #13332 )
2022-01-31 22:51:04 +02:00