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

275 Commits

Author SHA1 Message Date
Alexander Medvednikov
29d6e40f29 all: vfmt (new const rule) 2021-01-24 10:54:27 +01:00
Delyan Angelov
927606dc39
tools: rename v test-compiler-full to v test-self 2021-01-19 10:41:51 +02:00
Lukas Neubert
ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
Delyan Angelov
460f32baf2
tests: add v test-all, move v test-fixed to v test-compiler-full 2021-01-17 16:11:10 +02:00
Delyan Angelov
cf93be918f
docs: update debugging information 2021-01-13 12:50:35 +02:00
Delyan Angelov
083dc23db8
gen: implement a [manualfree] tag, for functions, that want to do their own memory management 2021-01-08 16:22:27 +02:00
zakuro
1fb6710c89
build: remove v build file.v (#7695) 2020-12-31 15:24:55 +01:00
Delyan Angelov
c3e8e2ad31
help: describe wipe-cache in v help other 2020-12-30 22:10:18 +02:00
Delyan Angelov
8724749728
tools: implement v wipe-cache to ease cleaning up the cache on windows 2020-12-30 21:36:54 +02:00
Lukas Neubert
e8b5fa2134
vfmt: fix early exit when verifying multiple files; update help (#7611) 2020-12-27 14:36:59 +01:00
Stéphane Aulery
712bacab98
help: add an entry about the doctor tool in v help (#7589) 2020-12-26 22:09:58 +02:00
joe-conigliaro
23bfbf1665
cmd/pref: disable -usecache on windows & enable by default (commented) 2020-12-21 03:31:57 +11:00
Delyan Angelov
19bfd5ffb5
ci: fix building 2020-12-19 13:16:18 +02:00
Delyan Angelov
a1c81aa49d
v,gen,checker: implement -d time_checking -d time_cgening -d time_v 2020-12-19 12:36:08 +02:00
Alexander Medvednikov
a4aa9c0320 help: remove "build" 2020-12-19 10:35:32 +01:00
Lukas Neubert
a9c71a89cf
vfmt: improve the documentation for the -c flag (#7196) 2020-12-09 10:58:37 +02:00
Delyan Angelov
d5915bde7c
parser: implement support for -Wimpure-v (#7195) 2020-12-08 17:52:24 +01:00
Daniel Däschle
334d605d90
tools,vls: add v test-parser examples/hello_world.v (#7145) 2020-12-06 12:42:56 +02:00
Daniel Däschle
47d0ed308d
parser: prepare for better VLS integration, more accurate parser errors (#7119) 2020-12-04 20:34:05 +02:00
Nick Treleaven
8f15af6adc
pref: add -m32, -m64 command-line options (#7011) 2020-11-29 14:53:49 +01:00
Nick Treleaven
9772306ae9
help: list -showcc, -w (#7013) 2020-11-29 14:11:12 +01:00
Alexander Medvednikov
13948152b6 cmd/v: rename reuse-tmpc to keepc 2020-11-27 20:16:24 +01:00
Delyan Angelov
f2d59fbc0f
cmd/v: make echo ...|v same as echo ...|v run - (#6899) 2020-11-21 15:39:47 +01:00
Delyan Angelov
92d3cff957 vfmt: run vfmt over v.v, and add it to v test-cleancode too 2020-11-21 10:24:11 +02:00
Larpon
82b16cbf45
v: add shell auto-completion with source <(v complete setup bash) (#6886) 2020-11-20 16:17:31 +02:00
Nicolas Sauzede
159932d59b
v: run code from stdin echo println(2+2) | v run -, with no repl limits (#6884) 2020-11-20 10:25:59 +02:00
Delyan Angelov
4559b4138f cmd: rename test-vet to test-cleancode 2020-11-15 16:40:35 +02:00
Delyan Angelov
4b35495fbe all: support VMODULES environment variable (defaulting to ~/.vmodules) 2020-11-08 08:07:17 +02:00
Delyan Angelov
fee56b1902 v repl: improve the V REPL welcome message 2020-10-30 14:09:43 +02:00
Jabba Laci
a7e3092165
help text is nicely aligned (#6683) 2020-10-26 11:24:25 +02:00
Delyan Angelov
8b01146b90 compiler: implement -W and -reuse-tmpc 2020-10-24 20:34:50 +03:00
Delyan Angelov
23ee3018c3 tools: add v test-vet 2020-10-24 16:37:58 +03:00
Alexey
3ae3196d42
vdoc: allow to omit timestamp (#6652) 2020-10-19 21:30:37 +02:00
Delyan Angelov
62f6e65509 repl: fix reset; make echo "print(2.0 * 3.14159)" | ./v print only the result 2020-10-11 10:50:24 +03:00
Alexander Medvednikov
defa9c1d00 cmd: update flags help 2020-09-29 03:28:41 +02:00
Nick Treleaven
05dcdfd267
pref: error if unknown argument passed to v (#6487) 2020-09-29 03:13:54 +02:00
Denis
6981f2afeb
help: print errors to stderr (#6486) 2020-09-28 06:14:34 +02:00
Ned Palacios
744f685973
vdoc: document variables in a specific pos/scope; support v doc os File (#6354) 2020-09-21 17:40:39 +03:00
Delyan Angelov
79ac431e9e doctor: add first draft 2020-09-20 13:13:20 +03:00
Lukas Neubert
5c8e1c7eeb
help: remove note about v2 backend (#6364) 2020-09-14 15:33:58 +02:00
Nick Treleaven
497bf226e2
add TESTS.md file to explain different tests (#6318) 2020-09-07 13:48:15 +02:00
pancake
b5b53a5311
vpm: add 'vpm upgrade' to update all the outdated vpm modules (#6157) 2020-08-18 02:44:18 +02:00
Alexander Medvednikov
3a461e7cee vfmt: update help 2020-08-06 18:09:14 +02:00
pancake
36352085ae
v: add support for iOS crosscompilation (#5943) 2020-07-23 07:58:44 +03:00
Delyan Angelov
14fd7d93ca v.pref: fix v build file.v 2020-07-21 19:36:58 +03:00
Lukas Neubert
c93467bca5
vpm: add list command (#5888) 2020-07-20 17:39:37 +03:00
Delyan Angelov
c858978348 cgen: add support for -d trace_gen too. Add v tracev command. 2020-07-20 12:36:27 +03:00
Ryan Willis
e804ba5294
vfmt: add support for VDIFF_TOOL, detect more diffing tools (#5857) 2020-07-17 14:03:07 +03:00
Lukas Neubert
cc7c8009a1
vpm: outdated command (#5833) 2020-07-15 21:55:07 +02:00
Delyan Angelov
e23925f2be pref: add -show-timings option 2020-07-14 18:47:40 +03:00
Lukas Neubert
ee46c8075f
help: document existence of vet (#5816) 2020-07-13 16:41:47 +02:00
Alexander Medvednikov
03b76d19f1 repl: make the info message a bit smaller 2020-07-08 17:22:38 +02:00
Delyan Angelov
25771a1afe compiler: remove -keepc option (it is now always on) 2020-07-06 13:42:18 +03:00
Delyan Angelov
652380c5fd cgen: fix -printfn main 2020-07-03 17:42:59 +03:00
Ned Palacios
025652bb78
vdoc: dd .vdocignore + minor fixes 2020-06-29 11:03:09 +02:00
Alexander Medvednikov
2bfe8e5153 vet: a basic version that just checks indentation for now 2020-06-27 14:50:07 +02:00
Lukas Neubert
8652f422d4
bin2v: specify custom filename for write 2020-06-24 12:56:00 +02:00
Lukas Neubert
d4f0fe12ab
bin2v: allow direct file output 2020-06-24 00:00:37 +02:00
Ned Palacios
5ff7d07138
vdoc: fix sorting + other minor improvements 2020-06-19 10:36:45 +02:00
Lukas Neubert
eec5cf1eb1
vpm: use only -v for verbose output 2020-06-07 14:20:56 +02:00
Ned Palacios
cbcdc8434f
vdoc: group constants + minor fixes 2020-06-07 12:27:42 +02:00
Daniel Däschle
32463e94f5
vdoc: help 2020-06-06 17:41:44 +02:00
Ned Palacios
30e0bda434
vdoc: rewrite usage, add new options + streamline process 2020-06-05 09:59:26 +02:00
Daniel Däschle
d0f9bdf85e
vdoc: style and other improvements 2020-06-04 23:50:59 +02:00
Ned Palacios
b99ba21ddd
vdoc: markdown, html, json generation + lots of fixes 2020-06-02 12:10:01 +02:00
Mike 'Fuzzy' Partin
a24bf80228
cmd/v: remove -vv and -vvv from help 2020-06-01 20:15:44 +02:00
Tim Basel
7e538d7401
utils: add args to launch_tool 2020-05-28 19:40:09 +03:00
Julia K
2b27072fac
compiler: new attributes, prelude customization 2020-05-26 14:12:18 +02:00
Delyan Angelov
7585483c69 v symlink: extract to cmd/tools/vsymlink.v , use setx on windows 2020-05-26 09:30:26 +03:00
Ned Palacios
ed7ed6262f
vpm: use current folder v.mod, if no args provided in v install 2020-05-24 15:25:29 +03:00
Delyan Angelov
9d4fe88d09 compiler: support for -color/-nocolor option overrides 2020-05-20 20:34:04 +03:00
Alexander Medvednikov
81148fa2bd cmd/v: version: print only main repo hash 2020-05-16 23:52:06 +02:00
Alexander Medvednikov
8cbb9e1c1f pref: move parse_define() 2020-05-16 22:57:55 +02:00
Alexander Medvednikov
0845b2cfbe builder: skip warnings; pref: move pref creation to pref.v 2020-05-16 22:45:38 +02:00
Alexander Medvednikov
7caebc5781 doc: print available modules 2020-05-15 23:09:38 +02:00
Delyan Angelov
d830620651 compiler: restore support for --enable-globals flag, and add tests. 2020-05-14 08:43:12 +03:00
Ned Palacios
5f0ad0f562
compiler: add output mode for errors and warnings, support for -silent flag 2020-05-10 12:26:57 +03:00
Delyan Angelov
e08566d571 compiler: do not exit early, when given -o x.c or -o x.js 2020-05-08 15:31:03 +03:00
Delyan Angelov
4c320e1512 profile: support for -profile-no-inline (with it, [inline] fns will not get profiled) 2020-05-08 15:01:59 +03:00
Delyan Angelov
f9fe5b60a7 v doc: skip _x.c.v when not on x, i.e. filter files like v itself 2020-05-05 08:08:03 +03:00
Delyan Angelov
5eb71c4a13 fmt: initial support for -debug 2020-05-04 17:27:41 +03:00
yuyi
4794c6a0e7
cmd: simplify internal.help => help 2020-05-04 14:21:32 +02:00
Delyan Angelov
7038f59ca5 compiler: add back support for -live 2020-05-02 01:14:44 +03:00
Delyan Angelov
a6dfc6d46b compiler: support ctags with -print_v_files and .ctags.d/v.ctags 2020-04-30 19:45:50 +03:00
Delyan Angelov
ce1215f507 vfmt: set Preferences.is_fmt flag (bugfix) 2020-04-27 23:20:16 +03:00
Delyan Angelov
e67bf674e3 scanner: cleanup, only v.parser now depends on v.scanner 2020-04-27 16:08:04 +03:00
Alexander Medvednikov
eb8973c362 builder: module caching fixes 2020-04-27 14:46:25 +02:00
Alexander Medvednikov
f005079e0b pref: rename keep_c 2020-04-27 13:28:00 +02:00
Alexander Medvednikov
a48080afec parser: deprecate import(); replace remaining import()s 2020-04-26 07:36:02 +02:00
Delyan Angelov
4bcdf11743 cgen: support -profile - and -profile x.txt 2020-04-25 13:41:49 +03:00
Delyan Angelov
eecf92cdb0 cgen: implement -profile support. 2020-04-25 13:05:49 +03:00
Delyan Angelov
1863dda8e5 help: update help .txt files 2020-04-25 11:15:57 +03:00
Delyan Angelov
e0ab318f56 cgen: add support for v -printfn main file.v 2020-04-25 11:15:57 +03:00
Delyan Angelov
1d9d9757cf Revert "Revert "compiler: support setting pref.output_cross_c with -os cross""
This reverts commit ba85b8d024.
2020-04-23 22:46:29 +03:00
Delyan Angelov
ba85b8d024 Revert "compiler: support setting pref.output_cross_c with -os cross"
This is reverted until cmd/tools/gen_vc.v
starts passing `-os cross` again, or until
https://github.com/vlang/vc/pull/12 is merged.

This reverts commit 878be4d886.
2020-04-23 22:40:07 +03:00
Delyan Angelov
878be4d886 compiler: support setting pref.output_cross_c with -os cross 2020-04-23 20:24:42 +03:00
Delyan Angelov
adb8fb1dc6 comptime: fix custom -d flags and $if x? {}. Fixes ftp_test.v . 2020-04-23 17:52:44 +03:00
Kris Cherven
d871595437
all: replace var with mut 2020-04-23 01:16:58 +02:00
Kris Cherven
155891a4e0
parser: add unused variable warning 2020-04-22 01:52:56 +02:00
Alexander Medvednikov
c1fc768c1b fmt: run on cmd/v; cgen: fix anonymous functions 2020-04-20 07:04:31 +02:00
Tim Basel
86df486988
compiler: rename is_so to is_shared 2020-04-18 17:46:23 +02:00
Alexey
663c69305a
cmd/v: fix processing arguments 2020-04-16 19:41:24 +02:00
Delyan Angelov
cc9828b481 checker: fix building of shared .so libs 2020-04-16 16:30:19 +03:00
Abdullah Atta
6a186e8f11
jsgen: implement js backend 2020-04-15 23:16:49 +02:00
pancake
caed4aad58
v run: simplify 2020-04-15 16:17:17 +02:00
pancake
c0491285f8
v run: fix 'v run' without any other argument 2020-04-15 12:16:07 +03:00
Alexey
893d14ef8f
cmd/v: process version argument correctly 2020-04-14 18:06:59 +02:00
Delyan Angelov
99db5f53f7 repl_test.v: fix compilation (non working ones are for now renamed to .skip) 2020-04-13 11:06:52 +03:00
Delyan Angelov
c64e447749 v: fix CI 2020-04-11 10:50:59 +03:00
Delyan Angelov
95709811e0 v: support VFLAGS, fix 'v run source.v arg after source' 2020-04-11 10:28:43 +03:00
Delyan Angelov
ba799b3f85 builder: support v.mod/@VROOT, fix -cflags and -cache 2020-04-11 09:57:31 +03:00
Alexander Medvednikov
b95a47b5a7 checker: check fn main(); vfmt: fix for{}, module and module comments 2020-04-10 22:27:54 +02:00
Alexander Medvednikov
fc4a05741c cmd/v: remove debug prints 2020-04-10 18:18:50 +02:00
Alexander Medvednikov
f76931c01e cache builtin modules 2020-04-10 18:11:43 +02:00
Alexander Medvednikov
9b2511133d vfmt: lots of fixes; cmd/v: -keepc; 2020-04-10 00:30:43 +02:00
Alexander Medvednikov
f3c917e0aa fmt: fix array receivers; cmd/v: -showcc 2020-04-09 15:05:06 +02:00
Major Taylor
efeea40520
tools: 'v create' -> 'v new' 2020-04-07 19:37:15 +02:00
Alexander Medvednikov
fa5fcee584 cmd/v: fix run args 2020-04-07 03:21:32 +02:00
Alexander Medvednikov
fa4fb3b847 cmd/v: set is_run 2020-04-07 01:23:36 +02:00
Alexander Medvednikov
33644a4f91 cmd/v: fix run 2020-04-07 01:09:25 +02:00
Alexander Medvednikov
8d150d427a merge and simplify cmd/v and v.builder 2020-04-07 00:44:31 +02:00
Alexander Medvednikov
2006995020 cmd/v: remove clang-format (the generated code is pretty from the start) 2020-04-06 17:11:01 +02:00
Delyan Angelov
fde88a2c51 ci: implement 'v test-fixed' and use it on ubuntu,tcc,msvc jobs 2020-04-05 12:40:17 +03:00
lutherwenxu
4bade9bcea
cmd/v: fix argument parsing 2020-04-04 12:09:34 +02:00
Delyan Angelov
31c4b1cda6 v2: compile vfmt again; consistent colored error messages 2020-04-03 18:42:22 +03:00
yuyi
50b9faf347
doc: fix doc command error running in vroot 2020-04-03 12:00:33 +02:00
Alexander Medvednikov
16acc5f312 cmd/v: -backend 2020-04-02 18:34:55 +02:00
Alexander Medvednikov
804d303487 cgen: add () for | and ^ 2020-04-02 18:26:56 +02:00
Alexander Medvednikov
50dabc8a49 fix valgrind_test 2020-04-02 18:22:36 +02:00
Alexander Medvednikov
fd12e4e826 fix compiler_test.v 2020-04-02 18:12:10 +02:00
Alexander Medvednikov
e305757d07 cmd/v: handle -cc and -cg 2020-04-02 17:55:00 +02:00
Alexander Medvednikov
d228b3916b cmd/v: further simplifications 2020-04-02 17:46:43 +02:00
Alexander Medvednikov
40fd924b15 parser: match must be exhaustive; cmd/v: one verbosity level, simpler version 2020-04-02 16:51:16 +02:00
Alexander Medvednikov
5b835d294c more windows fixes + bring back windows ci 2020-04-02 13:44:46 +02:00
Delyan Angelov
084f853a2a
v2: enhance version with current git commit hash. Cleanup redundant code. 2020-04-02 13:31:02 +02:00
Alexander Medvednikov
d9c7253836 windows: "".to_wide() fixes 2020-04-02 13:24:23 +02:00
Alexander Medvednikov
8dfb14b1c4 remove 15k lines of code of the old backend; make V2 the default backend 2020-04-01 21:25:31 +02:00
Alexander Medvednikov
db59c621e8 v2: minor fixes 2020-03-27 08:47:02 +01:00
Alexander Medvednikov
4b36098e07 cgen: 1 error left 2020-03-20 20:35:00 +01:00
Alexander Medvednikov
5a7f683f61 cgen: minor fixes 2020-03-20 17:20:53 +01:00
Alexander Medvednikov
6b571155f4 cgen: fix print(struct); use automatic referencing 2020-03-20 17:11:58 +01:00
yuyi
2f27758a4b
os: realpath => real_path 2020-03-20 16:41:18 +01:00
Delyan Angelov
0fbb056ac7
hotreload: fix compilation of .so file on macos 2020-03-19 14:50:37 +01:00
yuyi
969765435e
v run: fix spaces in args 2020-03-19 07:22:29 +01:00
lutherwenxu
e37fed437d
cmd/v: fix -version and -v collision 2020-03-18 12:42:41 +01:00
Alexander Medvednikov
a011b8951a cgen: if/match expressions and other fixes 2020-03-18 08:41:49 +01:00
yuyi
cff6f4abd6
vself: add -prod options 2020-03-16 15:46:38 +01:00
Alexander Medvednikov
900ada1112 cgen: match: do not use a temp var; minor fixes 2020-03-16 10:53:36 +01:00
Major Taylor
c546e88577
vcreate: add init command 2020-03-15 11:20:12 +01:00
Alexey
395bb61cf3
help: keep consistent style of help messages
Use imperative mood everywhere.
End sentences with dots.
Capitalize sentences.
2020-03-14 14:20:44 +01:00