Commit Graph

1031 Commits (ace63594bf4d6a2b532fd480a53ce6d4e706ef7e)

Author SHA1 Message Date
Uwe Krüger dc045806f9
docs: describe usage of atomic C functions (#10861) 2021-07-20 08:31:20 +03:00
Delyan Angelov a007dd5d22
builder: support `-o -` to print the generated C/JS source to stdout 2021-07-18 16:26:50 +03:00
yuyi a5c784830b
all: simplify global_scope processing (#10848) 2021-07-18 15:29:34 +03:00
Delyan Angelov 6edfb2c7fe
v.parser: eliminate PrefixExpr from `&Type(x).name` and `&Type(x)[idx]` too (fix vinix build) 2021-07-17 20:20:20 +03:00
William Gooch 51dd8304bb
tools: make the `v` REPL help screen look nicer (#10833) 2021-07-17 11:23:29 +03:00
Delyan Angelov 027be2ecd4
tests: show a list of all failed commands in the summary too 2021-07-15 11:53:14 +03:00
Delyan Angelov 5322a25690
tests: detect missing -o v.c files earlier 2021-07-13 22:24:38 +03:00
Daniel Däschle 78a41969f6
vdoc: fancier attributes (#10789) 2021-07-13 19:44:22 +03:00
shadowninja55 f4d4f56d97
doc: fix html doc closing tags (#10787) 2021-07-13 16:45:17 +03:00
crthpl 5089eb4a84
parser: fix pointer cast expressions hack (#10777) 2021-07-13 12:01:24 +03:00
shadowninja55 d1f1c5ae51
v doc: add attribute tags to `v doc -f html` (#10778) 2021-07-13 08:27:20 +03:00
Delyan Angelov b09fa69cb3
v ast: use `flag`, add ability to combine -p and -w, implement --hide pos,name_pos,args,global_scope,scope 2021-07-12 14:53:14 +03:00
pancake fe65cde03b
tools: use os.symlink instead of system('ln -s') in `v symlink` (#10769) 2021-07-12 14:23:25 +03:00
Delyan Angelov 0a66d8dc10
v ast: allow analyzing .vsh files too 2021-07-12 13:24:40 +03:00
Thomas Treffner 533f09f7a2
tools: fix `v symlink` problem with paths containing spaces (#10756) 2021-07-11 18:54:24 +03:00
Delyan Angelov 972542d6ee
checker: `[noreturn]` part 2 (cleanup) (#10667) 2021-07-05 05:05:37 +03:00
yuyi b0b4b8e65b
checker: fix missing check generic fn call args (fix #10649) (#10657) 2021-07-04 19:15:15 +03:00
Tomas Hellström ec973f5c6e
x.websocket: move to net.websocket module (#10648) 2021-07-03 02:56:00 +03:00
Delyan Angelov e108a67952
tools: fix compilation of an instrumented vdbg in `v bug hw.v` (module lookup problem due to abs path) 2021-06-30 14:40:04 +03:00
Lukas Neubert 806719786f
vast: print Position.last_line (#10600) 2021-06-28 16:23:34 +03:00
Delyan Angelov 809aa9af65
v init: change text to indicate that `v init` creates projects 2021-06-24 18:31:23 +03:00
crthpl 500b48788e
parser, cgen: fix basic asm registers, fix numbered labels in addressing, support indirect branching (#10545) 2021-06-23 14:20:07 +03:00
Delyan Angelov 816bf308ad
v test-all: add a -freestanding check on Linux 2021-06-23 13:33:16 +03:00
Yuriy Zymlex 6736817bba
parser: fix `rewind_scanner_to_current_token_in_new_mode` (#10495) 2021-06-22 20:17:36 +03:00
Delyan Angelov c43791b0f5
ci: fix vcreate_test.v on windows 2021-06-22 20:08:20 +03:00
Delyan Angelov b6bd6d1d35
tests: add cmd/tools/vdoc/tests/vdoc_file_test.v, extract a `v.util.diff` module, cleanup 2021-06-22 18:52:34 +03:00
Delyan Angelov dd6591b2f5
ci: fix `[if xyz ?]` usages 2021-06-22 10:46:43 +03:00
Alexander Medvednikov ae12a0b8f1 fast: reduce delta from 20ms to 18 2021-06-21 03:50:31 +03:00
zakuro ce3681ee8f
v ast: eprintln and exit instead of panic on invalid file errors (#10526) 2021-06-20 13:12:08 +03:00
shadowninja55 984551227b
doc: allow pressing / to focus search bar (#10522)
* type / to focus search; rename unused variables

* use ev.preventDefault() instead of setTimeout()

* delete doc.js_
2021-06-20 05:16:50 +03:00
Delyan Angelov 21fe91e508
v watch: increase the default restart timeout, when vwatch.v is compiled with -gc boehm 2021-06-19 22:08:23 +03:00
Ryan Roden-Corrent f0ad0b024e
v init: create a .gitignore in existing git repo if it does not exist yet (#10488) 2021-06-19 21:36:12 +03:00
Delyan Angelov 3b5a37628f
v watch: allow customising the auto-restart timeout for the workers with an env variable VWATCH_TIMEOUT 2021-06-19 16:51:40 +03:00
Delyan Angelov d56ae2d508
v.fmt: keep comments after struct embeds 2021-06-18 18:42:05 +03:00
Delyan Angelov de384f1cc8
strconv: vfmt everything 2021-06-18 17:59:56 +03:00
Delyan Angelov 9f6ddb4c21
v.fmt: add an independent Comment.is_inline flag. Use it for fixing `[ .. //x ]` => `[ .. //x, ]` 2021-06-18 15:52:31 +03:00
yuyi 2298063129
checker: fix nested if smartcast selector exprs (fix #10372 #10379) (#10502) 2021-06-18 14:49:15 +03:00
Delyan Angelov 39e7290416
v: support for `[if expr]`, part 2 (old `[if ident]` is not yet deprecated) 2021-06-17 18:55:20 +03:00
Andreas Heissenberger 0918c130ee
tools: fix more strange edge cases for markdown links in `v check-md` (#10486)
* fix support for numbers in urls

* fix valid github link id creation
2021-06-17 12:53:25 +03:00
Andreas Heissenberger 7b52dbfdf8
tools: fix support for numbers in urls in `v check-md` (#10483) 2021-06-16 19:58:32 +03:00
Ryan Roden-Corrent 30fac1f877
toosl: fix `v init` - terminate newly created files with newlines, add a test (#10480)
* vcreate: Add test for `v init`.

* vcreate: Init git properly with no dir arg.

`v init` would fail to create a .gitignore file. When not providing a
dir arg, passing "" to create_git_repo would result in:

```
V panic: failed to create gitignore: failed to open file "/.gitignore"
```

* vcreate: Terminate files with newline.

Fixes #10478.
2021-06-16 19:57:51 +03:00
Delyan Angelov af60eba5e6
tools: cleanup generated executables by `v test-all` 2021-06-15 14:28:46 +03:00
kac- 8d4c9823ba
tools,clipboard: use lowercase library names for `-luser32`etc, allowing linux->windows cross compilation of ui programs (#10455) 2021-06-14 15:42:56 +03:00
Andreas Heissenberger 7983495c57
tools: improve `v check-md` by checking for broken TOC headline links (#10417) 2021-06-14 13:12:02 +03:00
Delyan Angelov 90d04b0ce6
ci: skip udp_test.v and tcp_test.v on windows-tcc for now 2021-06-14 13:10:20 +03:00
Delyan Angelov dc1c26a2c2
ci: add back vlib/net/http/cookie_test.v as an exception in vtest-cleancode.v 2021-06-14 10:20:58 +03:00
Delyan Angelov d7d9305d96
net: vfmt everything 2021-06-14 10:08:41 +03:00
Emily Hudson 535dcac8fa
net: ipv6 support, merge unix+ip;[pack:x] attribute (#9904) 2021-06-13 23:53:38 +03:00
Uwe Krüger 2ac39d9112
all: new function `isreftype(T)` to know if `T` contains pointers (#10438) 2021-06-13 06:26:13 +03:00
Delyan Angelov bdd1a13230
tools: fix workdir for fast.v 2021-06-12 18:28:54 +03:00
Alexander Medvednikov 3f745605a2 fast: disable cache refresh for now 2021-06-12 17:51:58 +03:00
lydiandy 7c2265e00a
tools: vast fix and clean code (#10381) 2021-06-07 21:42:09 +03:00
Delyan Angelov 01a8d3f8a1 tests: skip building psql/customer.v on macos (requires postgres) 2021-06-07 18:23:18 +03:00
Delyan Angelov 27f3737c5a
tools: cleanup the fast.v output 2021-06-06 09:52:29 +03:00
Delyan Angelov 43acb5a3ca
tools: make fast.v more robust against V module lookup bugs 2021-06-06 09:46:44 +03:00
Miccah c2981de4d5
http: add server.v and organize HTTP request and response code (#10355) 2021-06-06 00:43:14 +03:00
Delyan Angelov e54af19b25
examples: fix -cstrict compilation of c_interop_wkhtmltopdf.v 2021-06-05 10:03:57 +03:00
pancake 89d2f508cc
tools: fix `v symlink`, `uname -o` doesn't exist on macOS (#10303) 2021-06-03 01:22:14 +03:00
Delyan Angelov b28def7c11
tests: add vlib/v/tests/failing_tests_test.v, support `testdata` in `v test-self` too 2021-06-03 00:32:09 +03:00
Delyan Angelov 0254a1ac76
tests: ignore `testdata` folders in `v test .` too 2021-06-02 21:50:31 +03:00
Delyan Angelov bf623e191f
tests: ignore `testdata` folders while scanning for tests and .v files 2021-06-02 21:19:03 +03:00
zakuro 3e89b60784
vast: accept .vv file (#10305) 2021-06-02 16:10:15 +03:00
lydiandy 67518f946b
cmd/tools/vast: update DeferStmt (#10291) 2021-05-31 22:49:16 +03:00
Delyan Angelov 2376b343ba
tests: always use / for paths shown in tests 2021-05-31 15:56:36 +03:00
Delyan Angelov eac1e25c5d
strings: simplify Builder (#10263) 2021-05-31 14:21:06 +03:00
lydiandy 43acda083a
cmd/tools/vast: add comments and cleanup code (#10246) 2021-05-29 17:05:05 +03:00
Delyan Angelov 7287ecd6c7
ci: skip too slow tests in any sanitize mode, use VTEST_RUN_FSANITIZE_TOO_SLOW to override 2021-05-29 12:15:10 +03:00
Delyan Angelov bb6907473b
ci: add the slowest tests in skip_with_fsanitize_memory 2021-05-29 11:38:53 +03:00
Lukas Neubert ddcc22a778
fmt: fix removal of selective imported map key type (#10235) 2021-05-28 22:29:03 +03:00
Lukas Neubert 6b683d31ac
v.parser: support imported enums as map keys (#10234) 2021-05-28 20:09:03 +03:00
lydiandy e09f0234ea
tools: add `v ast file.v` (#10236) 2021-05-28 19:54:44 +03:00
Anton Zavodchikov 9ee1d8c848
doc: decrease letter count for search to 2 (#10214) 2021-05-27 10:17:25 +03:00
Delyan Angelov 6c40781d84
ci: vfmt cmd/tools/fast/fast.v 2021-05-26 09:49:22 +03:00
Alexander Medvednikov 9ea7eda9c0 tools/fast: -usecache for hello world 2021-05-26 09:33:42 +03:00
Enzo 0d25106b4d
cmd/tools/vpm: improve v show (#10198) 2021-05-25 14:30:48 +03:00
Pranav Baburaj da88235bdc
vpm: addd a show command (#10186) 2021-05-24 15:17:57 +03:00
Alexander Medvednikov db848ed314 tools/fast: wipe cache before measuring 2021-05-24 12:12:29 +03:00
penguindark d8d05e0106
all: new string interpolation in pure V (#10181) 2021-05-24 05:20:45 +03:00
Lukas Neubert 79b97fa361
fmt: keep names of parameters in anonymus function (#10173) 2021-05-23 05:54:39 +03:00
Alexander Medvednikov c04fc7bfc2 tools/fast: disable usecache for now 2021-05-22 07:20:48 +03:00
yuyi 293c6646d0
vtest-cleancode: do not skip generics_return_generics_struct_test.v anymore (#10163) 2021-05-21 17:20:52 +03:00
Delyan Angelov dd0a97541c
tests: use term.header_left, and a more compact output layout 2021-05-20 11:25:07 +03:00
Delyan Angelov 25ca1dd276
v test-all: test `-autofree` and `-prealloc` on V locally too 2021-05-20 10:07:23 +03:00
yuyi de080ba149
vfmt: cleanup vtest-cleancode (#10137) 2021-05-19 21:23:25 +03:00
Delyan Angelov 7a4ec9f60a
tools: add --before and --after options to `v watch` 2021-05-16 17:50:16 +03:00
Delyan Angelov 252249a348
tools: add a --silent option to `v watch` 2021-05-16 17:50:16 +03:00
Alexander Medvednikov e657cb2cd2 tools/fast: use -usecache 2021-05-15 05:52:06 +03:00
Delyan Angelov d11cd50773
ci: skip vweb_app_test.v except in the ubuntu-tcc job 2021-05-11 17:47:43 +03:00
Delyan Angelov 6f2c18f1c7
ci: fix `v build-tools` 2021-05-11 11:08:46 +03:00
Alexander Medvednikov dc034d9b16 vweb: make thread safe; checker: `$if T is Interface {` 2021-05-11 09:30:18 +03:00
Delyan Angelov 4728d102d9
os: add Process.finalise() and Process.free() methods to cleanup pipe descriptors 2021-05-09 21:50:47 +03:00
Delyan Angelov f85955ef67
tools/fast: use a common set of options for all measurement commands 2021-05-09 15:14:28 +03:00
Alexander Medvednikov 6a54f3a84d tools/fast: vfmt fast.v 2021-05-09 04:37:22 +03:00
Alexander Medvednikov e040806c36 tools/fast: fix -skip-unused 2021-05-09 03:50:28 +03:00
Alexander Medvednikov bdc3f76f68 tools/fast: use -skip-unused 2021-05-09 03:23:49 +03:00
Delyan Angelov 7db6d602de
tools: vfmt math_test.v and remove it from the exceptions in vtest-cleancode.v 2021-05-08 14:46:06 +03:00
Delyan Angelov 8a380f4699
tools: make `v test-cleancode` test everything by default (#10050) 2021-05-08 13:32:29 +03:00
zakuro b34b56ee4e
vbug: use readline to read expected result (#10037) 2021-05-07 19:31:43 +03:00
Uwe Krüger d26ac5692e
all: various fixes for [heap]/auto-heap handling (#10033) 2021-05-07 15:58:48 +03:00
Delyan Angelov 5b4eef8010
ci: bump up array capacities in repeat.v (workaround for segfaulting code-formatting-perf-regressions job) 2021-05-07 14:40:52 +03:00
Delyan Angelov 43cf3542ac
tools: fix a cmd/tools/repeat.v segfault 2021-05-06 21:46:59 +03:00
Alexander Medvednikov fc801fd563 tools/fast: use prealloc 2021-05-05 22:02:26 +03:00
Lukas Neubert 6745a7d725
vet: allow vetting of vsh files (#9997) 2021-05-04 18:25:56 +03:00
Louis Schmieder b8e070b2a1
orm: fix multi substructs (#9941) 2021-05-04 12:35:18 +03:00
Alexander Medvednikov e949d4b26c tools/fast: add "V lines" and "V lines/s" 2021-04-30 15:31:50 +03:00
Lukas Neubert e711e8634e
fmt: prevent rare code corruption with array pre comments (#9908) 2021-04-29 08:28:44 +03:00
Lukas Neubert dee733aae4
fmt: reset const field align after multi line exprs (#9916) 2021-04-29 02:17:37 +03:00
Lukas Neubert a065d014a2
fmt: keep constant sizes in struct field fixed array types (#9910) 2021-04-28 22:11:15 +03:00
Delyan Angelov 626517f5f7
tools: turn `v -watch` into a `v watch` sub-command, so that it can have its own options 2021-04-28 12:29:50 +03:00
Delyan Angelov e4a2d1b239
v -watch: support for VWATCH_IGNORE_EXTENSIONS 2021-04-28 09:22:37 +03:00
Delyan Angelov c44ec9cd97
v -watch: support for VWATCH_ADD_FILES 2021-04-28 09:12:07 +03:00
Delyan Angelov a0963f4d74
v -watch: support for VWATCH_CLEAR_TERMINAL 2021-04-28 09:12:06 +03:00
pancake 6750ed254f x64: rename to `native` to not conflict with the x64 comptime variable 2021-04-27 12:24:58 +03:00
Don Park aebb551e93
cgen: do full struct initialisation for V structs, fixes invalid data from `map[string]Struct{}['unknown']` (#9878) 2021-04-27 08:18:48 +03:00
Delyan Angelov cafe382424
vweb: update references to old .init_once() and .init() methods to .init_server() and .before_request() 2021-04-26 19:38:13 +03:00
Delyan Angelov bb4f0ed4a9
tools: fix vwatch.v compilation 2021-04-25 09:31:01 +03:00
Delyan Angelov 2f29e7903c
tests: cleanup obsolete skips in common.v 2021-04-23 15:31:04 +03:00
Delyan Angelov 6e589e2ae8
vdoc: fix panic on running `v doc -all -m vlib/ -f html -inline-assets` two times in a row 2021-04-21 14:33:41 +03:00
Delyan Angelov bd539b6427
vfmt: fix string interpolation formatting with multiple ',",\' and \" . 2021-04-20 20:26:06 +03:00
Lukas Neubert 0b0a5de9e5
vet: hide skipped file messages behind verbose flag (#9823) 2021-04-20 17:20:50 +03:00
Lukas Neubert 16e79bc3ca
tools: format most examples and tutorials, add them to `v test-cleancode` (#9826) 2021-04-20 17:16:35 +03:00
Lukas Neubert 4a1f75c964
fmt: split infix wrapping into smaller functions and fix a trailing space bug (#9806)
* change recursive fn calls to reduce write operations

* format files and test

* Update vtest-cleancode.v

* fix test
2021-04-19 21:56:39 +03:00
Enzo c174bfa52f
tools: add a `v bug file.v` tool to automatically report bugs on GitHub (#9746) 2021-04-19 21:40:54 +03:00
Lukas Neubert 4b230d16b3
vfmt: only print non-empty diffs (#9803) 2021-04-19 18:55:55 +03:00
spaceface 73352583e7
ci: fix all `-cstrict` warnings with gcc and clang (#9792) 2021-04-19 15:38:48 +03:00
Delyan Angelov eaf930aa8b
tools: simplify gen_vc.v 2021-04-18 08:55:27 +03:00
Delyan Angelov 5ae3b81337
cmd/tools/fast/fast.v: html encode < > in commit messages 2021-04-15 13:58:14 +03:00
Delyan Angelov b8e9f085eb
vfmt: cleanup StringInterLiteral.get_fspec_braces/1 2021-04-15 09:46:05 +03:00
Delyan Angelov f0dd2bbf6e
tests: skip deadline_test.v everywhere 2021-04-15 09:28:40 +03:00
Delyan Angelov f1549b3ee7
vfmt: make ${} more robust; require it for every interpolation that uses '...' or "..." 2021-04-15 09:28:40 +03:00
Alexander Medvednikov a18f85c8cd vweb: init_once() => init_server(); init() => before_request() 2021-04-15 06:27:24 +03:00
ka-weihe 25a9d30a70
channels: fix C warnings (#9732) 2021-04-15 01:44:39 +02:00
Delyan Angelov 56e15741b0
ci: tag deadline_test.v in the skip_with_fsanitize_memory and skip_on_windows lists 2021-04-14 20:06:05 +03:00
Delyan Angelov 3e297bced4
ci: remove some tests from skip_with_werror in `v test-self` 2021-04-14 12:47:24 +03:00
crthpl 14434cc86a
all: bare metal support (fix `-freestanding`) (#9624) 2021-04-14 07:50:50 +02:00
Ulises Jeremias Cornejo Fandos 909c9c7ee7
context: small refactor to always use Context type instead of multiple types (#9705) 2021-04-13 07:04:13 +03:00
Ulises Jeremias Cornejo Fandos 07a6f4e445
context: add a new `context` module, based on Golang's context, intended to be used in webservers (#9563) 2021-04-12 19:32:51 +03:00
Lukas Neubert b2c16ced57
parser: filter out vet space indent errors inside StringInterLiterals (#9695) 2021-04-12 16:03:22 +03:00
Lukas Neubert 9427c5f526
vdoc: fix output folder creation (#9699) 2021-04-12 15:59:40 +03:00
Delyan Angelov 19e4f5ec73
tools: implement progres bar for `v check-md .` 2021-04-12 15:51:28 +03:00
Delyan Angelov ee42dd914c
tools: make `v check-md` more strict about unformatted code samples in `failcompile` sections. 2021-04-12 15:11:57 +03:00
Delyan Angelov 85e9cf1bd3
tests: add vlib/x/json2 to vtest-cleancode.v 2021-04-11 11:34:08 +03:00
penguindark cca06fce90
encoding.utf8: remove const unicode_con_table_up_to_low table (#9672) 2021-04-11 10:28:19 +03:00
Louis Schmieder 64391efa4d
orm: add mysql support (#9630)
* add mysql to orm

* fix got to big packet error

* format sql.v

* format example

* custom sql types

* add mysql table cration

* add documentation

* format sql.v

* fix markdown

* start implementing select_expr for mysql

* remove orm.c

* format sql.v

* finish mysql expr

* remove c

* remove unessecary files

* change to c implementation

* remove c

* added str interpolation for idents

* fix string insert

* fix compilation problems

* fix gitly compilation

* fix typing mistake

* add link to orm docs
2021-04-10 17:38:27 +03:00
Lukas Neubert 46e7e27ba3
v vet: give an error for trailing whitespace (#9574) 2021-04-09 13:22:14 +03:00
Uwe Krüger 84fa1ae444
boehm-gc: support a `[keep_args_alive]` tag for C functions (#9641) 2021-04-09 13:13:49 +03:00
Ali Chraghi 9881ff8448
tests: fix option_print_errors_test.v (#9616) 2021-04-08 08:46:08 +03:00
yuyi 4f6dde4ac2
vself: handle missing v_old (#9637) 2021-04-08 06:27:56 +02:00
Lukas Neubert 790961e73a
fmt: remove duplicate worker error check (#9631) 2021-04-08 02:11:56 +02:00
Delyan Angelov cc80ee0ab4
tools: improve the default performance/behaviour of oldv 2021-04-07 12:36:14 +03:00