16598 Commits

Author SHA1 Message Date
felixmaker
2ce209dac5
json: update the example in the module's README.md (#19544) 2023-10-10 20:26:55 +03:00
yuyi
192d7dba04
markused: cleanup in mark_used(), use robust index names, instead of the much more brittle integer values (#19543) 2023-10-10 16:42:12 +03:00
yuyi
582d593a79
all: fix new int type promotion rules and cleanup native gen() (#19535) 2023-10-10 09:13:09 +03:00
Turiiya
37e5616b4d
tesst: fix vcreate test failing on macOS (#19536) 2023-10-10 01:05:57 +03:00
Turiiya
4dee1e051a
vcreate: add tests for module creation with v new (#19519) 2023-10-09 18:55:26 +03:00
Artem Yurchenko
04c8d45934
doc: update the section Performance tuning (#19530) 2023-10-09 17:42:15 +03:00
Yash Raj
04eb86c9fa
Fixed typo in flag.v (#19534) 2023-10-09 17:01:39 +03:00
Delyan Angelov
121fa0e92d
term.ui,os.notify: fix .ctrl being stuck in examples/term.ui/event_viewer.v (regression happened in e9a3817a from 2023-02-20) 2023-10-09 14:25:44 +03:00
yuyi
169a6b5ce0
native: fix native new_int errors (#19532) 2023-10-09 12:27:48 +03:00
Joe Conigliaro
b3ac88efe5
coroutines: fix dealloc (called wrong fn) 2023-10-09 16:58:57 +11:00
Joe Conigliaro
9604a3f491
coroutines: get photonlib/coroutines working with GC 2023-10-09 12:10:19 +11:00
Alexander Medvednikov
1f06476343 cgen: fix maps with i32 keys 2023-10-09 00:18:46 +03:00
Wertzui123
75355395b9
term.ui: fix notices about uninitialized pointers (#19528) 2023-10-08 17:36:34 +03:00
Alexander Medvednikov
4f85b49bb5 all: new int fixes 2023-10-08 14:12:38 +03:00
yuyi
05d940ac2a
fmt: simplify formatting assign statement comments (#19524) 2023-10-08 13:32:22 +03:00
yuyi
e3ba197361
ast, parser, checker, cgen: cleanup ast.ArrayInit (#19526) 2023-10-08 13:31:52 +03:00
Sudoer
efef5bcc89
math: add missing docstrings for math.log_gamma_sign and for the complex.complex constructor function (#19523) 2023-10-08 12:20:48 +03:00
Alexander Medvednikov
b9a1b0c269 native: use i32 instead of int 2023-10-08 02:50:01 +03:00
Alexander Medvednikov
a616eb55fa ast: vfmt comptime_const_values.v 2023-10-08 02:09:30 +03:00
Alexander Medvednikov
e265e99a64 all: int => i64 (part 5) 2023-10-08 01:32:37 +03:00
Alexander Medvednikov
8c5ac3a529 all: i64 fixes 2023-10-08 01:04:19 +03:00
Larpon
3c68e78f32
sokol: fix usage of sokol sampler (#19527) 2023-10-07 21:05:30 +03:00
Alexander Medvednikov
e19e17f10b all: int => i64 (part 4) 2023-10-07 21:02:04 +03:00
Alexander Medvednikov
9e6a9f0330 all: int => i64 (part 3) 2023-10-07 20:55:49 +03:00
Alexander Medvednikov
10e02e92b9 cgen: use int32_t in cheaders.v 2023-10-07 20:32:58 +03:00
Alexander Medvednikov
eb30f2642b all: int => i64 (part 2) 2023-10-07 19:46:46 +03:00
Spydr
8023e25bea
all: finish bootstrapping of @VCURRENTHASH (#19517) 2023-10-07 14:08:58 +03:00
Alexander Medvednikov
fe41bda6f9 pref: temporary 64 bit int option 2023-10-07 13:47:55 +03:00
Delyan Angelov
49b8c2f9cd
v.pref: support a -q option, silencing many repeated messages like the one for v -prod run file.v 2023-10-07 13:43:44 +03:00
Turiiya
1e89b0b0dd
cgen: don't subtract null ptr in __offsetof, fix for v -cstrict -cc clang-14 cmd/tools/vpm.v and other programs using import net.http (fix #19222) (#19520) 2023-10-07 12:54:45 +03:00
Delyan Angelov
aba38d167b
net.openssl: fix ./v -cstrict -cc gcc-11 vlib/net/openssl/openssl_compiles_test.v 2023-10-07 11:36:29 +03:00
Delyan Angelov
6414b597bf
ci: temporarily disable failures for 'Shader examples can be built' in other_ci.yml 2023-10-07 08:08:10 +03:00
Delyan Angelov
071ef7ad93
ci: disable failing gg-regressions when there is a found difference temporarily (TODO: re-enable) 2023-10-07 07:55:39 +03:00
Delyan Angelov
6a63fe4d06
ci: fix job ubuntu, Freestanding task 2023-10-07 07:53:25 +03:00
Alexander Medvednikov
7008059c89 builtin: use isize in memdup 2023-10-07 03:39:28 +03:00
Alexander Medvednikov
e957e5c089 cgen: do not generate unnecessary memdup() definition 2023-10-07 03:31:24 +03:00
Alexander Medvednikov
0a4fa279a2 sokol: minor fixes 2023-10-07 03:14:06 +03:00
yuyi
f3e4963993
checker: fix fn call with option call argument in autofree mode (#19515) 2023-10-07 03:05:50 +03:00
Delyan Angelov
d20ed23365 thirdparty/sokol/sokol_gfx.h: fix whitespaces around the new glReadPixels XMACRO 2023-10-06 16:09:32 +03:00
Delyan Angelov
5e0c225472
thirdparty/sokol/sokol_gfx.h: ensure that glReadBuffer will be binded too, even on windows 2023-10-06 15:51:44 +03:00
Delyan Angelov
5d38c61aa1
fix cross compilation to windows 2023-10-06 15:34:43 +03:00
Delyan Angelov
729ed06a03
ci: fix error for private_redeclaration_of_C_struct.out 2023-10-06 15:04:32 +03:00
Delyan Angelov
8e7cd6f3ac
sokol.gfx: update the V bindings for the new functionality in the Sokol GFX library 2023-10-06 09:27:23 +03:00
Delyan Angelov
cee2eabd1f
sokol: fix the audio examples 2023-10-06 07:26:10 +03:00
Alexander Medvednikov
322ba7113f sokol: fix gfx structs 2023-10-06 02:31:11 +03:00
Alexander Medvednikov
0bf85d049e sokol: upgrade to latest version, fix all related issues 2023-10-05 20:22:49 +03:00
Tim Marston
756075380b
orm: add null handling and option fields (#19379)
* orm: added is none and !is none handling

* orm: added NullType, support option fields and deprecate [nonull]

Nullable DB fields are now determined by corresponding option struct field.  The
[nonull] attribute is deprecated and fields are all NOT NULL now, unless they
are option fields. New orm primitive, NullType, added to support passing none
values to db backends, which have been updated to support it.  Also, empty
string and 0 numberic values are no longer skipped during insert (since they may
be valid values).

* orm: fix [nonull] deprecation warning

* orm: add null handling to update and select

also, improved formatting for orm cgen, and removed optimised operand handling
of orm `is` and `!is` operators

* sqlite: read/report NULLs using new orm NullType

* postgres: returning data primitives now returns new orm.NullType

* orm: initialise NullType Primitives properly

* orm: do not smart cast operands inside sql

* orm: fix bad setting of option value

* orm: improve orm_null_test.v, adding/fixing selects

* orm: cleanup: rename NullType->Null, use serial const, cgen output

* orm: handle automatically generated fields more explicitly

During insert, fields which are
* [sql: serial]
* [default: whatever]
and where the data is a default value (e.g., 0, ""), those fields are not sent
to the db, so that the db can generate auto-increment or default values.  (This
was previously done only for [primary] fields, and not in all circumstances, but
that is not correct -- primary and serial/auto-increment fields are differnet.)

* orm: udpated README

* orm: select cgen fixes: read from uninit res; fail to init res

* orm: udpated tests

* orm: fix option sub-struct fields

* orm: fixed joins to option structs

Changed orm.write_orm_select() so that you pass to it the name of a resut
variable which it populates with the result (or not) and changed use of it in
sql_select_expr() and calls in write_orm_select() to populate substructs.

* orm: fix pg driver handling of NULL results

* orm: move runtime checks to comptime checker; cache checked tables

* orm: vfmt :(

* orm: markdown formatting

* orm: renamed orm.time_ and orm.enum_; updated db drivers

* checker: updated orm tests

* orm: fix issue setting up ast option values as orm primitives

* checker: ORM use of none/options and operations (added tests)

* orm: fixed tests

* db: clean code

* examples: remove orm nonull attributes

* orm: skip test memory santisation for orm_null_test.v

* orm: make the type-to-primitive converstion fns not public

* orm: mv object var c-code from checker->cgen; fix memory corruption

Code in checker/orm.v used the SqlStmtLine object field name to store c-specific
referenecs to option and array fields (for arrays of children).  I moved this
logic to cgen.  And fixed an issue introduced with option fields, where an array
of children was unpacked into a non-array result which could corrupt memory.

* orm: fixed vast error

* orm: skip 2 tests on ubuntu-musl which require sqlite3.h

* cgen: prevent casting a struct (string)

* v fmt orm_fkey_attribute.vv, orm_multidim_array.vv, orm_table_attributes.vv; run `VAUTOFIX=1 ./v vlib/v/compiler_errors_test.v`
2023-10-05 19:09:03 +03:00
Spydr
32bb8cf86d
all: implement @VCURRENTHASH to replace C.V_CURRENT_COMMIT_HASH (#19514) 2023-10-05 18:14:36 +03:00
Delyan Angelov
1512486d01
checker: extract vlib/v/checker/errors.v, use maps for c.error_lines, c.warning_lines, c.notice_lines, dedup all errors, warns, and notices
To better support projects with lots of errors/notices, deduplicate notices, warnings and messages,
for the same line (`generic method routes of vweb will be skipped` etc).
2023-10-05 17:59:43 +03:00
emacser
13c9006667
vweb: fix typo in vweb.v (#19513) 2023-10-05 14:22:17 +03:00