Commit graph

1959 commits

Author SHA1 Message Date
Turiiya
9fa1f8e275
tools: fix resolving external dependencies in vpm, add test (#19772) 2023-11-05 17:31:43 +02:00
Turiiya
1f8fbb51e8
tools: simplify command execution in vpm, use os.execute_opt (#19741) 2023-11-05 15:55:45 +02:00
Delyan Angelov
9effbec648
tests: fix v test-all 2023-11-05 13:09:37 +02:00
Turiiya
b734197714
tools: use a safer way to initialise settings in vpm (#19755) 2023-11-05 11:09:48 +02:00
Turiiya
2ef49b8c11
tools: improve the output of v install (#19760) 2023-11-04 14:03:35 +02:00
Turiiya
3957bd801d
tools: prompt for project meta data on v init too (#19747) 2023-11-04 13:15:09 +02:00
Turiiya
230dcb479d
tools: improve VCS handling in vpm part2 (#19754) 2023-11-04 10:16:43 +02:00
JalonSolov
f1ba664e92
builtin: move builtin_test.v to builtin_test.c.v (part of making -W impure-V the default) (#19757) 2023-11-04 10:14:50 +02:00
Turiiya
55db150fe1
tools.vpm: improve handling of urls that end with .git (#19758) 2023-11-04 10:11:48 +02:00
Turiiya
244411ae42
tools: use VPM_NO_INCREMENT env var to skip dl count increment when testing vpm (#19756) 2023-11-04 08:00:37 +02:00
Turiiya
c2a3eef45b
tools: fix windows install of an already existing module with vpm (#19761) 2023-11-04 07:59:27 +02:00
Turiiya
be89cbf26f
vpm.tools: cleanup and make handling of the different VCS systems more robust (#19740) 2023-11-03 20:25:46 +02:00
Turiiya
e34e06350a
pref: fix unintended file extensions in default output names, allow for v run file.c.v (#19745) 2023-11-03 19:51:44 +02:00
Turiiya
8670dcc200
tools: extract vpm commands in separate files (#19729) 2023-11-02 21:01:59 +02:00
Turiiya
59660746dd
vdoc: escape tags in highlighted html (#19731) 2023-11-02 20:58:50 +02:00
Daniel Däschle
1e80e47b79
doc: fix duplication in toc (#19726) 2023-11-02 12:52:34 +03:00
Delyan Angelov
cc1193f331
tools: use @VCURRENTHASH instead of @VHASH in vdoc 2023-11-01 14:15:17 +02:00
Delyan Angelov
f3425139fb
tools: make vdoc more verbose with -v to more easily diagnose parsing problems on incomplete code examples with it 2023-11-01 14:02:33 +02:00
Delyan Angelov
c7e6a1c8fa
tools: make vdoc more robust to incomplete code in code examples (do not stop for errors in them) 2023-11-01 14:01:09 +02:00
Ned
6c83d9a205
vdoc: support for highlighting code in README's (#19725) 2023-11-01 13:11:37 +02:00
Turiiya
be487b3c36
tools.vpm: cleanup install part1 (#19718) 2023-11-01 12:46:07 +02:00
Joe C
a63f3e6f77
coroutines: use photon work_pool when nr_jobs > 0, and use photon libc fn wrappers (#19711) 2023-10-31 20:12:52 +03:00
Turiiya
e465f7490c
tests: cleanup legacy temp path (#19716) 2023-10-31 15:16:19 +02:00
Turiiya
3708061d61
tools.vpm: fix install --once for external modules, add already installed info, add test (#19702) 2023-10-31 15:00:30 +02:00
Turiiya
a2dabddc70
testing: add temporary file hash to prevent accidental collisions with test file binaries (#19710) 2023-10-31 08:07:51 +02:00
Turiiya
1c4c5050de
v.help: add [noreturn] attribute to print_and_exit (#19706) 2023-10-30 14:58:45 +02:00
Turiiya
109fc22269
tools.vpm: simplify, use more stdlib functionality part2, add more tests (#19692) 2023-10-30 03:21:28 +02:00
Turiiya
00165d147b
tools: add vpm tests for installing modules with different URLs/identifiers (#19664) 2023-10-29 11:22:21 +02:00
Turiiya
5c2eafc154
fmt: recognize or blocks in call args (#19690) 2023-10-29 11:15:07 +02:00
Turiiya
b9d0aedb09
tools: cleanup vcreate tests (#19666) 2023-10-29 04:36:16 +02:00
Turiiya
491558af69
tools.vpm: simplify, use more stdlib functionality (#19665) 2023-10-28 18:39:59 +03:00
Larpon
775b25e11b
sokol: update to match uptream at 9e0f1b4 (#19687) 2023-10-28 17:15:46 +03:00
Turiiya
c09b66b00b
tools: move vpm.v into its own cmd/tools/vpm/ module (#19659) 2023-10-26 09:51:44 +03:00
Delyan Angelov
d11db9a3aa
tools: make the commit message more informative, for the repo for https://fast.vlang.io/ in cmd/tools/fast/website/ 2023-10-26 08:21:16 +03:00
Turiiya
a1063bd63d
vcreate: fix v init with project names containing dashes (#19619) 2023-10-25 20:39:14 +03:00
Delyan Angelov
f5c4864db8
tools: print an error message, when make is needed, but is missing on unix 2023-10-25 20:23:07 +03:00
Turiiya
9051ac8921
all: fix typos (#19634) 2023-10-23 21:21:15 +03:00
Turiiya
8a8129cd5c
vdoc: add hr style, use prettier version 3 in the CI (#19628) 2023-10-23 10:30:34 +03:00
Turiiya
a132345e08
parser: fix vet bad top level statement error for one file programs (#19613) 2023-10-23 09:54:08 +03:00
Delyan Angelov
0fb38edcb6
ci: fix vcreate_input_test.v on FreeBSD (expect is in /usr/local/bin there, if installed) (#19578) 2023-10-16 10:11:51 +03:00
Turiiya
06fb8f0ffa
vcreate: don't use template names as project descriptions (#19439) 2023-10-12 07:10:28 +03:00
Turiiya
2332c17bea
tools: fix typos (#19546) 2023-10-11 03:16:59 +03:00
Turiiya
3e50ba0856
ci: update and cleanup the ci related code (#19541) 2023-10-10 21:39:00 +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
yuyi
169a6b5ce0
native: fix native new_int errors (#19532) 2023-10-09 12:27:48 +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
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