Compare commits

...

380 commits

Author SHA1 Message Date
blackshirt
ace3eb2ddb
x.crypto.chacha20: adds some missing bits into stream reset (#25321)
Some checks are pending
json encoder benchmark CI / json-encode-benchmark (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-windows (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-16 15:04:54 +03:00
Felipe Pena
95e1b7c14c
cgen,checker: fix option generic passing to T param (fix #25267) (fix #24466) (partial fix for #25227) (#25292) 2025-09-16 15:01:31 +03:00
Delyan Angelov
eed68275fa
tools,scanner: make v scan file.v output all valid tokens *before* a syntax error 2025-09-16 14:20:43 +03:00
CreeperFace
0dbbed7bde
cgen,autofree: fix method chaining generating invalid c code (fix #9094) (#25315) 2025-09-16 08:14:41 +03:00
kbkpbot
d2174e47a5
v.gen.js: simplify comptime if; catch up with cgen (fix #25295) (#25313)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-15 19:24:25 +03:00
blackshirt
89a24958a1
x.crypto.chacha20: improves the internals of chacha20, add a bench (#25311) 2025-09-15 19:20:43 +03:00
Delyan Angelov
5d98162960
builtin,cgen: fix i64 enum as a map key, when the enum values are too small (fix #25294) (#25310) 2025-09-15 19:11:07 +03:00
CreeperFace
373e5abb47
markused: fix marking of mutable generic method calls (fix #25312) (#25314) 2025-09-15 19:08:53 +03:00
kbkpbot
fa49b769e1
checker,gen: introduce if match branch's id (#25308)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-15 10:07:59 +03:00
Jorge Mireles
38ebb3fbbb
examples: fix rune casting from u32 in rune.v (#25307)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-15 01:22:52 +03:00
Eliyaan (Nopana)
5bad20dbe5
native: begin array support, a := []Type{len: x, cap: y} and a[i] read/write (#25299) 2025-09-15 01:22:07 +03:00
Delyan Angelov
9f666ad117
v.util: fix handling of "start \u005c${...} end" in cgen (fix #25304) (#25306) 2025-09-15 01:18:40 +03:00
Swastik Baranwal
0e4078f27d
scanner: uncomment working rune test (#25305)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-14 19:36:28 +03:00
kbkpbot
1000ada582
cgen,parser,markused: add export const support (fix #25300) (#25303)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-14 12:54:13 +03:00
Delyan Angelov
a2b4f08436
tools: cleanup vtest-all.v, using option values instead of comparison to <nothing>
Also allow for passing `rmfile: ['hw.linux', 'hw.linux.o']`
2025-09-14 09:21:08 +03:00
kbkpbot
e104a5f571
checker: disallow duplicate export names (fix #25301) (#25302) 2025-09-14 06:59:56 +03:00
kbkpbot
b8260625f6
vfmt: add support for 64bit int with -new_int (part 2) (#25298)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-13 16:46:57 +03:00
kbkpbot
c221b3226b
cgen,builtin: support for 64bit int 1 (#25236)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
json encoder benchmark CI / json-encode-benchmark (push) Has been cancelled
2025-09-13 10:03:52 +03:00
Felipe Pena
64343168c6
cgen: fix option variadic arg passing (fix #25261) (#25273) 2025-09-13 08:49:09 +03:00
blackshirt
50d03eb7b9
x.crypto.ascon: improve ascon_generic_hash, cleanup (#25288) 2025-09-13 07:59:16 +03:00
Larsimusrex
5d7958db7d
cgen: fix generic cast to sumtype of empty struct (fix #25263) (#25290) 2025-09-13 07:57:01 +03:00
kbkpbot
ffeff23964
cgen: fix fixed-array const initializer (fix #25291) (#25293) 2025-09-13 07:56:15 +03:00
Larsimusrex
a8d200ac0e
decoder2: improve enum decoding; fix handling of required fields at the end of a json string (#25289)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
json decoder benchmark CI / json-encode-benchmark (push) Has been cancelled
2025-09-12 10:57:15 +03:00
blackshirt
56f20d1ff8
x.crypto.ascon: small cleanups and optimization (#25284)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
Shy and PV CI / v-compiles-puzzle-vibes (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-09-11 23:36:11 +03:00
CreeperFace
04e79e7b2a
checker: prevent usage of imported module name prefix as identifier names, to avoid cgen collisions (#25280) 2025-09-11 23:33:43 +03:00
Delyan Angelov
d73ebc1aca
v.ast: add a mod field to ast.FnTypeDecl too
Some checks are pending
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-11 16:15:33 +03:00
Eliyaan (Nopana)
fd479a2bcd
native: support more assign ops, reduce code duplication (#25283) 2025-09-11 16:12:28 +03:00
Delyan Angelov
c2e2aac0c9
tests: use os.vtmp_dir() in autofree_toml.vv, so it can be cleaned up automatically; simplify the code
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-11 13:08:51 +03:00
Delyan Angelov
97145ca3a8
v.builder: support -d trace_type_symbols_after_checker 2025-09-11 12:47:58 +03:00
Eliyaan (Nopana)
b653d65676
native: structs multi_assign and multi_return (#25281) 2025-09-11 11:36:14 +03:00
blackshirt
a10c59704b
x.crypto.ascon: improve single-shot functions of ascon hashing variant; add benchmark (#25282) 2025-09-11 11:04:21 +03:00
blackshirt
f16452d3a6
x.crypto.ascon: improve the core of Ascon permutation routine (#25278) 2025-09-11 05:56:17 +03:00
Felipe Pena
919c68e6f9
comptime: fix $match with fn type (#25271)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-10 21:42:20 +03:00
Eliyaan (Nopana)
4ea05636fb
native: improve consts, support more assigns (#25277)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-10 20:22:13 +03:00
kbkpbot
177758ac53
v.eval: add more compilex comptime-cond support (#25276) 2025-09-10 20:20:55 +03:00
CreeperFace
e317c634bb
cgen: prefix builtin APIs with builtin__ (#25264) 2025-09-10 15:12:22 +03:00
blackshirt
f073169177
x.crypto: add a new ascon cryptographic module, based on https://doi.org/10.6028/NIST.SP.800-232 (Lightweight Cryptography Standards for Constrained Devices) (#25260)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-10 10:03:35 +03:00
kbkpbot
e650d6b7f0
cgen: fix big IntegerLiteral LL postfix (fix #25269) (#25275) 2025-09-10 09:45:40 +03:00
Swastik Baranwal
447994543b
cgen: allow generic alias enum comptime (fix #25249) (#25251) 2025-09-10 09:37:48 +03:00
xieke
015a85daf4
builtin: fix thread naming issue on Windows by ignoring RaiseException (0x406D1388) (#25270) 2025-09-10 09:34:45 +03:00
Delyan Angelov
01f108e349
builtin: fix v -W -Wimpure-v examples/hello_world.v (move ctovstring_impl to builtin.c.v) 2025-09-10 09:11:17 +03:00
Felipe Pena
49e77546c9
markused: fix CI (for failing compilation of vlib/v/tests/skip_unused/array_init_from_sumtype.vv) (#25274) 2025-09-10 09:00:34 +03:00
Larsimusrex
bae7684276
json2: replace encoder with new implementation (#25224)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
json decoder benchmark CI / json-encode-benchmark (push) Has been cancelled
json encoder benchmark CI / json-encode-benchmark (push) Has been cancelled
2025-09-09 18:50:22 +03:00
Delyan Angelov
69e80ba96d
builtin: add a temporary ctovstring_impl/1 API to enable ui to compile cleanly for PR#25264, part 1 2025-09-09 15:00:16 +03:00
Felipe Pena
847c15e5ac
type_resolver: fix comptimecall resolving aliased method (fix #25253, part 1) (#25254)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Has been cancelled
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-09-08 19:03:11 +03:00
xieke
af87a302fa
cgen: fix gen_struct_equality_fn null pointer crash (fix #25237) (#25231) 2025-09-08 17:32:46 +03:00
Delyan Angelov
b50327ad89
ci: update vlang/gui hash to latest b4e3716b042ee6352efedff64c5b92cbf0e81ded in compile_vlang_gui_examples.sh (remove deprecated notices for module gx on the CI) 2025-09-08 17:01:42 +03:00
Delyan Angelov
d29470534f
ci: extract .github/actions/cache-apt-packages-action/action.yml, use it in puzzle_vibes_ci.yml 2025-09-08 13:47:41 +03:00
Delyan Angelov
71d2e3f556
ci: check if awalsh128/cache-apt-pkgs-action@v1.5.3 works on master (#25257)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-09-08 11:45:55 +03:00
Delyan Angelov
619bd968be
ci: use awalsh128/cache-apt-pkgs-action@v1.5.3 instead of a manual apt update/apt install step, to leverage caching more (#25256) 2025-09-08 11:17:10 +03:00
Delyan Angelov
2c392f848b
ci: change the azure mirror URL in /etc/apt/sources.list too 2025-09-08 10:12:16 +03:00
Delyan Angelov
9158aed80a
ci: change url to http://archive.ubuntu.com in .github/workflows/disable_azure_mirror.sh 2025-09-08 10:06:11 +03:00
Felipe Pena
19ca0d0346
checker: fix multi return var passing to fn arg (potential fix for #24870) (#25250) 2025-09-08 09:36:39 +03:00
Delyan Angelov
84f68168ed
v.builder: add -DNO_DEBUGGING in addition to -DNDEBUG, when compiling with -prod
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-09-07 14:32:12 +03:00
Delyan Angelov
2b0af31bf9
ci: bump retry time from 10 to 15 minutes (reduce false positives for slow dependency installations on the CI) 2025-09-07 14:14:47 +03:00
Delyan Angelov
e89839c845
fontstash: define and use FONTSTASH_MALLOC_ATOMIC for the allocated texture and atlas nodes (which do not contain pointers) 2025-09-07 14:05:40 +03:00
Felipe Pena
6e0fd17a72
veb: fix generic field access from alias (fix #25215) (#25246)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-07 09:11:22 +03:00
Delyan Angelov
7cba3a249b
ci: retry vlib/v/eval/interpret_test.v 2 times 2025-09-07 08:49:15 +03:00
Delyan Angelov
fb95f4cc6f
ci: run input_rune_iterator_test.v only on linux for now 2025-09-07 08:46:08 +03:00
Delyan Angelov
3080b41687
net.http.file: allow for serving requests to static files with cache busting suffixes like /dist/littlejs.js?1117
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-09-06 15:59:08 +03:00
449
4665a6f4a8
veb.auth: update the README.md example (#25245)
Some checks are pending
vlib modules CI / build-module-docs (push) Waiting to run
2025-09-06 07:22:30 +03:00
Delyan Angelov
21c46f4ae5
time: move the nanosecond comparison before the rest in the Time == Time implementation
Some checks are pending
Tools CI / tools-linux (clang) (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-09-05 19:28:29 +03:00
kfont
083d3dba38
net.http: Use a full url when using a proxy, instead of only the path (#25228) 2025-09-05 19:24:59 +03:00
Delyan Angelov
08a739d793
ci: cleanup .gitattributes, runes.txt and input_rune_iterator_test.v
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-09-05 18:34:13 +03:00
Mike
1820a5584b
math.big: replace division with Knuth, improve performance (#25242) 2025-09-05 16:47:25 +03:00
Delyan Angelov
4dcf79e388 os,ci: use a conditional include, instead of a platform file, to include libproc.h on macos only 2025-09-05 12:50:30 +03:00
Delyan Angelov
35510bc659
builtin: add input_rune/0 and input_rune_iterator/0 + tests (#25238) 2025-09-05 12:39:02 +03:00
kbkpbot
cf61f4fa1b
builtin: fix C prefix for proc_pidpath() (#25239) 2025-09-05 12:23:24 +03:00
Felipe Pena
9a0166701c
cgen: add @[reused] attribute to mark methods, reusing the receiver memory on return (needed for autofree) (fix #25221) (#25235)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-05 07:44:41 +03:00
Leo Developer
2b4253caf9
time: always return utc() timezone for Time.unix/0 (fix #17784) (#25233)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-05 00:22:52 +03:00
Delyan Angelov
dbd5b5f56c
Revert "cgen: ensure variable names do not conflict with builtin methods (fix #25063) (#25178)"
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
This reverts commit f17e0fd52b.
2025-09-04 13:47:53 +03:00
kbkpbot
e15d8fcf49
checker: comptime match only eval true branch (fix #25223) (#25225) 2025-09-04 13:33:39 +03:00
CreeperFace
f17e0fd52b
cgen: ensure variable names do not conflict with builtin methods (fix #25063) (#25178) 2025-09-04 13:04:57 +03:00
Swastik Baranwal
dabc08b6ee
cgen: fix alias enum used in comptime $for (fix #25211) (#25212) 2025-09-04 12:57:25 +03:00
Delyan Angelov
8868696017
repl: fix handling of lines with comments like math.pi // comment (fix #25229) 2025-09-04 12:04:33 +03:00
Larsimusrex
682db66852
builtin, checker, cgen: expose is_embed in FieldData (#25232) 2025-09-04 11:39:24 +03:00
kbkpbot
f6b60e4d9f
parser,checker: add top level comptime support for $match @OS { too (#25222)
Some checks failed
toml CI / toml-module-pass-external-test-suites (push) Has been cancelled
Tools CI / tools-linux (gcc) (push) Has been cancelled
Tools CI / tools-linux (tcc) (push) Has been cancelled
Tools CI / tools-macos (clang) (push) Has been cancelled
vab CI / vab-compiles-v-examples (push) Has been cancelled
vlib modules CI / build-module-docs (push) Has been cancelled
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
Graphics CI / gg-regressions (push) Has been cancelled
Shy and PV CI / v-compiles-puzzle-vibes (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
sdl CI / v-compiles-sdl-examples (push) Has been cancelled
Time CI / time-linux (push) Has been cancelled
Time CI / time-macos (push) Has been cancelled
Time CI / time-windows (push) Has been cancelled
Tools CI / tools-linux (clang) (push) Has been cancelled
Tools CI / tools-windows (gcc) (push) Has been cancelled
Tools CI / tools-windows (msvc) (push) Has been cancelled
Tools CI / tools-windows (tcc) (push) Has been cancelled
Tools CI / tools-docker-ubuntu-musl (push) Has been cancelled
vab CI / v-compiles-os-android (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-09-02 20:14:27 +03:00
Felipe Pena
2e8cc75e5f
markused: cleanup the generated c code (#25210) 2025-09-02 18:48:51 +03:00
kbkpbot
840e659d08
readline: fix wide char display width for Chinese characters (fix #25219) (#25220) 2025-09-02 18:01:26 +03:00
kbkpbot
19d31f221f
parser,fmt,markused: add top level comptime $if support (enable $if platform { import module struct Abc {} }) (#25216)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-02 13:01:37 +03:00
Delyan Angelov
344f7ccdcb
examples,gg: add examples/gg/grid_of_rectangles.v; add gg.Context.draw_rect_filled_no_context/5 and gg.Context.draw_rect_empty_no_context/5
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-09-01 23:28:47 +03:00
Felipe Pena
1e0bda4ebc
checker: fix static init var (fix #25203) (#25209) 2025-09-01 21:12:04 +03:00
kbkpbot
487feb9b0e
cgen: fix hash stmt code generation (fix #25184) (#25207)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-31 20:39:02 +03:00
Swastik Baranwal
d31aaecc42
checker: add more checks for map.delete (fix #25204) (#25205)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
2025-08-31 10:21:11 +03:00
Felipe Pena
0dc4e9b46a
checker: add T.typ and T.unaliased_typ checking to $match (fix #25200) (#25202) 2025-08-31 10:17:47 +03:00
Felipe Pena
7c780ed8fa
cgen, markused, checker: fix iteration over mutable option (fix #24860) (#25199)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-30 23:40:47 +03:00
Felipe Pena
9fb8aae2d7
cgen: fix autofree used vars on return (fix #25196) (#25198) 2025-08-30 23:39:34 +03:00
Delyan Angelov
cb2756e39c
parser,checker: use keywords matcher trie for imported symbol presence checks, instead of x in p.imported_symbol (#25201) 2025-08-30 22:56:30 +03:00
kbkpbot
2ac3478296
vfmt,parser: move mark used from vfmt to parser (#25190) 2025-08-30 18:42:12 +03:00
Larsimusrex
24f91280d9
decoder2: add support for decoding utf-16 surrogates, produced by some JSON encoder implementations (Python, Java, C#) (#25193)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
json decoder benchmark CI / json-encode-benchmark (push) Has been cancelled
2025-08-30 13:02:39 +03:00
Delyan Angelov
ae8134705b
veb: fix a spurious error with Chromium, for POST requests, split into 2 parts, 1st with only http headers, without body (fix #25191) (#25195) 2025-08-30 12:56:21 +03:00
Delyan Angelov
367eb9b995
ci: retry 3 times cmd/tools/vtimeout_test.v on windows, before failing
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-08-30 02:24:16 +03:00
larpon
ce88c56446
flag: clean up flag_to_tail_bool_test.v (#25192) 2025-08-30 02:18:58 +03:00
Delyan Angelov
f6d5ef61b2
net: improve tracing output for -d trace_tcp; move error_code() calls right after the corresponding C APIs (errno is a global that should be read immediately to be valid) 2025-08-30 00:11:19 +03:00
larpon
7831fb0b82
flag: improve the fix for #25166 tail/single bool flag error in flag_to.v (#25189)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-29 19:00:06 +03:00
Felipe Pena
214628a939
markused: fix option map value (fix #25186) (#25188) 2025-08-29 15:32:57 +03:00
kbkpbot
eaf005e29f
parser: add duplicate import symbol detect (fix #25185) (#25187)
Some checks are pending
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-29 13:31:59 +03:00
Felipe Pena
07997816d9
cgen, table: fix resolving generic interface field from generic struct (fix #23556) (#25182) 2025-08-29 13:13:22 +03:00
Felipe Pena
38bfc482ba
markused: fix option array element (fix #23089) (#25179) 2025-08-29 07:53:01 +03:00
Felipe Pena
1ba45123ec
checker: fix multi return arg passing checking (fix #25167) (fix #25180) (#25177) 2025-08-29 07:43:19 +03:00
kbkpbot
9e1273ae71
v: add support for @OS, @CCOMPILER @BACKEND and @PLATFORM (#25174)
Some checks failed
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
Graphics CI / gg-regressions (push) Has been cancelled
vlib modules CI / build-module-docs (push) Has been cancelled
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
Shy and PV CI / v-compiles-puzzle-vibes (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
sdl CI / v-compiles-sdl-examples (push) Has been cancelled
Time CI / time-linux (push) Has been cancelled
Time CI / time-macos (push) Has been cancelled
Time CI / time-windows (push) Has been cancelled
toml CI / toml-module-pass-external-test-suites (push) Has been cancelled
Tools CI / tools-linux (clang) (push) Has been cancelled
Tools CI / tools-linux (gcc) (push) Has been cancelled
Tools CI / tools-linux (tcc) (push) Has been cancelled
Tools CI / tools-macos (clang) (push) Has been cancelled
Tools CI / tools-windows (gcc) (push) Has been cancelled
Tools CI / tools-windows (msvc) (push) Has been cancelled
Tools CI / tools-windows (tcc) (push) Has been cancelled
Tools CI / tools-docker-ubuntu-musl (push) Has been cancelled
vab CI / vab-compiles-v-examples (push) Has been cancelled
vab CI / v-compiles-os-android (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
2025-08-28 00:39:41 +03:00
Delyan Angelov
efe611ed99
ci: run .github/workflows/disable_azure_mirror.sh before all apt update commands, in ci/linux_ci.vsh, when run in a github CI runner
Some checks failed
vlib modules CI / build-module-docs (push) Has been cancelled
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
sdl CI / v-compiles-sdl-examples (push) Has been cancelled
Graphics CI / gg-regressions (push) Has been cancelled
Shy and PV CI / v-compiles-puzzle-vibes (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Tools CI / tools-linux (tcc) (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
Time CI / time-linux (push) Has been cancelled
Time CI / time-macos (push) Has been cancelled
Time CI / time-windows (push) Has been cancelled
toml CI / toml-module-pass-external-test-suites (push) Has been cancelled
Tools CI / tools-linux (clang) (push) Has been cancelled
Tools CI / tools-linux (gcc) (push) Has been cancelled
Tools CI / tools-macos (clang) (push) Has been cancelled
Tools CI / tools-windows (gcc) (push) Has been cancelled
Tools CI / tools-windows (msvc) (push) Has been cancelled
Tools CI / tools-windows (tcc) (push) Has been cancelled
Tools CI / tools-docker-ubuntu-musl (push) Has been cancelled
vab CI / vab-compiles-v-examples (push) Has been cancelled
vab CI / v-compiles-os-android (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-08-26 18:37:28 +03:00
Delyan Angelov
eb9fce090e os,sync: enable running v -cross -o x.c cmd/v on windows too (part 1, fix V errors) 2025-08-26 18:09:53 +03:00
Delyan Angelov
e96355aca5
os: eliminate warning for v -cross -o vc/v.c cmd/v on linux (part 2, see also 037a3b4) 2025-08-26 17:38:02 +03:00
Delyan Angelov
037a3b4a00
parser: prepare for eliminating a warning for v -cross -o vc/v.c cmd/v (part 1) (reduce CI annotation noise) 2025-08-26 16:35:25 +03:00
Delyan Angelov
d5ff13335f
checker: relax the "unreachable code after a @[noreturn] call" error to a warning to reduce prototyping friction (#25173) 2025-08-26 14:27:30 +03:00
Delyan Angelov
8e9f2880a0
native: reduce the verboseness of unsupported size ... for global messages, for v -b native examples/hello_world.v 2025-08-26 13:41:02 +03:00
larpon
d5d392a2e5
flag: fix tail/single bool flag error condition logic in flag_to.v (fix #25166) (#25172)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
2025-08-26 13:22:12 +03:00
kbkpbot
8ec8eb604f
checker: nil check for c.table.cur_fn in gen_branch_context_string() (fix #25170) (#25171) 2025-08-26 13:19:13 +03:00
Mike
38519eca27
math.big: remove Newton-raphson division, remove related tests (#25168)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-26 04:06:07 +03:00
kbkpbot
603cd90337
checker,cgen: add comptime match support (#25165) 2025-08-25 21:58:30 +03:00
CreeperFace
70f694f72e
cgen: fix generic_fn_name generating incorrect names for C structs (#25164) 2025-08-25 21:39:42 +03:00
Alexander Medvednikov
3b25f1e101 vls: go to definition
Some checks failed
vlib modules CI / build-module-docs (push) Has been cancelled
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
sdl CI / v-compiles-sdl-examples (push) Has been cancelled
vab CI / vab-compiles-v-examples (push) Has been cancelled
Graphics CI / gg-regressions (push) Has been cancelled
Shy and PV CI / v-compiles-puzzle-vibes (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
Time CI / time-linux (push) Has been cancelled
Time CI / time-macos (push) Has been cancelled
Time CI / time-windows (push) Has been cancelled
toml CI / toml-module-pass-external-test-suites (push) Has been cancelled
Tools CI / tools-linux (clang) (push) Has been cancelled
Tools CI / tools-linux (gcc) (push) Has been cancelled
Tools CI / tools-linux (tcc) (push) Has been cancelled
Tools CI / tools-macos (clang) (push) Has been cancelled
Tools CI / tools-windows (gcc) (push) Has been cancelled
Tools CI / tools-windows (msvc) (push) Has been cancelled
Tools CI / tools-windows (tcc) (push) Has been cancelled
Tools CI / tools-docker-ubuntu-musl (push) Has been cancelled
vab CI / v-compiles-os-android (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-08-24 12:21:39 +03:00
Krchi
000b4169d6
fmt: fix comment line number in file with crlf line separator (fix #23524) (#25163) 2025-08-24 10:49:10 +03:00
kbkpbot
be31491834
checker,cgen: evaluate comptime if results in checker only (with fixed -cross compilation) (#25162) 2025-08-24 09:45:04 +03:00
Delyan Angelov
2124452947
Revert "checker,cgen: evaluate comptime $if results in checker *only* (fix #25123) (fix #25156) (#25150)"
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
This reverts commit a3f86eed1b.
2025-08-24 01:48:16 +03:00
Delyan Angelov
cee72f71a5
os: remove unknown host OS panic from os.get_host_os() 2025-08-24 00:43:48 +03:00
Krchi
42ae1b3080
fmt: fix call expr with single line comment in or expr (fix #24659) (#25159) 2025-08-23 23:49:47 +03:00
Felipe Pena
42777f0125
cgen, markused: fix veb alias type identification and generic CastExpr (fix #24895) (#25155) 2025-08-23 23:44:05 +03:00
kbkpbot
a3f86eed1b
checker,cgen: evaluate comptime $if results in checker *only* (fix #25123) (fix #25156) (#25150) 2025-08-23 23:40:50 +03:00
Felipe Pena
7dd91ecef7
cgen: fix assigning fn address (fix #24537) (#25158) 2025-08-23 22:57:30 +03:00
Delyan Angelov
8bb7f3dd75
examples: add euler.v 2025-08-23 13:50:45 +03:00
Felipe Pena
4e4d4706e8
cgen: fix autofree with option array (fix #25124) (#25149)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-23 10:02:38 +03:00
Delyan Angelov
83385a8bf8
cgen: fix generated str method for enums that have C values (use ifs, instead of switch) (fix #25135) (#25157) 2025-08-23 09:45:25 +03:00
Delyan Angelov
a40e86ad7c
readme: add ./v symlink to the Termux section 2025-08-23 07:15:29 +03:00
Mike
d8d125b056
math.big: restore and refactor str() and integer_from_string() (#25154)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-windows (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-08-22 21:13:56 +03:00
CreeperFace
752eb5cf8c
cgen: fix eq for anon C structs (#25152)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-08-22 11:57:52 +03:00
dependabot[bot]
d40eb8c59d
ci: bump actions/setup-java from 4 to 5 (#25153) 2025-08-22 11:52:06 +03:00
Delyan Angelov
1ddfd78a20
readme: add pkg update command to the Termux instructions (discovered to be needed by tcn)
Some checks are pending
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-08-21 17:15:25 +03:00
Delyan Angelov
4368af7a9c
ci: bump timeout-minutes to 15 in termux_ci.yml 2025-08-21 11:30:52 +03:00
kbkpbot
2e23f2a18b
checker: ensure the defer behavior matches that of cgen (fix #25148) (#25146)
Some checks failed
Graphics CI / gg-regressions (push) Has been cancelled
vlib modules CI / build-module-docs (push) Has been cancelled
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
Shy and PV CI / v-compiles-puzzle-vibes (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
sdl CI / v-compiles-sdl-examples (push) Has been cancelled
Time CI / time-linux (push) Has been cancelled
Time CI / time-macos (push) Has been cancelled
Time CI / time-windows (push) Has been cancelled
toml CI / toml-module-pass-external-test-suites (push) Has been cancelled
Tools CI / tools-linux (clang) (push) Has been cancelled
Tools CI / tools-linux (gcc) (push) Has been cancelled
Tools CI / tools-linux (tcc) (push) Has been cancelled
Tools CI / tools-macos (clang) (push) Has been cancelled
Tools CI / tools-windows (gcc) (push) Has been cancelled
Tools CI / tools-windows (msvc) (push) Has been cancelled
Tools CI / tools-windows (tcc) (push) Has been cancelled
Tools CI / tools-docker-ubuntu-musl (push) Has been cancelled
vab CI / vab-compiles-v-examples (push) Has been cancelled
vab CI / v-compiles-os-android (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-08-21 10:27:30 +03:00
Delyan Angelov
9a93e82239
ci: add a disable_azure_mirror.sh script, and use it before apt update to reduce the recent timeouts during installing dependencies (#25147)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-08-20 22:49:47 +03:00
Delyan Angelov
a8e0c9efff
strconv: produce a maximum of 8 digits after the . for f32.str() (fix #25141) (#25144) 2025-08-20 22:41:25 +03:00
Felipe Pena
aa7de61e44
checker: fix checking return type call disregarding unwrapping (fix #25140) (#25143) 2025-08-20 22:39:38 +03:00
Felipe Pena
98ca0f075e
parser: fix interface method declaration with fixed array return type (fix #25137) (#25145) 2025-08-20 20:52:10 +03:00
Mike
b3073b96b5
math.big: optimize subtract_digit_array() (#25142)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-08-20 18:08:25 +03:00
Mike
b502d52280
math.big: optimize add_digit_array() (#25139)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-08-20 08:01:48 +03:00
Mike
4c4028a84b
math.big: refactor add_digit_array() (#25138)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-20 02:19:18 +03:00
Krchi
b99c3826ce
checker: fix sql insert expr propagate result (fix #24833) (#25136) 2025-08-19 20:20:24 +03:00
Delyan Angelov
0957e26c88
tests: allow for VAUTOFIX=1 ./vlib/v/slow_tests/repl/repl_test.v, describe repl_test.v in TESTS.md
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
2025-08-19 17:55:11 +03:00
kbkpbot
a8187442b3
builtin: add arr.pop_left() func (#25133) 2025-08-19 14:37:18 +03:00
Krchi
b85782b7e7
checker: add error for struct not init (fix #24893) (#25134) 2025-08-19 14:34:50 +03:00
Krchi
c68e37e3e5
cgen: fix address of call with cast(&(arr.last() as Type)) (fix #23528) (#25132)
Some checks failed
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
sdl CI / v-compiles-sdl-examples (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
Graphics CI / gg-regressions (push) Has been cancelled
vlib modules CI / build-module-docs (push) Has been cancelled
Shy and PV CI / v-compiles-puzzle-vibes (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
Time CI / time-linux (push) Has been cancelled
Time CI / time-macos (push) Has been cancelled
Time CI / time-windows (push) Has been cancelled
toml CI / toml-module-pass-external-test-suites (push) Has been cancelled
Tools CI / tools-linux (clang) (push) Has been cancelled
Tools CI / tools-linux (gcc) (push) Has been cancelled
Tools CI / tools-linux (tcc) (push) Has been cancelled
Tools CI / tools-macos (clang) (push) Has been cancelled
Tools CI / tools-windows (gcc) (push) Has been cancelled
Tools CI / tools-windows (msvc) (push) Has been cancelled
Tools CI / tools-windows (tcc) (push) Has been cancelled
Tools CI / tools-docker-ubuntu-musl (push) Has been cancelled
vab CI / vab-compiles-v-examples (push) Has been cancelled
vab CI / v-compiles-os-android (push) Has been cancelled
Co-authored-by: krchi <krchi@outlook.com>
2025-08-18 17:34:46 +03:00
Felipe Pena
5566df56f1
cgen: fix generic return assign to ComptimeSelector (fix #25125) (#25131) 2025-08-18 16:38:13 +03:00
Felipe Pena
9f910643ed
orm: fix sub_structs (fix #25104) (#25105)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-08-17 23:46:10 +03:00
Delyan Angelov
54f7c36aca
ci: reduce timeout-minutes for CI jobs that are normally fast to help detect anomalies earlier (#25129) 2025-08-17 22:37:34 +03:00
kbkpbot
f55c2956fb
checker: rewrite comptime_if_cond() to support comptime if cond evaluate (fix #24938) (fix #25099) (#25122) 2025-08-17 20:49:40 +03:00
Felipe Pena
4a4434ae4a
checker: fix missing check for empty array to generic param (fix #25056) (#25118) 2025-08-17 20:44:36 +03:00
Mike
51630f1795
math.big: fix bytes() if bit_len is divisible by 60, add tests (#25126) 2025-08-17 19:25:15 +03:00
Delyan Angelov
a534a9fd5c
ci: define TERMUX_VERSION in .github/workflows/termux_ci.yml instead of using -os termux, to make the emulation closer to a real Termux (#25128)
Some checks are pending
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-08-17 14:46:55 +03:00
Felipe Pena
4f8a3dafb3
checker: fix missing check for struct generic init from call (fix #25084) (#25119)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-17 02:17:56 +03:00
Felipe Pena
460b48a33e
checker: fix missing map float key duplicated checking (fix #25098) (#25117) 2025-08-17 02:05:02 +03:00
kbkpbot
74ae8870e8
cgen: fix mutable sumtype (fix #25108) (#25111) 2025-08-17 01:48:09 +03:00
Mike
5a87e8cf20
math.big: fix integer_from_int(min_int) edge case, add tests (#25120) 2025-08-17 01:45:47 +03:00
Delyan Angelov
a88df91938
net.http: reduce the false positives on the CI for server_test.v, let test_host_header_sent_to_server return early, when the server can not start
Some checks are pending
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-08-16 11:53:44 +03:00
Felipe Pena
804c4362c1
resolver: fix generic selector field type resolver (fix #24570) (#25112) 2025-08-16 11:40:34 +03:00
Alexander Medvednikov
d51277e2fc vls: autocomplete for function signatures
Some checks failed
Tools CI / tools-macos (clang) (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-08-15 19:01:00 +03:00
Krchi
63997d6e43
checker: fix array init with interface (fix #24255) (#25073)
Some checks are pending
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
2025-08-15 08:06:01 +03:00
Delyan Angelov
77f8c88ccf
os: simplify file.c.v using cross platform f.seek/2 calls, add EINTR handling to f.write_full_buffer/2 (fix #25107) (#25110) 2025-08-15 08:02:34 +03:00
Eliyaan (Nopana)
bbb61ab368
gg, gx: deprecate gx and replace all occurences with gg (which now contains all the functionality of gx) (#24966)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-08-14 19:53:56 +03:00
Delyan Angelov
64ad7c73e8
ci: add a build_on_ubuntu_25_ci.yml script, for testing bootstrapping with GCC 14.2.0 (#25109) 2025-08-14 19:52:48 +03:00
Delyan Angelov
697cfa701f
ast: allow using aliased types in interface method implementations (provide backwards compatibility to ui, during the migration of code from gx to gg) (#25106) 2025-08-14 17:11:53 +03:00
kbkpbot
a1b131c99a
math.big: move from u32 to u60 digits (#25018)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
2025-08-14 09:59:35 +03:00
Alexander Medvednikov
db661204d9 vls: autocomplete for module functions: e.g. os. ...
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-14 05:55:14 +03:00
Delyan Angelov
71d32ea6ad
ci: fix dependencies for modules with examples (libasound2-dev is needed for sokol.audio on Ubuntu) (#25102)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
2025-08-13 22:30:23 +03:00
Delyan Angelov
cdbedc43cb
ci: use ./v doc -m -f html -unsafe-run-examples -time vlib/ for module doc generation 2025-08-13 21:05:57 +03:00
Delyan Angelov
bd408289d5
vdoc: enable example lines that have explicit imports too, fixup the remaining vlib examples, so v doc -v -unsafe-run-examples -f none vlib/ could be added to the CI 2025-08-13 21:02:14 +03:00
Delyan Angelov
c83cc174a4
ci: use v build-tools without flags for the tools-windows job 2025-08-13 20:16:22 +03:00
Delyan Angelov
c27d865377
ci: retry 3 times vdoc_file_test.v 2025-08-13 20:14:30 +03:00
Delyan Angelov
e88ac77a01
semver: fix doc comment examples 2025-08-13 18:16:57 +03:00
Delyan Angelov
044c52b625
readline: fix doc comment example by removing it 2025-08-13 18:03:10 +03:00
Delyan Angelov
21afd13d50
math: fix doc comment examples 2025-08-13 18:00:18 +03:00
Delyan Angelov
7d08554c3c
encoding.base64: fix doc comment examples 2025-08-13 17:59:09 +03:00
Delyan Angelov
cf2bff504d
sokol.audio: fix doc comment examples 2025-08-13 17:54:45 +03:00
Delyan Angelov
50e2d0344f
compress.deflate,compress.gzip,compress.zlib,compress.zstd: fix v doc -unsafe-run-examples -f none vlib/compress/ too 2025-08-13 17:43:33 +03:00
Delyan Angelov
33602047bc
arrays: fix v doc -unsafe-run-examples -f none vlib/arrays/ too 2025-08-13 17:28:59 +03:00
Delyan Angelov
9771491c94
arrays.parallel: fix v doc -unsafe-run-examples -f none vlib/arrays/parallel/ too 2025-08-13 17:23:44 +03:00
Delyan Angelov
c96f0b63f2
bitfield: fix v doc -unsafe-run-examples -f none vlib/bitfield/ too 2025-08-13 17:19:07 +03:00
Delyan Angelov
15f0f8a481
vdoc: support v doc -check-examples -f none vlib/builtin 2025-08-13 16:49:33 +03:00
Delyan Angelov
5058fd7b79
vdoc: improve failed example report 2025-08-13 16:37:24 +03:00
Delyan Angelov
2e3f0b27f0
builtin,vdoc: make v doc -unsafe-run-examples -time -f ansi vlib/builtin/ pass too 2025-08-13 16:28:37 +03:00
Delyan Angelov
82cd81e963
builtin,vdoc: fix the examples for the builtin methods, so that v doc -check-examples -time -f ansi vlib/builtin/ pass 2025-08-13 16:22:47 +03:00
Delyan Angelov
89c470bbba
ci: run VAUTOFIX=1 v test cmd/tools/vdoc to update cmd/tools/vdoc/testdata/run_examples_bad/main.comments.out 2025-08-13 15:25:08 +03:00
Delyan Angelov
6538b624e1
vdoc: implement -unsafe-run-examples and -check-examples support, add tests and document them 2025-08-13 14:26:04 +03:00
Delyan Angelov
ab80c767bd
vdoc: extract vdoc_run_examples_test.v from vdoc_file_test.v
Some checks are pending
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-08-13 13:03:01 +03:00
Delyan Angelov
e33dcabcc1
vdoc: make -run-examples compatible with all output modes, not just the plaintext one 2025-08-13 12:57:25 +03:00
Delyan Angelov
ef347e79f4
tests: improve failure output of vlib/v/eval/interpret_test.v, and make it support VAUTOFIX=1 2025-08-13 11:45:30 +03:00
Felipe Pena
9fcca599a5
cgen: fix codegen for generic struct field array option (fix #25093) (#25097) 2025-08-13 09:11:01 +03:00
Swastik Baranwal
e5100a8f73
cgen: allow alias sumtype smartcasting (fix #25085) (#25096)
Some checks failed
Periodic CI / periodic-network (clang, macos-13) (push) Has been cancelled
Periodic CI / periodic-network (msvc, windows-latest) (push) Has been cancelled
Periodic CI / periodic-network (tcc, ubuntu-latest) (push) Has been cancelled
Symlink CI / symlink-unix (macos-13) (push) Has been cancelled
Symlink CI / symlink-unix (ubuntu-24.04) (push) Has been cancelled
Symlink CI / symlink-windows () (push) Has been cancelled
Symlink CI / symlink-windows (-githubci) (push) Has been cancelled
VPM CI / setup-vpm (macos-latest) (push) Has been cancelled
VPM CI / setup-vpm (ubuntu-latest) (push) Has been cancelled
VPM CI / setup-vpm (windows-latest) (push) Has been cancelled
VPM CI / test-vpm (gcc, windows-latest) (push) Has been cancelled
VPM CI / test-vpm (msvc, windows-latest) (push) Has been cancelled
VPM CI / test-vpm (clang, macos-latest) (push) Has been cancelled
VPM CI / test-vpm (clang, ubuntu-latest) (push) Has been cancelled
VPM CI / test-vpm (gcc, ubuntu-latest) (push) Has been cancelled
VPM CI / test-vpm (tcc, ubuntu-latest) (push) Has been cancelled
VPM CI / test-vpm (tcc, windows-latest) (push) Has been cancelled
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-08-12 19:31:34 +03:00
dependabot[bot]
b7cd854ed0
ci: bump actions/checkout from 4 to 5 (#25095) 2025-08-12 18:54:24 +03:00
Delyan Angelov
70f51a199f
ci: update vlang/gui commit its latest e5cc33fe816fef33d718cb1b91f66d6bd38fb4a4 2025-08-12 18:52:13 +03:00
Delyan Angelov
7d67e22b97
ci: update hash_validation_tests to slower_tests in more_extensive_but_slower_tests_ci.yml, after the repo name change
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-08-12 11:42:14 +03:00
Delyan Angelov
f0bfee2911
ci: use retry.sh for the pkg install in termux_ci.yml to reduce false positives. 2025-08-12 11:31:52 +03:00
kbkpbot
d5458b58eb
ast: return cached_name.clone(), as auto_str_methods free it (#25088) 2025-08-12 10:21:12 +03:00
Felipe Pena
ec29f43a4d
cgen: fix alias to sumtype cast initialization (fix #25086) (#25091) 2025-08-12 10:18:56 +03:00
Alexander Medvednikov
9391b7c234 vls: improve and simplify autocomplete; remove the scanner hack
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-12 01:37:49 +03:00
Delyan Angelov
963e3e8ae2
builtin: small cleanup and merging of several small files into vlib/builtin/chan_option_result.v (#25089)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-11 13:46:46 +03:00
kbkpbot
350747793b
math.bits: add asm implementations for some 64 bit ops (#25020) 2025-08-11 09:01:49 +03:00
Delyan Angelov
60108cdd33
ci: bump retry count for server_test.v to 5 (reduce false positives on windows)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-10 14:06:01 +03:00
Felipe Pena
15e0802e88
cgen: fix codegen for option void fn return block unwrap (fix #25074) (#25082) 2025-08-10 14:03:04 +03:00
Felipe Pena
36ca628c59
cgen: fix codegen for passing int from selector to voidptr expect arg (fix #25081) (#25083) 2025-08-10 14:01:16 +03:00
kbkpbot
7b77f2ee5b
cgen: fix translated file fixed-array assignment (#25080)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-10 13:31:44 +03:00
Alexander Medvednikov
652881c73b all: vls mode fixes and improvements; v -json-errors flag 2025-08-10 06:45:59 +03:00
Larsimusrex
a11de7263f
decoder2: improve checker with better EOF detection (#25075)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
json decoder benchmark CI / json-encode-benchmark (push) Has been cancelled
json encoder benchmark CI / json-encode-benchmark (push) Has been cancelled
2025-08-09 16:38:58 +03:00
larpon
9140c9f844
thirdparty: add thirdparty-linux-armv7_bdwgc.sh for building libgc.a on ARMv7 CPUs (#25077) 2025-08-09 14:43:55 +03:00
kbkpbot
5eebd91425
parser: fix asm modifier parsing (allow for =r, =&r, +r, +&r,=m,=rm,=@ccl, =*r) (fix #25070) (#25072)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-09 10:29:05 +03:00
kbkpbot
4e8b24694b
cgen: fix asm stmt separators (#25067) 2025-08-09 10:14:06 +03:00
tzSharing
a2f65c6977
gg: improve drawing effect and logic of draw_rounded_rect_empty (#25062)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-08-08 09:01:06 +03:00
gechandesu
1f9fd73d0d
ci: add a release build for Linux on arm64 to release_ci.yml (#25064) 2025-08-08 08:18:35 +03:00
kbkpbot
8a7949d90a
parser: fix overriding of fn names in -translated mode (fix #25024) (#25061)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-08-07 19:33:12 +03:00
Krchi
3a6b651fa4
checker: fix calls with result propagation, using other consts, in const declaration expressions (fix #21609) (#25060) 2025-08-07 17:22:31 +03:00
Delyan Angelov
3b561d590d
cgen: use #if defined __BIONIC_AVAILABILITY_GUARD && ... to be compatible with more Termux versions 2025-08-07 12:29:13 +03:00
Delyan Angelov
91889953ed
ci: add experimental support for building V and testing on a Termux docker container (#25059)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-08-07 11:37:25 +03:00
Delyan Angelov
2cdacb8c00
cgen: fix building on Termux after fa904c4 2025-08-07 10:00:16 +03:00
Felipe Pena
afc710e024
markused: fix array append c code dependency (fix #25057) (#25058) 2025-08-07 06:32:52 +03:00
Krchi
106da40135
scanner: refactor string interpolation (fix #24198) (#25053) 2025-08-07 01:06:33 +03:00
Felipe Pena
9fef7ca224
cgen: fix anon fn checking adding unresolved generic type on codegen (fix #25050) (#25055) 2025-08-06 23:10:06 +03:00
Felipe Pena
cd7e9a1268
markused: fix thread type mark by go/spawn expr (fix #25049) (#25054) 2025-08-06 23:07:44 +03:00
Delyan Angelov
c3dc07520e
v.help: document the -is_o option (in v help build-c) and add a test for it (#25052)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-06 14:31:13 +03:00
Delyan Angelov
5413a25062
checker: allow for v -is_o -o x mm.v, where mm.v starts with module abc (i.e. not just module main)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-08-06 09:58:29 +03:00
dependabot[bot]
c74c9e4d8d
ci: bump actions/download-artifact from 4 to 5 (#25051) 2025-08-06 06:57:30 +03:00
Mike
cbb14e13e1
checker: add comptime support for s390x, ppc64le and loongarch64 platforms (#25048)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-08-05 23:16:21 +03:00
Mike
ad9617d358
cgen, ci: fix closures on s390x, ppc64le, loongarch64 platforms, add test to s390x CI (#25047) 2025-08-05 23:09:01 +03:00
Felipe Pena
1d7b5070bd
markused: cleanup and minor optmizations (#25046) 2025-08-05 21:37:59 +03:00
Felipe Pena
af89eb27c7
checker: cleanup err removal (#25043)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-05 21:16:22 +03:00
Delyan Angelov
5c5566eca4
cgen: add a test for builtin_init being present (part 2 of 4a6941a) 2025-08-05 16:22:56 +03:00
Delyan Angelov
4a6941af6c
markused, builtin: apply @[markused] to builtin_init, remove its heuristic from markused.v 2025-08-05 16:04:14 +03:00
Felipe Pena
21d9a5ded5
parser,checker,cgen: remove unused err declaration or or { } blocks (#25034)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
json decoder benchmark CI / json-encode-benchmark (push) Has been cancelled
json encoder benchmark CI / json-encode-benchmark (push) Has been cancelled
2025-08-05 10:48:17 +03:00
Larsimusrex
c5b6d2a1c6
decoder2: prepare for moving into json2 (#25039) 2025-08-05 10:07:03 +03:00
D4MI4NX
13ba08fba2
db.sqlite: fix get_text trimming data after (including) first 0 character (#25040) 2025-08-05 08:54:48 +03:00
Delyan Angelov
8cd7a4f136
ci: use v -g self in windows_ci.yml, before running tests, to get more usable backtraces on compilation crashes in PRs
Some checks failed
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-08-04 19:17:25 +03:00
Delyan Angelov
094ef857b1
v.parser: reduce calls to util.contains_capital
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
2025-08-04 11:09:25 +03:00
Felipe Pena
b74e60b5a2
cgen,markused: remove unused enum declarations too (#25033) 2025-08-04 08:44:21 +03:00
Felipe Pena
3b7ada1621
checker: cleanup - remove unused c.using_new_err_struct (#25036) 2025-08-04 08:40:19 +03:00
Swastik Baranwal
1569a821cd
orm: support lowercase operators like, in, not in etc (fix #25032) (#25035) 2025-08-04 08:27:44 +03:00
Larsimusrex
d249bfb04e
decoder2: fix remaining json2 discrepancies (#25029)
Some checks failed
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
json decoder benchmark CI / json-encode-benchmark (push) Has been cancelled
Graphics CI / gg-regressions (push) Has been cancelled
vlib modules CI / build-module-docs (push) Has been cancelled
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
Shy and PV CI / v-compiles-puzzle-vibes (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
sdl CI / v-compiles-sdl-examples (push) Has been cancelled
Time CI / time-linux (push) Has been cancelled
Time CI / time-macos (push) Has been cancelled
Time CI / time-windows (push) Has been cancelled
toml CI / toml-module-pass-external-test-suites (push) Has been cancelled
Tools CI / tools-linux (clang) (push) Has been cancelled
Tools CI / tools-linux (gcc) (push) Has been cancelled
Tools CI / tools-linux (tcc) (push) Has been cancelled
Tools CI / tools-macos (clang) (push) Has been cancelled
Tools CI / tools-windows (gcc) (push) Has been cancelled
Tools CI / tools-windows (msvc) (push) Has been cancelled
Tools CI / tools-windows (tcc) (push) Has been cancelled
Tools CI / tools-docker-ubuntu-musl (push) Has been cancelled
vab CI / vab-compiles-v-examples (push) Has been cancelled
vab CI / v-compiles-os-android (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
2025-08-03 10:27:43 +03:00
Felipe Pena
195f1612f8
markused: fix option tracking on sumtype (fix #25025) (#25028) 2025-08-03 10:12:32 +03:00
Felipe Pena
07ce904431
markused: improve array tracking (range, gated) (#25023) 2025-08-03 10:10:21 +03:00
D4MI4NX
51552c7b16
net.http: remove debug println statement from post_multipart_form (#25030) 2025-08-03 10:04:49 +03:00
Larsimusrex
809e617501
decoder2: support custom decoders (#25021)
Some checks failed
json decoder benchmark CI / json-encode-benchmark (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
json encoder benchmark CI / json-encode-benchmark (push) Has been cancelled
2025-08-02 14:07:29 +03:00
Delyan Angelov
b628626923
builtin: fix assert "ä ö å æ ã ø ô é ë".title() == "Ä Ö Å Æ Ã Ø Ô É Ë" (fix #25017) (#25026) 2025-08-02 14:03:28 +03:00
Felipe Pena
198ecd09bc
markused: fix generic map index (fix #25012) (#25022)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-08-02 10:26:53 +03:00
Felipe Pena
f834855cb5
markused: improve array resources tracking + remove all_fns loop for orm (#25007)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
2025-08-01 21:15:55 +03:00
xieke
a1a94a67fc
sokol.gfx: set the missed array_count field too in the set_vert_uniform and set_frag_uniform APIs (#25019) 2025-08-01 20:57:31 +03:00
Delyan Angelov
f38ca9b825
tools: fix vdoc tests after the vlang/markdown -> html <h2 id="title-topic">Title Topic</h2> change 2025-08-01 20:48:26 +03:00
Delyan Angelov
d1696104c9
tools: use Copying instead of Generating for the static resources in ./v doc -m -f html vlib/
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-08-01 18:47:49 +03:00
Delyan Angelov
2a9d1b204b
tools: improve the output of ./v doc -m -f html vlib/ 2025-08-01 18:44:40 +03:00
Delyan Angelov
ca620f4965
builtin: fix warnings for ./v doc -m -f html vlib/builtin/ 2025-08-01 18:27:46 +03:00
Delyan Angelov
2c7b42030a
ci: improve the alignment of the results of file size comparisons in compare_pr_to_master.v 2025-08-01 16:23:19 +03:00
Delyan Angelov
019fc8e7c8
ci: compare the sizes of small programs like hello_world.v, but generated with -cc gcc too 2025-08-01 16:09:02 +03:00
Delyan Angelov
e7bf4f2475
ci: make sure to always compare with the latest commit on the main V repo's master branch, when running .github/workflows/compare_pr_to_master.v 2025-08-01 16:02:14 +03:00
Delyan Angelov
f604b38cf8 ci: trigger updates to the module docs, even if just only the static files for the doc generator are changed 2025-08-01 11:50:10 +03:00
Delyan Angelov
35e925a2f1
vdoc: fix overlapping fn titles on mobile browsers in portrait mode
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
json decoder benchmark CI / json-encode-benchmark (push) Has been cancelled
Code CI vlib modules / lint-module-docs (push) Has been cancelled
2025-08-01 11:11:06 +03:00
Larsimusrex
f03d800800
decoder2: fix number decoding and improve errors (#25015) 2025-08-01 06:56:39 +03:00
Eliyaan (Nopana)
c49b9da04e
native: add support for (elf) globals (#25016) 2025-08-01 06:38:49 +03:00
Delyan Angelov
5ec3cc17e1
markused: improve the tracking of used closures (#25009)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-07-31 20:41:43 +03:00
Krchi
ac00d441ad
cgen: fix generic key's type with in operation (fix #24983) (#25011) 2025-07-31 20:09:00 +03:00
Delyan Angelov
af0a73f04f
ci: fix the performance-compare-with-master job, when run on PRs (#25014) 2025-07-31 19:29:04 +03:00
Delyan Angelov
6da1923884
ci,tools: implement support for VREPEAT_SILENT=1 and v repeat -S, to only show the summary of the runs, without the progress lines
Some checks are pending
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-07-31 12:29:06 +03:00
Delyan Angelov
5a4dbf19d0
tools: fix return"" in vdoc html output (fix #24979)
Some checks are pending
vlib modules CI / build-module-docs (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-07-31 10:33:35 +03:00
Delyan Angelov
10f737e1df
ci: add a performance-compare-with-master job 2025-07-31 09:05:07 +03:00
Delyan Angelov
8eba7b2bf5
Revert "markused: clean up features tracking from checker - remove 1 all_fns loop (#24999)"
This reverts commit 844b7007a7.
2025-07-31 08:32:33 +03:00
Felipe Pena
844b7007a7
markused: clean up features tracking from checker - remove 1 all_fns loop (#24999) 2025-07-31 08:18:40 +03:00
Delyan Angelov
bb13e6601e
examples: use a sieve of Eratosthenes in primes.v, to handle bigger inputs more efficiently 2025-07-31 07:54:36 +03:00
gechandesu
75417c55fc
archive.tar: fix type in new_compressor fn name (#25006)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-07-30 19:49:00 +03:00
Jorge Mireles
a8d75c10b5
vlib: add archive.tar module to enable reading of .tar ang .tar.gz files (#24995) 2025-07-30 19:11:41 +03:00
Delyan Angelov
b876644e82
parser,ast,checker,cgen: use enum comparisons instead of string ones on ast.ComptimeCall.method_name (#25003)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
Sanitized CI / sanitize-undefined-clang (push) Has been cancelled
Sanitized CI / sanitize-undefined-gcc (push) Has been cancelled
Sanitized CI / tests-sanitize-address-clang (push) Has been cancelled
Sanitized CI / sanitize-address-msvc (push) Has been cancelled
Sanitized CI / sanitize-address-gcc (push) Has been cancelled
Sanitized CI / sanitize-memory-clang (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-07-30 13:59:36 +03:00
Krchi
cd94cff219
comptime: support type interpolation in the msg argument of $compile_warn(msg) and $compile_error(msg) (#24992)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-07-30 08:29:34 +03:00
Felipe Pena
56b51b69d8
checker: remove dump() dependency from ComptimeFor (#25000) 2025-07-30 03:08:16 +03:00
Delyan Angelov
efd6eccadc
v.util: add support for setting VUTIL_RETRY_MAX_COUNT=1 to ease the workflow for developing backends
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
2025-07-29 19:41:27 +03:00
Felipe Pena
6915a5a1b5
markused: clean up map fns handling (#24998) 2025-07-29 18:48:09 +03:00
Delyan Angelov
eb99497ffc
builtin,markused: consider println of non string to use .str() method calls too, reduce generated C code for v -cc gcc examples/hello_world.v (#24996)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
2025-07-29 14:52:24 +03:00
Delyan Angelov
2c8685a386
markused: use eprintln for PANIC DEPS too (for consistency and easier redirection for the whole trace)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-07-29 09:49:37 +03:00
Felipe Pena
396dc77a20
markused: reduce hello world csize by 49%, do more cleanups and improvements (#24971) 2025-07-29 09:00:57 +03:00
Delyan Angelov
59d408f72c
v: limit -div-by-zero-is-zero influence to just the integer types (for f32 and f64, / produces a +inf or -inf value, and the program continues to run) 2025-07-29 07:37:53 +03:00
Delyan Angelov
a5f9899ae3
v: support -div-by-zero-is-zero, which allows for x / 0 == 0 and x % 0 == x, avoiding division by zero traps/panics (#24981)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
2025-07-28 10:41:18 +03:00
Delyan Angelov
c1db6006bd
time: fix more panics in the supported specifiers in Time.custom_format/1 (#24988)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-07-27 20:34:11 +03:00
Delyan Angelov
6aede65485
markused,checker: fix hello world size after the introduction of builtin.closure in 2d87ac4 (#24989) 2025-07-27 20:29:28 +03:00
Delyan Angelov
ace5df7236
ci: workaround -usecache issue afte 2d87ac4 2025-07-27 20:24:13 +03:00
kbkpbot
2d87ac4837
cgen: move closure C code to V code under vlib/builtin/closure/ (#24912) 2025-07-27 17:44:06 +03:00
Delyan Angelov
a08ea74167
time: fix timezone test on windows
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-07-27 15:56:36 +03:00
kbkpbot
dc2a7b2b7c
time: fix custom_format panic (fix #24977) (#24987) 2025-07-27 15:46:56 +03:00
Delyan Angelov
f719c2cbe3
ci: force changes to vlib/x/json2 to trigger the full sanitized checks (the implementation there uses unsafe blocks and vmemcmp/3...)
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Has been cancelled
json decoder benchmark CI / json-encode-benchmark (push) Has been cancelled
2025-07-26 16:57:00 +03:00
Delyan Angelov
b511f2239e
ci,x.json2.decoder2: fix sanitize jobs 2025-07-26 16:53:53 +03:00
Delyan Angelov
318394dd47
tests: move newer fn tests to vlib/v/tests/fns/
Some checks failed
json decoder benchmark CI / json-encode-benchmark (push) Waiting to run
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Has been cancelled
native backend CI / native-backend-windows (push) Has been cancelled
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Has been cancelled
wasm backend CI / wasm-backend (windows-2022) (push) Has been cancelled
2025-07-26 07:15:08 +03:00
Delyan Angelov
dff623e143
tests: move newer struct related tests to vlib/v/tests/structs/ 2025-07-26 07:15:07 +03:00
Delyan Angelov
2e9f101cfc
tests: move new test from 261a4fb to vlib/v/tests/loops/ 2025-07-26 07:15:07 +03:00
Larsimusrex
66c669fffd
decoder2: rework decoding of sumtypes (#24949) 2025-07-26 07:06:43 +03:00
Krchi
261a4fb31b
parser: fix syntax error for for c in [othermod.Struct{field: 255}] { (fix #24943) (#24978) 2025-07-26 06:55:30 +03:00
Delyan Angelov
ec5eeb57b2
net.http: fix panic in parse_multipart_form for invalid boundary (fix #24974) (#24976)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-07-25 21:30:36 +03:00
Delyan Angelov
34cfe19ae3
tests: bump timeouts in cmd/tools/vtimeout_test.v to reduce false positives when the CI runners are slow 2025-07-25 19:07:50 +03:00
Felipe Pena
d9c7387da0
cgen: fix struct field init within fn without result type (fix #24970) (#24973) 2025-07-25 18:11:18 +03:00
kbkpbot
e5eed5c5a4
eval: fix if-else; add infix op; fix func calls (#24972) 2025-07-25 17:45:31 +03:00
Delyan Angelov
38beb23c6a
v.builder: add a clearer error message for v -shared run empty.v (issue found by Felipe Pena)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-07-25 15:15:05 +03:00
Delyan Angelov
6fb46cc30f
fmt: fix eating the attribute from @[deprecated] pub type Alias = int (fix #24968), workaround -usecache bug (#24969) 2025-07-25 10:57:52 +03:00
Felipe Pena
73db18bc0d
markused: cleanup and improve the code structure (#24959) 2025-07-25 09:21:33 +03:00
Delyan Angelov
e22f4d2979
ci: retry 2 times vlib/net/http/server_test.v to avoid false positives for unrelated commits/PRs 2025-07-25 09:05:24 +03:00
Krchi
e1147c73d8
cgen: move sort fn after interface definitions(fix #24465) (#24967)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-07-25 07:27:51 +03:00
Delyan Angelov
da0485f1d1
ci: add checks for compilation of vlang/gui to v_apps_and_modules_compile_ci.yml
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-07-24 23:31:58 +03:00
kbkpbot
af046e1c6e
eval: add more infix op support; fix early func return (#24965) 2025-07-24 21:10:10 +03:00
Felipe Pena
a309593f56
markused: fix interface fields and chan usage (fix #24961) (#24962) 2025-07-24 18:25:41 +03:00
Delyan Angelov
05479f3bd9
tools: improve alignment for v repeat "program" "program_that_is_over_10x_faster" 2025-07-24 15:46:54 +03:00
Felipe Pena
267d8262b3
parser,markused: support @[markused] for interface declarations too (#24963)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
2025-07-24 08:14:30 +03:00
Delyan Angelov
93a1989b0b
regex: fix OOB bug discovered through ./v -g -force-bounds-checking vlib/regex/ (fix by @penguindark) (#24960) 2025-07-24 08:10:45 +03:00
Delyan Angelov
66946738fb
tests: fix some of the notices/warnings/errors discovered through find . |grep _test.v$ |xargs -i ./v -g -keepc -skip-running {} 2025-07-24 07:38:03 +03:00
kbkpbot
e5c3b65895
eval: reset return value after const eval and fix if-expr (#24955) 2025-07-24 07:33:34 +03:00
Felipe Pena
edf6c22e9c
cgen: fix callback codegen on generic struct resolution (fix #24947) (#24948)
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
2025-07-23 20:49:25 +03:00
Felipe Pena
7472a745e0
parser: allow keyword as struct param key on fn call (fix #24957) (#24958) 2025-07-23 20:48:03 +03:00
Delyan Angelov
4037765828
builtin: fix OOB bugs in s.is_bin, s.is_oct, s.is_hex, discovered through ./v -force-bounds-checking test vlib/builtin/ 2025-07-23 15:52:18 +03:00
Delyan Angelov
bf03add8eb
v.help: document the new -force-bounds-checking option 2025-07-23 15:44:50 +03:00
Delyan Angelov
5c56909547
strconv: fix bounds check bug, discovered by the equivalent of ./v -g -force-bounds-checking test vlib/toml/ (thanks to tankf33der) 2025-07-23 15:38:04 +03:00
Delyan Angelov
2eacc6fadb
pref,parser: implement support for -force-bounds-checking to enable easier testing of functions tagged with @[direct_array_access] (essentially turning off that flag) 2025-07-23 15:33:51 +03:00
Delyan Angelov
da00a46bcc
builtin: prepare for adding a -force-bounds-checking option 2025-07-23 15:26:17 +03:00
Delyan Angelov
ba826c047b
ci: retry session_app_test.v 2 times, since it is network dependent, and sometimes (rarely) fails 2025-07-23 15:09:58 +03:00
Delyan Angelov
43a4f3fa76
math.big: fix validate_string and integer_from_regular_string (check for characters.len > 0, before accessing characters[0])
Some checks failed
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Has been cancelled
2025-07-23 15:04:55 +03:00
kbkpbot
735f8efb61
native: add comptime cpu archs support (#24956) 2025-07-23 14:33:19 +03:00
Laurent Cheylus
1f11b2b99c
ci: use FreeBSD version 14.3 after the bump of cross-platform-actions/action to 0.29.0 (#24953) 2025-07-23 13:25:47 +03:00
Mike
864e68527b
slow_tests: fix crash on clang for asm_test.amd64.v (#24954) 2025-07-23 13:24:24 +03:00
Delyan Angelov
f2fe971369
make.bat: add /F 16777216 option to cl.exe, to fix msvc v.exe bootstrapping 2025-07-23 12:57:56 +03:00
Felipe Pena
ae1fa8aced
markused: skip unused symbols, dump fns and generic specialization (fix #24921) (fix #24927) (#24924) 2025-07-23 08:50:31 +03:00
dependabot[bot]
938f462daf
ci: bump cross-platform-actions/action from 0.28.0 to 0.29.0 (#24952) 2025-07-23 08:38:36 +03:00
Krchi
708c73b4ea
cgen: fix const fixed array with type alias (fix #24936) (#24946) 2025-07-22 17:52:00 +03:00
Delyan Angelov
810a90efa6
ci: add a watchdog timer thread to ringbuffer_test.v, to make sure the program exits in a reasonable time (~10s). Let the test be retried 2 times in a row if it fails. 2025-07-22 12:48:29 +03:00
Delyan Angelov
9f0094b0b4
ci: skip ringbuffer_test.v in the tcc-windows and msvc-windows jobs too, to avoid flakyness for unrelated commits/PRs. 2025-07-22 12:39:14 +03:00
Delyan Angelov
4205697d88
fmt: fix if x := g() { x } else { return } adding newline after return (fix #24908) (#24945) 2025-07-22 11:45:59 +03:00
kbkpbot
5d4e89f888
os,runtime: move some C struct and fn def to builtin (#24942) 2025-07-22 07:55:53 +03:00
Delyan Angelov
ae0937c83e
docs: check vlib/time too in the report-missing-dots-in-doc-comments job 2025-07-21 18:43:40 +03:00
Mike
8578fd477a
math.big: fix zero base in big_mod_pow(), add tests (#24940) 2025-07-21 17:07:38 +03:00
Mike
080b56f0a9
math.big: fix big_mod_pow() (#24939) 2025-07-21 08:46:00 +03:00
Mike
46d4a6f8af
math.big: add shrink zeros to karatsuba and toom-cook (#24937) 2025-07-20 20:47:17 +03:00
Mike
987c211517
math.big: fix the order of calculations in mod_pow() to improve performance (#24935) 2025-07-20 15:27:20 +03:00
Kim Shrier
e3d047822d
pool: fix idle_conns assertion in test_pool_close (#24932) 2025-07-20 11:14:57 +03:00
Laurent Cheylus
04f90f0f2c
os: remove commented code in home_dir() function (#24929) 2025-07-20 06:20:56 +03:00
Kim Shrier
e3b07d9ddc
tests: cast C.AF_INET to u16 to avoid type error (#24933) 2025-07-20 04:58:30 +03:00
Alexander Medvednikov
d87b8c2627 checker: improve virtual C consts 2025-07-19 19:27:59 +03:00
Alexander Medvednikov
4dc9167b60 parser: fix const error 2025-07-19 18:51:06 +03:00
Alexander Medvednikov
9ef51ee714 v: virtual C consts with custom types (const C.MY_CONST u8) 2025-07-19 18:47:44 +03:00
Delyan Angelov
3725576729
docs,ci: check more vlib modules in the report-missing-dots-in-doc-comments job (#24928) 2025-07-19 11:51:01 +03:00
JalonSolov
ae9a69bdf7
doc: add missing word in union section (#24926) 2025-07-19 09:17:06 +03:00
JalonSolov
6dad361eb7
doc: improve union section (#24925) 2025-07-18 22:40:50 +03:00
Larsimusrex
747af8c360
x.json2.decoder2: fix decoding of structs with option fields (fix #24409) (#24922) 2025-07-18 11:03:21 +03:00
Delyan Angelov
736d79f455
v.vmod: fix typo spotted by Emma on Discord 2025-07-18 10:58:36 +03:00
Felipe Pena
cb8b8f22a2
markused: cleanup logic + skip unused conditional fn (#24911) 2025-07-17 17:56:24 +03:00
kbkpbot
a1b7f5485f
eval: add comptime-if support (#24919) 2025-07-17 17:52:41 +03:00
Laurent Cheylus
54e8ed5ec5
runtime: add used_memory implementation for OpenBSD (#24918) 2025-07-17 17:51:07 +03:00
Kim Shrier
c3dfe62d7b
runtime: add used_memory() implementation for FreeBSD (#24909) 2025-07-17 10:14:01 +03:00
Larsimusrex
54c6daab54
decoder2: fix checking and decoding of escape characters (fix #24834) (#24915)
Co-authored-by: Lars Dumke <lars-luis.dumke@keysight.com>
2025-07-17 08:34:05 +03:00
Laurent Cheylus
7b3e7cb447
runtime: add note for the availability of the used_memory implementation (#24913) 2025-07-16 16:53:06 +03:00
Jorge Mireles
8605599aee
compress,compress.gzip: add decompress_with_callback API (#24904) 2025-07-15 18:57:14 +03:00
Felipe Pena
0d8cc4588f
markused: remove @[markused] from option and result fns (#24900) 2025-07-15 18:37:48 +03:00
kbkpbot
a11b69e2bc
ast: fix arch loongarch64 comptime support (fix #24906) (#24907) 2025-07-15 15:47:54 +03:00
Swastik Baranwal
9b348b1b11
cgen: use alias next method if defined in for x in iterator { (#24905) 2025-07-15 10:20:17 +03:00
Delyan Angelov
69a887f63b
ci: cleanup produced executables after manually running v ci/linux_ci.vsh (#24902) 2025-07-14 18:39:39 +03:00
Delyan Angelov
9db3881707
ci: skip checking vlib/datatypes/lockfree/ringbuffer_test.v on the gcc-windows job for now 2025-07-14 18:38:39 +03:00
Delyan Angelov
a15a9cc123
runtime: reduce allocations done in runtime.used_memory/0 on linux (#24901) 2025-07-14 16:24:07 +03:00
kbkpbot
1ea8574659
os: fix windows get_error_msg() leak (#24899) 2025-07-14 14:54:55 +03:00
kbkpbot
220cdda07b
runtime: add used_memory() (#24897) 2025-07-14 12:45:53 +03:00
Delyan Angelov
50db431cfd
ci: add -prealloc self compilation checks on more platforms (#24891) 2025-07-14 11:03:56 +03:00
Swastik Baranwal
e2434a8256
cgen: allow alias types to be iterated if parent type has next method (fix #24890) (#24894) 2025-07-14 09:49:30 +03:00
Felipe Pena
feb409071d
markused: whitelist _option_none too (fix #24862) (#24885) 2025-07-13 21:09:06 +03:00
Felipe Pena
8ea42a69ca
markused: fix mark for array init from sumtype (fix #24887) (#24889) 2025-07-13 21:07:42 +03:00
xieke
efd36b8917
cgen: add a __closure_init call for sokol/gg programs on android as well (#24892) 2025-07-13 21:05:10 +03:00
kbkpbot
fa904c495e
builtin,cgen,markused: add struct @[aligned] support for structs allocated on the heap too (#24886) 2025-07-13 20:56:28 +03:00
Mike
f06def7d6d
math.big: fix toom-cook 3-way multiplication (#24888) 2025-07-13 18:36:46 +03:00
Felipe Pena
54fec7b772
x.json2.decoder2: fix option decode (fix #24861) (#24881) 2025-07-13 10:26:45 +03:00
Felipe Pena
34c67878b9
checker,cgen: allow alias to map type Dict = map[string]string (fix #24878) (#24883) 2025-07-13 10:25:02 +03:00
Felipe Pena
f80fc37775
cgen: fix anon struct init passing (fix #24879) (#24884) 2025-07-13 10:17:17 +03:00
whi
b7b1c2e2e3
veb: fix app.text() -> ctx.text() in README.md 2025-07-11 09:38:23 +03:00
Delyan Angelov
55b1236421
log: use @[noinline] for level_from_tag/1 and target_from_label/1 to avoid triggering panics for programs using log, compiled with -prod and -cc gcc>10 (fix #24874) 2025-07-10 14:43:42 +03:00
Mike
ee6eed3c22
math.unsigned: replace untested comments for uint256 public APIs (#24873) 2025-07-10 10:36:52 +03:00
Mike
03e72a4856
math.unsigned: fix rotate_left() for uint256, add test (#24872) 2025-07-10 08:45:34 +03:00
Mike
e850f6c678
math.unsigned: fix div_128() for uint128, add tests (#24869) 2025-07-09 23:33:50 +03:00
Mike
499283edc8
math.unsigned: fix lsh() for uint256, add tests (#24867) 2025-07-08 20:10:33 +03:00
Mike
09e1edbd17
math.unsigned: fix rsh() for uint256 too, add tests (#24865) 2025-07-08 17:22:45 +03:00
Delyan Angelov
bb7f9f2562
log: allow for -d log_default_level=debug, to change the default log level for programs and tests, that do not explicitly call log.set_level/1 themselves. 2025-07-08 17:08:43 +03:00
Alexander Medvednikov
f683ab69d6 net.http: handle Content-Length: 0 2025-07-08 13:54:19 +03:00
Alexander Medvednikov
ed82bbd2f3 doc: err is 2025-07-08 13:16:53 +03:00
Mike
47145ea644
math.unsigned: fix typos for uint128 (#24863) 2025-07-08 10:24:45 +03:00
Felipe Pena
00e0eae98b
cgen: fix codegen for generic interface with multi return generic type (fix #24838) (#24858) 2025-07-07 17:51:48 +03:00
Mike
e62ed47812
math.unsigned: fix quo_rem(), add tests (#24859) 2025-07-07 16:27:26 +03:00
831 changed files with 26764 additions and 11183 deletions

View file

@ -0,0 +1,30 @@
name: 'Cache Apt Packages'
description: 'Cache all commonly used apt packages to speed up CI jobs'
# imagemagick : convert, mogrify
# xvfb : xvfb
# openimageio-tools : idiff
# libxcursor-dev libxi-dev : V gfx deps
# libgl1-mesa-dri : For headless rendering on the CI / software DRI driver (LIBGL_ALWAYS_SOFTWARE=true)
# freeglut3-dev : Fixes graphic apps compilation with tcc
# sdl2 : needed for Puzzle Vibes & Chocolate Doom
# libsodium-dev : needed for Gitly and C2V
runs:
using: 'composite'
steps:
- uses: awalsh128/cache-apt-pkgs-action@v1.5.3
with:
version: 1.0
packages: expect binutils postgresql sqlite3 clang valgrind \
imagemagick openimageio-tools xvfb xsel xclip \
libsodium-dev libpq-dev libssl-dev libsqlite3-dev \
libfreetype6-dev libxi-dev libxcursor-dev \
libgl-dev libxrandr-dev libasound2-dev \
libx11-dev freeglut3-dev mesa-common-dev libgl1-mesa-dev libgl1-mesa-dri \
libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-net-dev \
libpng-dev libsamplerate0-dev \
xfonts-75dpi xfonts-base
- name: Install common packages
run: echo "done installing packages"
shell: bash

View file

@ -12,7 +12,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink

View file

@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink

View file

@ -34,12 +34,12 @@ jobs:
os: [ubuntu-latest, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 30
timeout-minutes: 15
env:
VFLAGS: -no-parallel
B_LFLAGS: -lm -lpthread
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Build V

View file

@ -0,0 +1,52 @@
name: CI Ubuntu 25 GCC 14.2
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- '**.yml'
- '!**/build_on_ubuntu_25_ci.yml'
- 'cmd/tools/**'
- '!cmd/tools/builders/**.v'
pull_request:
paths-ignore:
- '**.md'
- '**.yml'
- '!**/build_on_ubuntu_25_ci.yml'
- 'cmd/tools/**'
- '!cmd/tools/builders/**.v'
jobs:
ubuntu-25-gcc-14-2-build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- name: Build and test in Ubuntu 25.04 with GCC 14.2
run: |
set -o xtrace
echo "$PWD"
whoami
touch outside_docker.txt
git log -n4
echo "running docker ..."
docker run --rm \
--mount type=bind,source=/home/runner/work/v/v,destination=/src \
-w /src ubuntu:25.04 bash -c '
set -o xtrace
echo "running inside docker"
whoami
cp -r /src ~/vproject; cd ~/vproject
touch inside_docker.txt
ls -la
git log -n4
apt update -y -qq
apt install -y -qq git build-essential make
git config --global --add safe.directory /src/vc
git config --global --add safe.directory /src/thirdparty/tcc
make
./v symlink
v run examples/hello_world.v
v run examples/primes.v
'

View file

@ -29,9 +29,9 @@ concurrency:
jobs:
build-doom:
runs-on: ubuntu-24.04
timeout-minutes: 20
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make && ./v symlink
@ -50,6 +50,7 @@ jobs:
- name: Install dependencies
run: |
if [ "${{ runner.os }}" == "Linux" ]; then
.github/workflows/disable_azure_mirror.sh
v retry -- sudo apt update -y -qq
v retry -- sudo apt install libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev libpng-dev libsamplerate0-dev
else
@ -75,7 +76,7 @@ jobs:
LIBGL_ALWAYS_SOFTWARE: true
VTMP: /tmp
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make && ./v symlink
@ -93,6 +94,7 @@ jobs:
v -g ~/.vmodules/c2v/ || true
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
v retry -- sudo apt update -y -qq
v retry -- sudo apt install libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev libpng-dev libsamplerate0-dev
# c2v / DOOM dependencies

View file

@ -46,7 +46,7 @@ fn compare_size(fpath1 string, fpath2 string) {
size1 := os.file_size(fpath1)
size2 := os.file_size(fpath2)
diff_ := i64(size2) - i64(size1)
println('>>>>>> size("${fpath2:15}") - size("${fpath1:15}") = ${size2:10} - ${size1:10} = ${diff_:10}')
println('>>>>>> size("${fpath2:17}") - size("${fpath1:17}") = ${size2:10} - ${size1:10} = ${diff_:10}')
}
fn vcompare(vold string, vnew string) {
@ -82,11 +82,13 @@ fn main() {
xtime('./vnew1 -o vnew2 cmd/v')
xtime('./vnew2 -no-parallel -o vnew cmd/v')
xtime('./vnew -no-parallel -o nhw_current.c examples/hello_world.v')
xtime('./vnew -no-parallel -o nhw_current_gcc.c -cc gcc examples/hello_world.v')
xtime('./vnew -no-parallel -o nv_current.c cmd/v')
if compare_prod {
xtime('./vnew -no-parallel -prod -o vnew_prod cmd/v')
}
show_size('nhw_current.c')
show_size('nhw_current_gcc.c')
show_size('nv_current.c')
show_size('vnew')
if compare_prod {
@ -94,19 +96,26 @@ fn main() {
}
r('rm -rf vnew1 vnew2')
r('git checkout master')
// make sure to always compare against the main V repo's master branch:
os.execute('git -C . remote add V_REPO https://github.com/vlang/v.git')
os.execute('git -C . fetch V_REPO')
os.execute('git branch -D v_repo_master')
os.execute('git branch -f --track v_repo_master V_REPO/master')
r('git checkout v_repo_master')
master_branch := gbranch()
hline(' Compiling old V executables from branch: ${master_branch}, commit: ${gcommit()} ...')
xtime('./v -o vold1 cmd/v')
xtime('./vold1 -o vold2 cmd/v')
xtime('./vold2 -no-parallel -o vold cmd/v')
xtime('./vold -no-parallel -o ohw_master.c examples/hello_world.v')
xtime('./vold -no-parallel -o ohw_master_gcc.c -cc gcc examples/hello_world.v')
xtime('./vold -no-parallel -o ov_master.c cmd/v')
if compare_prod {
xtime('./vold -no-parallel -prod -o vold_prod cmd/v')
show_size('vold_prod')
}
show_size('ohw_master.c')
show_size('ohw_master_gcc.c')
show_size('ov_master.c')
show_size('vold')
if compare_prod {
@ -116,6 +125,7 @@ fn main() {
hline('File sizes so far ...')
compare_size('ohw_master.c', 'nhw_current.c')
compare_size('ohw_master_gcc.c', 'nhw_current_gcc.c')
compare_size('ov_master.c', 'nv_current.c')
compare_size('vold', 'vnew')
@ -131,6 +141,7 @@ fn main() {
hline('Final summary for file diff sizes on their own branches:')
compare_size('ohw_master.c', 'nhw_current.c')
compare_size('ohw_master_gcc.c', 'nhw_current_gcc.c')
compare_size('ov_master.c', 'nv_current.c')
compare_size('vold', 'vnew')
if compare_prod {

View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -e
function show() {
printf "\u001b[35m$1\u001b[0m\n"
}
rm -rf ~/.vmodules/gui/
export VJOBS=1
show "Clone https://github.com/vlang/gui"
v retry -- git clone --filter=blob:none --quiet https://github.com/vlang/gui ~/.vmodules/gui/
show "Checkout last known good commit"
git -C ~/.vmodules/gui/ checkout b4e3716b042ee6352efedff64c5b92cbf0e81ded
show "Check module for syntax and semantic errors"
v -shared -check ~/.vmodules/gui
show "Execute Tests"
v test ~/.vmodules/gui/
show "Compile Examples"
v should-compile-all -no-parallel ~/.vmodules/gui/examples/
rm -rf ~/.vmodules/gui/

View file

@ -23,11 +23,11 @@ concurrency:
jobs:
cross-macos:
runs-on: macos-13
timeout-minutes: 25
timeout-minutes: 15
env:
VFLAGS: -cc clang
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 10
- name: Build V
@ -53,11 +53,11 @@ jobs:
cross-linux:
runs-on: ubuntu-24.04
timeout-minutes: 25
timeout-minutes: 15
env:
VFLAGS: -cc tcc -no-retry-compilation
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 10
- name: Build v
@ -65,6 +65,7 @@ jobs:
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
./v retry -- sudo apt update -y -qq
./v retry -- sudo apt install --quiet -y mingw-w64 wine wine64 winetricks libssl-dev sqlite3 libsqlite3-dev
@ -101,9 +102,9 @@ jobs:
cross-windows:
runs-on: windows-2025
timeout-minutes: 25
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build
run: |
echo %VFLAGS%

View file

@ -9,7 +9,7 @@ jobs:
env:
VFLAGS: -cc msvc
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build
run: |
echo %VFLAGS%

11
.github/workflows/disable_azure_mirror.sh vendored Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
echo "APT MIRRORS BEFORE:"; cat /etc/apt/apt-mirrors.txt
sudo sed -i 's@http://azure.archive.ubuntu.com@http://archive.ubuntu.com@gm' /etc/apt/apt-mirrors.txt
echo "APT MIRRORS AFTER:"; cat /etc/apt/apt-mirrors.txt
echo "ls -la /etc/apt/sources.list.d/"; ls -la /etc/apt/sources.list.d/
for f in /etc/apt/sources.list.d/*; do echo "####### $f ######"; cat $f; done
echo "APT SOURCES BEFORE:"; echo "ls -la /etc/apt/sources.list"; ls -la /etc/apt/sources.list; cat /etc/apt/sources.list
sudo sed -i 's@http://azure.archive.ubuntu.com@http://archive.ubuntu.com@gm' /etc/apt/sources.list
echo "APT SOURCES AFTER:"; echo "ls -la /etc/apt/sources.list"; ls -la /etc/apt/sources.list; cat /etc/apt/sources.list

View file

@ -35,7 +35,7 @@ jobs:
- ${{github.workspace}}:/opt/vlang
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Show Environment
run: |
echo "PWD:"
@ -65,7 +65,7 @@ jobs:
- ${{github.workspace}}:/opt/vlang
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Build V
run: echo "$VFLAGS" && make -j4 && ./v -cg -o v cmd/v
- name: Verify `v test` works

View file

@ -23,9 +23,9 @@ concurrency:
jobs:
check-markdown:
runs-on: ubuntu-24.04
timeout-minutes: 10
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make
- name: Install dependencies (some examples show how to use sqlite and the x11 clipboard)
@ -41,15 +41,15 @@ jobs:
env:
MOPTIONS: --diff --deprecated --relative-paths --exclude /vlib/v/ --exclude /builtin/linux_bare/ --exclude /testdata/ --exclude /tests/
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make
- name: Checkout previous v
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: vlang/v
ref: master # important
ref: master
path: pv
- name: Check against parent commit
@ -59,10 +59,15 @@ jobs:
report-missing-dots-in-doc-comments:
runs-on: ubuntu-24.04
timeout-minutes: 10
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make
- name: Check doc comment dots for some key modules
run: ./v run cmd/tools/find_doc_comments_with_no_dots.v vlib/builtin/ vlib/arrays/ vlib/flag/ vlib/bitfield/
run: ./v run cmd/tools/find_doc_comments_with_no_dots.v \
vlib/builtin/ vlib/arrays/ vlib/flag/ \
vlib/bitfield/ vlib/term/ vlib/strings/ \
vlib/rand/ vlib/compress/ vlib/clipboard/ \
vlib/time/ \
vlib/os

View file

@ -27,13 +27,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Tests on FreeBSD with tcc
id: tests-freebsd-tcc
uses: cross-platform-actions/action@v0.28.0
uses: cross-platform-actions/action@v0.29.0
with:
operating_system: freebsd
version: '14.2'
version: '14.3'
memory: 4G
shell: sh
sync_files: runner-to-vm
@ -53,13 +53,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Tests on FreeBSD with clang
id: tests-freebsd-clang
uses: cross-platform-actions/action@v0.28.0
uses: cross-platform-actions/action@v0.29.0
with:
operating_system: freebsd
version: '14.2'
version: '14.3'
memory: 4G
shell: sh
sync_files: runner-to-vm
@ -79,13 +79,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Tests on FreeBSD with gcc
id: tests-freebsd-gcc
uses: cross-platform-actions/action@v0.28.0
uses: cross-platform-actions/action@v0.29.0
with:
operating_system: freebsd
version: '14.2'
version: '14.3'
memory: 4G
shell: sh
sync_files: runner-to-vm

View file

@ -30,8 +30,9 @@ concurrency:
jobs:
build-vc:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4
- name: Regenerate v.c and v_win.c

View file

@ -23,7 +23,7 @@ concurrency:
jobs:
gg-regressions:
runs-on: ubuntu-24.04
timeout-minutes: 20
timeout-minutes: 15
env:
VFLAGS: -cc tcc
DISPLAY: :99
@ -31,7 +31,7 @@ jobs:
VTMP: /tmp
steps:
- name: Checkout V
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Build local v
run: make -j4 && ./v symlink
@ -44,6 +44,7 @@ jobs:
# libxcursor-dev libxi-dev : V gfx deps
# libgl1-mesa-dri : For headless rendering / software DRI driver (LIBGL_ALWAYS_SOFTWARE=true)
# freeglut3-dev : Fixes graphic apps compilation with tcc
.github/workflows/disable_azure_mirror.sh
./v retry -- sudo apt update
./v retry -- sudo apt install imagemagick openimageio-tools libgl1-mesa-dri xvfb libxcursor-dev libxi-dev libxrandr-dev freeglut3-dev xsel xclip
./v retry -- ./v download https://raw.githubusercontent.com/tremby/imgur.sh/c98345d/imgur.sh

View file

@ -23,7 +23,7 @@ jobs:
os: [debian, alpine]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
repository: 'vlang/docker'

View file

@ -28,7 +28,7 @@ jobs:
env:
VFLAGS: -cc tcc -no-retry-compilation
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build v
run: make -j4 && ./v symlink
- name: Build v with -prealloc
@ -82,7 +82,7 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 121
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: All code is formatted
@ -136,7 +136,7 @@ jobs:
env:
VFLAGS: -cc clang
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: All code is formatted

View file

@ -31,13 +31,15 @@ jobs:
env:
VFLAGS: -cc clang
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: Test symlink
run: v run ci/macos_ci.vsh test_symlink
- name: v doctor
run: v run ci/macos_ci.vsh v_doctor
- name: Build v with -prealloc
run: v run ci/macos_ci.vsh build_v_with_prealloc
- name: Test cross compilation to Linux
run: v run ci/macos_ci.vsh test_cross_compilation
- name: Build V with -cstrict

View file

@ -6,12 +6,20 @@ on:
- 'vlib/**.v'
- 'vlib/**.md'
- 'cmd/tools/vdoc/**.v'
- 'cmd/tools/vdoc/theme/**.js'
- 'cmd/tools/vdoc/theme/**.css'
- 'cmd/tools/vdoc/theme/**.svg'
- 'cmd/tools/vdoc/theme/**.html'
- '**/module_docs_ci.yml'
push:
paths:
- 'vlib/**.v'
- 'vlib/**.md'
- 'cmd/tools/vdoc/**.v'
- 'cmd/tools/vdoc/theme/**.js'
- 'cmd/tools/vdoc/theme/**.css'
- 'cmd/tools/vdoc/theme/**.svg'
- 'cmd/tools/vdoc/theme/**.html'
- '**/module_docs_ci.yml'
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
@ -23,16 +31,25 @@ concurrency:
jobs:
build-module-docs:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: Update packages, before running apt install
run: .github/workflows/disable_azure_mirror.sh && v retry -- sudo apt update -y -qq
- name: Install dependencies (some modules wrap C libs)
run: v retry -- sudo apt install --quiet -y libpq-dev
libsodium-dev libasound2-dev libssl-dev \
sqlite3 libsqlite3-dev libfreetype6-dev \
libx11-dev libxi-dev freeglut3-dev \
libgl1-mesa-dri libxcursor-dev libgl-dev libxrandr-dev
- name: Install markdown from vpm
run: v retry -- v install markdown
- name: Test v doc
run: ./v test cmd/tools/vdoc/
- name: Build module documentation
run: ./v doc -m -f html vlib/
- name: Build module documentation and check the examples in the comments
run: ./v doc -m -f html -unsafe-run-examples -time vlib/
- name: Deploy docs to vercel
if: github.event_name == 'push' && github.repository == 'vlang/v' && github.ref == 'refs/heads/master'
run: npx vercel --confirm --prod --name vmodules --token ${{ secrets.VERCEL_TOKEN }} vlib/_docs/ || true

View file

@ -12,7 +12,7 @@ jobs:
lint-module-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Check Formatting
uses: creyD/prettier_action@v4.6
with:

View file

@ -26,9 +26,9 @@ jobs:
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 121
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
if: runner.os != 'Windows'
@ -39,5 +39,5 @@ jobs:
- name: Run additional crypto tests
run: |
v retry -- git clone --depth 1 https://github.com/vlang/hash_validation_tests
v test hash_validation_tests/
v retry -- git clone --depth 1 https://github.com/vlang/slower_tests
v test slower_tests/

View file

@ -54,7 +54,7 @@ jobs:
env:
VJOBS: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make && ./v symlink
- name: Install linker
@ -69,7 +69,7 @@ jobs:
env:
VJOBS: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V (Windows)
run: ./make.bat && ./v symlink
- name: Rebuild V with -g, for better stacktraces on compiler panics

View file

@ -27,10 +27,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Tests on OpenBSD with tcc
id: tests-openbsd-tcc
uses: cross-platform-actions/action@v0.28.0
uses: cross-platform-actions/action@v0.29.0
with:
operating_system: openbsd
version: '7.7'
@ -53,10 +53,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Tests on OpenBSD with clang
id: tests-openbsd-clang
uses: cross-platform-actions/action@v0.28.0
uses: cross-platform-actions/action@v0.29.0
with:
operating_system: openbsd
version: '7.7'
@ -79,10 +79,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Tests on OpenBSD with gcc
id: tests-openbsd-gcc
uses: cross-platform-actions/action@v0.28.0
uses: cross-platform-actions/action@v0.29.0
with:
operating_system: openbsd
version: '7.7'

View file

@ -22,16 +22,36 @@ concurrency:
cancel-in-progress: true
jobs:
performance-compare-with-master:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Environment info
run: echo "$VFLAGS $GITHUB_SHA $GITHUB_REF"
- name: Name the local git branch
run: git checkout -b the_v_pr_branch
- name: Build local v
run: make && ./v symlink
- name: V version
run: ./v version
- name: Build the repeat tool
run: ./v cmd/tools/vrepeat.v
- name: Run compare_pr_to_master.v
run: VREPEAT_SILENT=1 ./v run .github/workflows/compare_pr_to_master.v
prevent-gpl-licenses:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout V ${{ github.head_ref }}
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
path: v
- name: Checkout V master
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: vlang/v
path: vmaster
@ -47,11 +67,11 @@ jobs:
code-formatting:
runs-on: ubuntu-24.04
timeout-minutes: 30
timeout-minutes: 15
env:
VFLAGS: -cc gcc
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Environment info
run: echo "$VFLAGS $GITHUB_SHA $GITHUB_REF"
- name: Build local v
@ -63,11 +83,11 @@ jobs:
performance-regressions:
runs-on: ubuntu-24.04
timeout-minutes: 30
timeout-minutes: 20
env:
VFLAGS: -cc gcc
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Environment info
run: echo "$VFLAGS $GITHUB_SHA $GITHUB_REF"
- name: Build local v
@ -87,11 +107,11 @@ jobs:
misc-tooling:
runs-on: ubuntu-24.04
timeout-minutes: 121
timeout-minutes: 15
env:
VFLAGS: -cc tcc -no-retry-compilation
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 10
- name: Build v
@ -99,6 +119,7 @@ jobs:
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
./v retry -- sudo apt update
./v retry -- sudo apt install --quiet -y libsodium-dev libssl-dev sqlite3 libsqlite3-dev postgresql libpq-dev valgrind
./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev xfonts-75dpi xfonts-base
@ -125,9 +146,9 @@ jobs:
parser-silent:
runs-on: ubuntu-24.04
timeout-minutes: 121
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build local v
run: |
make -j4 && ./v symlink

View file

@ -1,14 +1,21 @@
name: Path Testing CI
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- '**.yml'
- '!**/paths_ci.yml'
- 'cmd/tools/**'
- '!cmd/tools/builders/**.v'
pull_request:
paths-ignore:
- '**.md'
- '**.yml'
- '!**/paths_ci.yml'
- 'cmd/tools/**'
- '!cmd/tools/builders/**.v'
concurrency:
group: paths-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
@ -17,9 +24,9 @@ concurrency:
jobs:
space-paths-linux:
runs-on: ubuntu-24.04
timeout-minutes: 30
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
persist-credentials: false
path: '你好 my $path, @с интервали'
@ -47,7 +54,7 @@ jobs:
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
path: '你好 my $path, @с интервали'
persist-credentials: false
@ -87,7 +94,7 @@ jobs:
####### D:\a\v\v\你好 my $path, @с интервали: No such file or directory
## and that happens even for gcc builds, not just tcc ones
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
path: 'path with some $punctuation, and some spaces'
persist-credentials: false

View file

@ -29,7 +29,7 @@ jobs:
VFLAGS: -cc ${{ matrix.cc }}
V_CI_PERIODIC: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build
if: runner.os != 'Windows'
run: make -j4 && ./v -showcc -o v cmd/v && ./v doctor

View file

@ -12,7 +12,7 @@ jobs:
steps:
- name: Download V
run: |
.github/workflows/retry.sh https://github.com/vlang/v/releases/latest/download/v_linux.zip
.github/workflows/retry.sh wget https://github.com/vlang/v/releases/latest/download/v_linux.zip
unzip v_linux.zip
cd v
./v -version
@ -29,7 +29,7 @@ jobs:
steps:
- name: Download V
run: |
.github/workflows/retry.sh https://github.com/vlang/v/releases/latest/download/v_macos_arm64.zip
.github/workflows/retry.sh wget https://github.com/vlang/v/releases/latest/download/v_macos_arm64.zip
unzip v_macos_arm64.zip
cd v
./v -version
@ -45,7 +45,7 @@ jobs:
steps:
- name: Download V
run: |
.github/workflows/retry.sh https://github.com/vlang/v/releases/latest/download/v_macos_x86_64.zip
.github/workflows/retry.sh wget https://github.com/vlang/v/releases/latest/download/v_macos_x86_64.zip
unzip v_macos_x86_64.zip
cd v
./v -version

View file

@ -4,19 +4,23 @@ on:
workflow_dispatch:
push:
paths:
- 'vlib/**'
- 'vlib/v/checker/**.v'
- 'vlib/v/gen/c/**.v'
- 'thirdparty/**'
- 'cmd/tools/builders/**.v'
- 'cmd/tools/vshader.v'
- '**/puzzle_vibes_ci.yml'
- '!**_test.v'
- '!**.md'
pull_request:
paths:
- 'vlib/**'
- 'vlib/v/checker/**'
- 'vlib/v/gen/c/**'
- 'thirdparty/**'
- 'cmd/tools/builders/**.v'
- 'cmd/tools/vshader.v'
- '**/puzzle_vibes_ci.yml'
- '!**_test.v'
- '!**.md'
concurrency:
@ -26,18 +30,14 @@ concurrency:
jobs:
v-compiles-puzzle-vibes:
runs-on: ubuntu-24.04
timeout-minutes: 30
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/cache-apt-packages-action
- name: Build V
run: make && ./v symlink
- name: Install dependencies
run: |
v retry 'sudo apt update'
v retry 'sudo apt install -y libsdl2-dev libsdl2-ttf-dev'
v retry 'sudo apt install -y libsdl2-mixer-dev libsdl2-image-dev'
- name: Install & Setup SDL
run: v retry -- v install sdl && v ~/.vmodules/sdl/setup.vsh
@ -47,14 +47,14 @@ jobs:
- name: Clone Puzzle Vibes
run: v retry -- git clone https://github.com/larpon/puzzle_vibes/
- name: Check PV compiles
run: cd puzzle_vibes && v .
- name: Check PV compiles with -g
run: cd puzzle_vibes && v -g .
- name: Check PV compiles
run: cd puzzle_vibes && v .
- name: Check PV compiles with -prod
run: cd puzzle_vibes && v -prod .
run: cd puzzle_vibes && v -prod -no-prod-options .
- name: Check PV compiles with -prod and -g
run: cd puzzle_vibes && v -prod -g .
run: cd puzzle_vibes && v -prod -g -no-prod-options .

View file

@ -24,13 +24,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-13, macos-14, windows-latest]
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-13, macos-14, windows-latest]
include:
- os: ubuntu-22.04
cc: gcc
- os: ubuntu-22.04
target: linux
artifact: v_linux.zip
- os: ubuntu-22.04-arm
cc: gcc
- os: ubuntu-22.04-arm
target: linux_arm64
artifact: v_linux_arm64.zip
- os: macos-13
cc: clang
- os: macos-13
@ -49,7 +54,7 @@ jobs:
artifact: v_windows.zip
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Compile release binaries
if: runner.os != 'Windows'
run: |
@ -106,13 +111,14 @@ jobs:
needs: release-build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: |
~/work/v/v/windows/v_windows.zip
~/work/v/v/linux/v_linux.zip
~/work/v/v/linux_arm64/v_linux_arm64.zip
~/work/v/v/macos_arm64/v_macos_arm64.zip
~/work/v/v/macos_x86_64/v_macos_x86_64.zip
tag: ${{ github.ref_name }}

View file

@ -21,9 +21,10 @@ jobs:
riscv64_linux:
# The host should always be Linux
runs-on: ubuntu-24.04
timeout-minutes: 30
name: Build on ubuntu-24.04 riscv64
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: uraimo/run-on-arch-action@v3
name: Run commands
id: runcmd

View file

@ -21,9 +21,10 @@ jobs:
s390x_linux:
# The host should always be Linux
runs-on: ubuntu-22.04
timeout-minutes: 30
name: Build on ubuntu-22.04 s390x
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: uraimo/run-on-arch-action@v3
name: Run commands
id: runcmd
@ -47,3 +48,4 @@ jobs:
file ./v
ls -la ./v
./v test vlib/builtin vlib/os vlib/encoding/binary
./v test vlib/v/tests/fns/closure_test.v

View file

@ -41,6 +41,8 @@ on:
- 'vlib/v/markused/**.v'
- 'vlib/v/preludes/**.v'
- 'vlib/v/embed_file/**.v'
- 'vlib/x/json2/**.v'
- 'vlib/x/json2/decoder2/**.v'
- '**/sanitized_ci.yml'
pull_request:
paths:
@ -68,6 +70,8 @@ on:
- 'vlib/v/markused/**.v'
- 'vlib/v/preludes/**.v'
- 'vlib/v/embed_file/**.v'
- 'vlib/x/json2/**.v'
- 'vlib/x/json2/decoder2/**.v'
- '**/sanitized_ci.yml'
concurrency:
@ -84,13 +88,14 @@ jobs:
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1:print_suppressions=0:suppressions=/home/runner/work/v/v/.github/workflows/run_sanitizers_undefined.suppressions
VNATIVE_SKIP_LIBC_VV: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: Ensure code is well formatted
run: ./v -silent test-cleancode
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
./v retry -- sudo apt update
./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev
@ -113,13 +118,14 @@ jobs:
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1:print_suppressions=0:suppressions=/home/runner/work/v/v/.github/workflows/run_sanitizers_undefined.suppressions
VNATIVE_SKIP_LIBC_VV: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: Ensure code is well formatted
run: ./v -silent test-cleancode
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
./v retry -- sudo apt update
./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev
@ -142,13 +148,14 @@ jobs:
LSAN_OPTIONS: max_leaks=1:print_suppressions=0:suppressions=/home/runner/work/v/v/.github/workflows/run_sanitizers_leak.suppressions
VNATIVE_SKIP_LIBC_VV: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: Ensure code is well formatted
run: ./v -silent test-cleancode
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
./v retry -- sudo apt update
./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev
@ -172,7 +179,7 @@ jobs:
VJOBS: 1
VNATIVE_SKIP_LIBC_VV: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build
run: |
echo %VFLAGS%
@ -198,13 +205,14 @@ jobs:
LSAN_OPTIONS: max_leaks=1:print_suppressions=0:suppressions=/home/runner/work/v/v/.github/workflows/run_sanitizers_leak.suppressions
VNATIVE_SKIP_LIBC_VV: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: Ensure code is well formatted
run: ./v -silent test-cleancode
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
./v retry -- sudo apt update
./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev
@ -228,13 +236,14 @@ jobs:
VJOBS: 1
VNATIVE_SKIP_LIBC_VV: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: Ensure code is well formatted
run: ./v -silent test-cleancode
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
./v retry -- sudo apt update
./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind
./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev

View file

@ -26,16 +26,17 @@ concurrency:
jobs:
v-compiles-sdl-examples:
runs-on: ubuntu-24.04
timeout-minutes: 30
timeout-minutes: 15
env:
VFLAGS: -cc tcc
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make && sudo ./v symlink
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
v retry 'sudo apt update'
v retry 'sudo apt install -y libsdl2-dev libsdl2-ttf-dev'
v retry 'sudo apt install -y libsdl2-mixer-dev libsdl2-image-dev'

View file

@ -23,7 +23,7 @@ jobs:
os: [ubuntu-24.04, macos-13]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4
- name: Symlink
@ -64,7 +64,7 @@ jobs:
flags: ['', '-githubci']
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: ./make.bat
- name: Symlink

52
.github/workflows/termux_ci.yml vendored Normal file
View file

@ -0,0 +1,52 @@
name: CI Termux
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- '**.yml'
- '!**/termux_ci.yml'
- 'cmd/tools/**'
- '!cmd/tools/builders/**.v'
pull_request:
paths-ignore:
- '**.md'
- '**.yml'
- '!**/termux_ci.yml'
- 'cmd/tools/**'
- '!cmd/tools/builders/**.v'
jobs:
termux-build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- name: Build and test in Termux
run: |
set -o xtrace
echo "$PWD"
whoami
touch outside_docker.txt
git log -n4
echo "running docker ..."
docker run --rm --mount type=bind,source=/home/runner/work/v/v,destination=/src -w /src termux/termux-docker:latest bash -c '
set -o xtrace
echo "running inside docker"
whoami
cp -r /src ~/vproject; cd ~/vproject
touch inside_docker.txt
ls -la
echo "previous TERMUX_VERSION: $TERMUX_VERSION"
export TERMUX_VERSION=0.118.3
echo "explicit TERMUX_VERSION: $TERMUX_VERSION"
.github/workflows/retry.sh pkg update -y
.github/workflows/retry.sh pkg install -y clang libexecinfo libgc libgc-static make git
git log -n4
VFLAGS="-cc cc" make
./v symlink
v run examples/hello_world.v
v run examples/primes.v
v -e "import os; dump( os.user_os() )"
'

View file

@ -22,7 +22,7 @@ jobs:
time-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make
- name: Test time functions in a timezone UTC-12
@ -39,7 +39,7 @@ jobs:
time-macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make
- name: Test time functions in a timezone UTC-12
@ -56,7 +56,7 @@ jobs:
time-windows:
runs-on: windows-2025
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: .\make.bat
- name: Test time functions in a timezone UTC-12

View file

@ -19,9 +19,9 @@ concurrency:
jobs:
toml-module-pass-external-test-suites:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: Install dependencies

View file

@ -25,6 +25,7 @@ concurrency:
jobs:
tools-linux:
runs-on: ubuntu-22.04
timeout-minutes: 20
strategy:
matrix:
cc: [tcc, gcc, clang]
@ -32,7 +33,7 @@ jobs:
env:
VFLAGS: -cc ${{ matrix.cc }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v -showcc -o v cmd/v && ./v doctor
- name: Code in cmd/ is formatted
@ -64,6 +65,7 @@ jobs:
tools-macos:
runs-on: macos-14
timeout-minutes: 15
strategy:
matrix:
cc: [clang]
@ -71,7 +73,7 @@ jobs:
env:
VFLAGS: -cc ${{ matrix.cc }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v -showcc -o v cmd/v && ./v doctor
- name: Check build-tools
@ -83,6 +85,7 @@ jobs:
tools-windows:
runs-on: windows-2025
timeout-minutes: 20
strategy:
matrix:
cc: [tcc, gcc, msvc]
@ -90,11 +93,11 @@ jobs:
env:
VFLAGS: -cc ${{ matrix.cc }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: ./make.bat -${{ matrix.cc }} && ./v -o v2.exe cmd/v && ./v2 -showcc -o v.exe cmd/v && ./v doctor
- name: Check build tools
run: ./v -silent -N -W -check build-tools
run: ./v build-tools
- name: Test tools
run: ./v -silent test-self cmd
- name: Test tools (-cstrict)
@ -103,7 +106,7 @@ jobs:
tools-docker-ubuntu-musl:
runs-on: ubuntu-24.04
timeout-minutes: 121
timeout-minutes: 15
container:
image: thevlang/vlang:ubuntu-build
env:
@ -114,7 +117,7 @@ jobs:
- ${{github.workspace}}:/opt/vlang
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v -cg -o v cmd/v
- name: Ensure git commands can be used with no prompts on modern Git versions

View file

@ -27,9 +27,9 @@ jobs:
os: [ubuntu-latest, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 121
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
id: build
@ -38,6 +38,7 @@ jobs:
- name: Install dependencies
run: |
if [ "$RUNNER_OS" == 'Linux' ]; then
.github/workflows/disable_azure_mirror.sh
v retry -- sudo apt -qq update
v retry -- sudo apt -qq install libgc-dev libsodium-dev libssl-dev sqlite3 libsqlite3-dev
v retry -- sudo apt -qq install libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev xfonts-75dpi xfonts-base
@ -70,6 +71,9 @@ jobs:
echo "Run vsql/connection_test.v"
v vsql/connection_test.v
- name: Test vlang/gui
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: .github/workflows/compile_vlang_gui_examples.sh
- name: Test discord.v
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: .github/workflows/compile_discordv.sh
@ -233,8 +237,9 @@ jobs:
os: [ubuntu-24.04, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make && ./v symlink
- name: Build vpm

View file

@ -24,16 +24,16 @@ concurrency:
jobs:
vab-compiles-v-examples:
runs-on: ubuntu-24.04
timeout-minutes: 121
timeout-minutes: 15
env:
VAB_FLAGS: --api 30 --build-tools 29.0.0 -v 3
steps:
- uses: actions/setup-java@v4
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
@ -68,7 +68,7 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink

View file

@ -24,14 +24,15 @@ concurrency:
jobs:
vinix-build:
runs-on: ubuntu-24.04
timeout-minutes: 10
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
run: make -j4 && ./v symlink
- name: Install dependencies
run: |
.github/workflows/disable_azure_mirror.sh
v retry -- sudo apt update
v retry -- sudo apt install build-essential -y

View file

@ -22,7 +22,7 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
path: vlang
- name: Show git version

View file

@ -27,17 +27,18 @@ jobs:
os: [ubuntu-24.04, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 15
timeout-minutes: 25
env:
VFLAGS: -no-parallel
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
id: build
run: make && sudo ./v symlink
- name: Install dependencies
run: |
if [ "$RUNNER_OS" == 'Linux' ]; then
.github/workflows/disable_azure_mirror.sh
v retry -- sudo apt -qq update
v retry -- sudo apt -qq install \
libgc-dev libgl1-mesa-dev mesa-common-dev liblapacke-dev libopenblas-dev libopenmpi-dev \
@ -58,20 +59,21 @@ jobs:
os: [ubuntu-24.04, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 15
timeout-minutes: 25
env:
VFLAGS: -no-parallel
# Fixes complaints about $TERM not being set when running the vtl test script
# (a warning on Linux, but an error on macOS).
TERM: xterm
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
id: build
run: make && sudo ./v symlink
- name: Install dependencies
run: |
if [ "$RUNNER_OS" == 'Linux' ]; then
.github/workflows/disable_azure_mirror.sh
v retry -- sudo apt -qq update
v retry -- sudo apt -qq install \
libgc-dev libgl1-mesa-dev mesa-common-dev liblapacke-dev libopenblas-dev libopenmpi-dev

View file

@ -37,11 +37,11 @@ jobs:
- os: macos-14
zip: v_macos_arm64.zip
runs-on: ${{ matrix.os }}
timeout-minutes: 10
timeout-minutes: 15
env:
VDIR: /tmp/v_from_release_zip
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build v
run: make && ./v symlink && ./v version

View file

@ -49,11 +49,11 @@ jobs:
matrix:
os: [ubuntu-22.04, windows-2022]
fail-fast: false
timeout-minutes: 10
timeout-minutes: 15
env:
VTEST_ONLY: wasm
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build V
if: runner.os != 'Windows'
run: make -j4

View file

@ -27,7 +27,7 @@ jobs:
env:
VFLAGS: -cc tcc -no-retry-compilation
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build v
run: |
echo "$VFLAGS"

View file

@ -30,7 +30,7 @@ jobs:
env:
VFLAGS: -cc gcc
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Show tool versions
run: |
gcc --version
@ -97,7 +97,7 @@ jobs:
env:
VFLAGS: -cc msvc
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build
run: |
echo %VFLAGS%
@ -143,7 +143,7 @@ jobs:
env:
VFLAGS: -cc tcc -no-retry-compilation
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build with make.bat -tcc
run: |
.\make.bat -tcc
@ -158,6 +158,8 @@ jobs:
run: |
v retry -- v setup-freetype
.\.github\workflows\windows-install-sqlite.bat
- name: v -g self
run: v -g self
- name: v doctor
run: |
v doctor

View file

@ -18,7 +18,7 @@ jobs:
lint-yml-workflows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Verify formatting
uses: creyD/prettier_action@v4.6
with:

View file

@ -188,10 +188,13 @@ Linux/macos:
```bash
pkg install clang libexecinfo libgc libgc-static make git
pkg update
git clone --depth=1 https://github.com/vlang/v
cd v
make
./v symlink
```
Note: there is *no* need for `sudo ./v symlink` on Termux (and sudo is not installed by default).
### C compiler

View file

@ -80,6 +80,21 @@ Each `.c.must_have` file, consists of multiple lines. Each of these
lines, *should* be present *at least once* in the output, when the .vv
file is compiled with `-o -` .
## REPL tests
The test runner for these is `vlib/v/slow_tests/repl/repl_test.v`.
The test cases for the V REPL, are stored in .repl files, in the folder
`vlib/v/slow_tests/repl/`. Each .repl file in this folder, contains several
lines of input to the V repl, followed by a single line of `===output===`,
and then the output lines, that the repl would normally show for the input
lines.
If you change the compiler or the REPL source, and you have breaks in those
.repl files, you can replace the current output in them, by running several
times `VAUTOFIX=1 ./vlib/v/slow_tests/repl/repl_test.v`, until all the
files are fixed and the test pass.
## `v vlib/v/slow_tests/run_project_folders_test.v`
This *test runner*, checks whether whole project folders, can be compiled, and run.

278
bench/bench_closure.v Normal file
View file

@ -0,0 +1,278 @@
module main
import time
import sync
import os
import runtime
import v.util.version
// Define closure type alias
type ClosureFN = fn () int
// Test closures with different capture sizes
fn create_closure_small() ClosureFN {
a := 0
return fn [a] () int {
return a
}
}
fn create_closure_medium() ClosureFN {
a, b, c, d := 1, 2, 3, 4
return fn [a, b, c, d] () int {
return a + b - c * d
}
}
struct LargeData {
array [10]int
}
fn create_closure_large() ClosureFN {
data := LargeData{
array: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]!
}
return fn [data] () int {
mut sum := 0
for i in 0 .. 10 {
sum += data.array[i]
}
return sum
}
}
// Result structs
struct TestResult {
test_name string
iterations int
time_ms i64
ops_per_sec f64 // Operations per second
notes string
}
struct MemoryResult {
test_name string
count int
start_mem_kb int
end_mem_kb int
delta_kb int
bytes_per_closure int
check_sum int
}
// Benchmark group - returns result structs
fn benchmark_closure_creation(iterations int) []TestResult {
mut results := []TestResult{}
// Test small closure creation
mut start := time.ticks()
for _ in 0 .. iterations {
_ = create_closure_small()
}
small_time := time.ticks() - start
mut ops_per_sec := f64(iterations) * 1000.0 / f64(small_time)
results << TestResult{'Small Closure Creation', iterations, small_time, ops_per_sec, ''}
// Test medium closure creation
start = time.ticks()
for _ in 0 .. iterations {
_ = create_closure_medium()
}
medium_time := time.ticks() - start
ops_per_sec = f64(iterations) * 1000.0 / f64(medium_time)
results << TestResult{'Medium Closure Creation', iterations, medium_time, ops_per_sec, ''}
// Test large closure creation
large_iter := iterations / 10
start = time.ticks()
for _ in 0 .. large_iter {
_ = create_closure_large()
}
large_time := time.ticks() - start
ops_per_sec = f64(large_iter) * 1000.0 / f64(large_time)
results << TestResult{'Large Closure Creation', large_iter, large_time, ops_per_sec, ''} //, "Equivalent iterations: ${iterations/10}"}
return results
}
fn benchmark_closure_call(iterations int) []TestResult {
mut results := []TestResult{}
closure_small := create_closure_small()
closure_medium := create_closure_medium()
closure_large := create_closure_large()
// Test small closure call
mut start := time.ticks()
for _ in 0 .. iterations {
_ = closure_small()
}
small_time := time.ticks() - start
mut ops_per_sec := f64(iterations) * 1000.0 / f64(small_time)
results << TestResult{'Small Closure Call', iterations, small_time, ops_per_sec, ''}
// Test medium closure call
start = time.ticks()
for _ in 0 .. iterations {
_ = closure_medium()
}
medium_time := time.ticks() - start
ops_per_sec = f64(iterations) * 1000.0 / f64(medium_time)
results << TestResult{'Medium Closure Call', iterations, medium_time, ops_per_sec, ''}
// Test large closure call
large_iter := iterations / 10
start = time.ticks()
for _ in 0 .. large_iter {
_ = closure_large()
}
large_time := time.ticks() - start
ops_per_sec = f64(large_iter) * 1000.0 / f64(large_time)
results << TestResult{'Large Closure Call', large_iter, large_time, ops_per_sec, ''}
return results
}
fn benchmark_threaded_creation(threads int, iterations_per_thread int) TestResult {
total_iterations := threads * iterations_per_thread
mut wg := sync.new_waitgroup()
wg.add(threads)
start := time.ticks()
for _ in 0 .. threads {
go fn [mut wg, iterations_per_thread] () {
defer { wg.done() }
for _ in 0 .. iterations_per_thread {
_ = create_closure_medium()
}
}()
}
wg.wait()
elapsed := time.ticks() - start
ops_per_sec := f64(total_iterations) * 1000.0 / f64(elapsed)
return TestResult{
test_name: 'Multi-threaded Creation'
iterations: total_iterations
time_ms: elapsed
ops_per_sec: ops_per_sec
notes: 'Threads: ${threads} Iterations per thread: ${iterations_per_thread}'
}
}
fn baseline_call_performance(iterations int) TestResult {
start := time.ticks()
for _ in 0 .. iterations {
_ = normal_function()
}
elapsed := time.ticks() - start
ops_per_sec := f64(iterations) * 1000.0 / f64(elapsed)
return TestResult{
test_name: 'Normal Function Call'
iterations: iterations
time_ms: elapsed
ops_per_sec: ops_per_sec
notes: 'Baseline'
}
}
fn benchmark_memory_usage(count int) MemoryResult {
mut closures := []ClosureFN{}
start_mem := runtime.used_memory() or { panic(err) }
for i in 0 .. count {
the_closure := create_closure_medium()
closures << the_closure
if i % 1000 == 0 {
_ = the_closure()
}
}
end_mem := runtime.used_memory() or { panic(err) }
delta := int(end_mem) - int(start_mem)
bytes_per_closure := delta / count
// Calculate verification sum
mut check_sum := 0
n := if closures.len < 100 { closures.len } else { 100 }
for idx in 0 .. n {
check_sum += closures[idx]()
}
return MemoryResult{
test_name: 'Closure Memory Overhead'
count: count
start_mem_kb: int(start_mem / 1024)
end_mem_kb: int(end_mem / 1024)
delta_kb: delta / 1024
bytes_per_closure: bytes_per_closure
check_sum: check_sum
}
}
fn normal_function() int {
return 42
}
// Format performance data for readability
fn format_perf(ops_per_sec f64) string {
if ops_per_sec >= 1_000_000 {
return '${ops_per_sec / 1_000_000:5.2f} Mop/s'
} else if ops_per_sec >= 1_000 {
return '${ops_per_sec / 1_000:5.2f} Kop/s'
} else {
return '${ops_per_sec:5.2f} op/s'
}
}
fn print_results_table(results []TestResult, title string) {
println('|---------------------------|------------|----------|--------------|--------------|')
for res in results {
perf_str := format_perf(res.ops_per_sec)
println('| ${res.test_name:-25} | ${res.iterations:10} | ${res.time_ms:8} | ${perf_str:-12} | ${res.notes:-12} |')
}
}
fn main() {
println('# V Language Closure Performance Benchmark Report')
// Configurable test parameters
base_iter := 100_000_000 // 100 million iterations
creation_iter := 10_000_000 // 1 million iterations
mem_count := 100_000
threads := 8
thread_iter := 125_000
// Execute tests
baseline_result := baseline_call_performance(base_iter)
creation_results := benchmark_closure_creation(creation_iter)
call_results := benchmark_closure_call(base_iter)
thread_result := benchmark_threaded_creation(threads, thread_iter)
mem_result := benchmark_memory_usage(mem_count)
// Print result tables
println('\n## 1. Closure Performance Analysis')
println('| Test Name | Iterations | Time(ms) | Ops/sec | Notes |')
print_results_table([baseline_result], '1. Performance Baseline')
print_results_table(creation_results, '2. Closure Creation Performance')
print_results_table(call_results, '3. Closure Call Performance')
print_results_table([thread_result], '4. Multi-threaded Performance')
// Print memory results
println('\n## 2. Memory Overhead Analysis')
println('| Test Name | Closure Count | Start Mem(KB) | End Mem(KB) | Delta(KB) | Bytes/Closure |')
println('|-------------------------|---------------|---------------|------------|-----------|---------------|')
println('| ${mem_result.test_name:-20} | ${mem_result.count:13} | ${mem_result.start_mem_kb:13} | ${mem_result.end_mem_kb:10} | ${mem_result.delta_kb:9} | ${mem_result.bytes_per_closure:13} |')
println('\n**Verification Sum: ${mem_result.check_sum}** (Calculated from random sample of 100 closures)')
println('\n## Test Environment')
println('- V Language Version: ${version.full_v_version(false)}')
println('- CPU Cores: ${runtime.nr_cpus()}')
println('- System Memory: ${runtime.total_memory()! / 1024 / 1024} MB')
println('- Operating System: ${os.user_os()}')
println('\n> Test Time: ${time.now().format_ss_micro()}')
}

View file

@ -18,6 +18,15 @@ fn v_doctor() {
}
}
fn build_v_with_prealloc() {
exec('v -cg -cstrict -o vstrict1 cmd/v')
exec('./vstrict1 -o vprealloc -prealloc cmd/v')
exec('./vprealloc run examples/hello_world.v')
exec('./vprealloc -o v3 cmd/v')
exec('./v3 -o v4 cmd/v')
exec('./v4 -d debug_malloc -d debug_realloc -o vdebug1 cmd/v')
}
fn verify_v_test_works() {
exec('echo \$VFLAGS')
exec('v cmd/tools/test_if_v_test_system_works.v')
@ -48,12 +57,13 @@ fn run_essential_tests() {
}
const all_tasks = {
'v_doctor': Task{v_doctor, 'Run v doctor'}
'verify_v_test_works': Task{verify_v_test_works, 'Verify that v test works'}
'build_fast_script': Task{build_fast_script, 'Check that building fast.v works'}
'check_math': Task{check_math, 'Check the `math` module works'}
'check_compress': Task{check_compress, 'Check the `compress` module works'}
'run_essential_tests': Task{run_essential_tests, 'Run only the essential tests'}
'v_doctor': Task{v_doctor, 'Run v doctor'}
'build_v_with_prealloc': Task{build_v_with_prealloc, 'Build V with prealloc'}
'verify_v_test_works': Task{verify_v_test_works, 'Verify that v test works'}
'build_fast_script': Task{build_fast_script, 'Check that building fast.v works'}
'check_math': Task{check_math, 'Check the `math` module works'}
'check_compress': Task{check_compress, 'Check the `compress` module works'}
'run_essential_tests': Task{run_essential_tests, 'Run only the essential tests'}
}
common.run(all_tasks)

View file

@ -41,17 +41,23 @@ fn v_doctor() {
exec('v doctor')
}
fn build_v_with_prealloc() {
exec('v -cg -cstrict -o vstrict1 cmd/v')
exec('./vstrict1 -o vprealloc -prealloc cmd/v')
exec('./vprealloc run examples/hello_world.v')
exec('./vprealloc -o v3 cmd/v')
exec('./v3 -o v4 cmd/v')
exec('./v4 -d debug_malloc -d debug_realloc -o vdebug1 cmd/v')
}
//
// TCC job tasks
//
fn build_v_with_prealloc() {
exec('v -d debug_malloc -d debug_realloc -o vdebug1 cmd/v')
exec('v -cg -cstrict -o vstrict1 cmd/v')
exec('v -o vrealloc -prealloc cmd/v && ./vrealloc -o v3 cmd/v && ./v3 -o v4 cmd/v')
}
fn install_dependencies_for_examples_and_tools_tcc() {
if common.is_github_job {
exec('.github/workflows/disable_azure_mirror.sh')
}
exec('v retry -- sudo apt update')
exec('v retry -- sudo apt install --quiet -y libssl-dev sqlite3 libsqlite3-dev valgrind')
exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev')
@ -67,7 +73,9 @@ fn test_v_to_c_tcc() {
}
fn v_self_compilation_tcc() {
exec('v -o v2 cmd/v && ./v2 -o v3 cmd/v && ./v3 -o v4 cmd/v')
exec('v -o v2 cmd/v')
exec('./v2 -o v3 cmd/v')
exec('./v3 -o v4 cmd/v')
}
fn v_doctor_tcc() {
@ -120,16 +128,25 @@ fn test_v_tutorials_tcc() {
}
fn build_fast_tcc() {
exec('cd cmd/tools/fast && v fast.v && ./fast')
exec('cd cmd/tools/fast && v fast.v')
exec('cd cmd/tools/fast && ./fast')
}
fn v_self_compilation_usecache_tcc() {
exec('unset VFLAGS')
exec('v -usecache examples/hello_world.v && examples/hello_world')
exec('v wipe-cache')
exec('v -usecache examples/hello_world.v')
exec('./examples/hello_world')
exec('v wipe-cache')
exec('v -o v2 -usecache cmd/v')
exec('./v2 -o v3 -usecache cmd/v')
exec('./v3 version')
exec('v wipe-cache')
exec('./v3 -o tetris -usecache examples/tetris/tetris.v')
exec('rm -f ./examples/hello_world v2 v3 tetris')
}
fn test_password_input_tcc() {
@ -143,7 +160,8 @@ fn test_readline_tcc() {
fn test_leak_detector_tcc() {
exec('v -gc boehm_leak -o testcase_leak vlib/v/tests/testcase_leak.vv')
exec('./testcase_leak 2>leaks.txt')
exec('grep "Found 1 leaked object" leaks.txt && grep -P ", sz=\\s?1000," leaks.txt')
exec('grep "Found 1 leaked object" leaks.txt')
exec('grep -P ", sz=\\s?1000," leaks.txt')
}
fn test_leak_detector_not_active_tcc() {
@ -161,6 +179,9 @@ fn all_code_is_formatted_gcc() {
}
fn install_dependencies_for_examples_and_tools_gcc() {
if common.is_github_job {
exec('.github/workflows/disable_azure_mirror.sh')
}
exec('v retry -- sudo apt update')
exec('v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind')
exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev')
@ -190,13 +211,18 @@ fn v_self_compilation_gcc() {
fn v_self_compilation_usecache_gcc() {
exec('unset VFLAGS')
exec('v wipe-cache')
exec('v -usecache examples/hello_world.v')
exec('examples/hello_world')
exec('v wipe-cache')
exec('v -o v2 -usecache cmd/v')
exec('./v2 -o v3 -usecache cmd/v')
exec('./v3 version')
exec('v wipe-cache')
exec('./v3 -o tetris -usecache examples/tetris/tetris.v')
exec('rm -f ./examples/hello_world v2 v3 tetris')
}
fn verify_v_test_works_gcc() {
@ -226,10 +252,12 @@ fn build_examples_gcc() {
fn build_tetris_autofree_gcc() {
exec('v -autofree -o tetris examples/tetris/tetris.v')
exec('rm -f tetris')
}
fn build_blog_autofree_gcc() {
exec('v -autofree -o blog tutorials/building_a_simple_web_blog_with_veb/code/blog')
exec('rm -f blog')
}
fn build_option_test_autofree_gcc() {
@ -238,6 +266,7 @@ fn build_option_test_autofree_gcc() {
fn v_self_compilation_parallel_cc_gcc() {
exec('v -o v2 -parallel-cc cmd/v')
exec('rm -f v2')
}
fn build_modules_gcc() {
@ -273,6 +302,9 @@ fn all_code_is_formatted_clang() {
}
fn install_dependencies_for_examples_and_tools_clang() {
if common.is_github_job {
exec('.github/workflows/disable_azure_mirror.sh')
}
exec('v retry -- sudo apt update')
exec('v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind')
exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev')
@ -281,10 +313,12 @@ fn install_dependencies_for_examples_and_tools_clang() {
fn recompile_v_with_cstrict_clang() {
exec('v -cc clang -cg -cstrict -o vstrict cmd/v')
exec('rm -f vstrict')
}
fn valgrind_clang() {
exec('valgrind --error-exitcode=1 v -o v.c cmd/v')
exec('rm -f v.c')
}
fn run_sanitizers_clang() {
@ -292,16 +326,26 @@ fn run_sanitizers_clang() {
}
fn v_self_compilation_clang() {
exec('v -o v2 cmd/v && ./v2 -o v3 cmd/v && ./v3 -o v4 cmd/v')
exec('v -o v2 cmd/v')
exec('./v2 -o v3 cmd/v')
exec('./v3 -o v4 cmd/v')
}
fn v_self_compilation_usecache_clang() {
exec('unset VFLAGS')
exec('v -usecache examples/hello_world.v && examples/hello_world')
exec('v wipe-cache')
exec('v -usecache examples/hello_world.v')
exec('./examples/hello_world')
exec('v wipe-cache')
exec('v -o v2 -usecache cmd/v')
exec('./v2 -o v3 -usecache cmd/v')
exec('./v3 version')
exec('v wipe-cache')
exec('./v3 -o tetris -usecache examples/tetris/tetris.v')
exec('rm -f ./examples/hello_world v2 v3 tetris')
}
fn verify_v_test_works_clang() {
@ -331,6 +375,7 @@ fn build_examples_clang() {
fn build_examples_autofree_clang() {
exec('v -autofree -experimental -o tetris examples/tetris/tetris.v')
exec('rm -f tetris')
}
fn build_modules_clang() {
@ -350,9 +395,11 @@ fn build_modules_clang() {
}
fn native_machine_code_generation_common() {
exec('v -o vprod -prod cmd/v')
exec('cd cmd/tools && ../../vprod gen1m.v && ./gen1m > 1m.v')
exec('cd cmd/tools && ../../vprod -backend native -o 1m 1m.v && ./1m && ls -larS 1m*')
exec('cd cmd/tools && v gen1m.v')
exec('cd cmd/tools && ./gen1m > 1m.v')
exec('cd cmd/tools && v -backend native -o 1m 1m.v')
exec('cd cmd/tools && ./1m && ls -larS 1m*')
exec('cd cmd/tools && rm -f ./1m ./1m.v')
}
fn native_machine_code_generation_gcc() {
@ -373,8 +420,8 @@ fn native_cross_compilation_to_macos() {
// Collect all tasks
//
const all_tasks = {
// tcc tasks
'build_v_with_prealloc': Task{build_v_with_prealloc, 'Build V with prealloc'}
// tcc tasks
'all_code_is_formatted_tcc': Task{all_code_is_formatted, 'All code is formatted (tcc)'}
'install_dependencies_for_examples_and_tools_tcc': Task{install_dependencies_for_examples_and_tools_tcc, 'Install deps for examples/tools (tcc)'}
'test_v_to_c_tcc': Task{test_v_to_c_tcc, 'Test v->c with tcc'}

View file

@ -87,9 +87,20 @@ fn v_doctor() {
exec('v doctor')
}
fn build_v_with_prealloc() {
exec('v -cg -cstrict -o vstrict1 cmd/v')
exec('./vstrict1 -d debug_malloc -d debug_realloc -o vdebug1 cmd/v')
exec('./vstrict1 -o vprealloc -prealloc cmd/v')
// TODO: fix prealloc on macos (the rwmutex implementation for shared maps there seems to require that mutexes are allocated by C.malloc directly, and segfaults for arbitrary memory addresses)
// exec('./vprealloc run examples/hello_world.v')
// exec('./vprealloc -o v3 cmd/v')
// exec('./v3 -o v4 cmd/v')
}
fn v_self_compilation_usecache() {
exec('unset VFLAGS')
exec('v -usecache examples/hello_world.v && examples/hello_world')
exec('v -usecache examples/hello_world.v')
exec('./examples/hello_world')
exec('v -o v2 -usecache cmd/v')
exec('./v2 -o v3 -usecache cmd/v')
exec('./v3 version')
@ -128,6 +139,7 @@ const all_tasks = {
'build_examples_prod': Task{build_examples_prod, 'Build examples with -prod'}
'build_examples_v_compiled_with_tcc': Task{build_examples_v_compiled_with_tcc, 'Build examples with V build with tcc'}
'v_doctor': Task{v_doctor, 'v doctor'}
'build_v_with_prealloc': Task{build_v_with_prealloc, 'Build V with prealloc'}
'v_self_compilation_usecache': Task{v_self_compilation_usecache, 'V self compilation with -usecache'}
'v_self_compilation_parallel_cc': Task{v_self_compilation_parallel_cc, 'V self compilation with -parallel-cc'}
'test_password_input': Task{test_password_input, 'Test password input'}

View file

@ -596,6 +596,7 @@ fn (t Tree) fn_decl(node ast.FnDecl) &Node {
obj.add_terse('is_variadic', t.bool_node(node.is_variadic))
obj.add('is_anon', t.bool_node(node.is_anon))
obj.add_terse('is_noreturn', t.bool_node(node.is_noreturn))
obj.add_terse('is_weak', t.bool_node(node.is_weak))
obj.add_terse('is_manualfree', t.bool_node(node.is_manualfree))
obj.add('is_main', t.bool_node(node.is_main))
obj.add('is_test', t.bool_node(node.is_test))
@ -605,6 +606,7 @@ fn (t Tree) fn_decl(node ast.FnDecl) &Node {
obj.add_terse('is_unsafe', t.bool_node(node.is_unsafe))
obj.add_terse('is_markused', t.bool_node(node.is_markused))
obj.add_terse('is_file_translated', t.bool_node(node.is_file_translated))
obj.add_terse('is_closure', t.bool_node(node.is_closure))
obj.add_terse('receiver', t.struct_field(node.receiver))
obj.add('receiver_pos', t.pos(node.receiver_pos))
obj.add_terse('is_method', t.bool_node(node.is_method))
@ -728,6 +730,7 @@ fn (t Tree) enum_decl(node ast.EnumDecl) &Node {
obj.add('comments', t.array_node_comment(node.comments))
obj.add_terse('attrs', t.array_node_attr(node.attrs))
obj.add_terse('typ', t.type_node(node.typ))
obj.add_terse('enum_typ', t.type_node(node.enum_typ))
return obj
}
@ -838,6 +841,8 @@ fn (t Tree) global_field(node ast.GlobalField) &Node {
obj.add_terse('typ', t.type_node(node.typ))
obj.add_terse('has_expr', t.bool_node(node.has_expr))
obj.add_terse('is_markused', t.bool_node(node.is_markused))
obj.add_terse('is_weak', t.bool_node(node.is_weak))
obj.add_terse('is_hidden', t.bool_node(node.is_hidden))
obj.add('comments', t.array_node_comment(node.comments))
obj.add('pos', t.pos(node.pos))
obj.add('typ_pos', t.pos(node.typ_pos))
@ -892,6 +897,7 @@ fn (t Tree) fn_type_decl(node ast.FnTypeDecl) &Node {
mut obj := create_object()
obj.add_terse('ast_type', t.string_node('FnTypeDecl'))
obj.add_terse('name', t.string_node(node.name))
obj.add_terse('mod', t.string_node(node.mod))
obj.add_terse('is_pub', t.bool_node(node.is_pub))
obj.add_terse('typ', t.type_node(node.typ))
obj.add('pos', t.pos(node.pos))
@ -1072,13 +1078,13 @@ fn (t Tree) comptime_call(node ast.ComptimeCall) &Node {
mut obj := create_object()
obj.add_terse('ast_type', t.string_node('ComptimeCall'))
obj.add_terse('method_name', t.string_node(node.method_name))
obj.add_terse('kind', t.enum_node(node.kind))
obj.add_terse('left', t.expr(node.left))
obj.add_terse('is_vweb', t.bool_node(node.is_vweb))
obj.add_terse('is_veb', t.bool_node(node.is_veb))
obj.add_terse('veb_tmpl', t.string_node(node.veb_tmpl.path))
obj.add_terse('args_var', t.string_node(node.args_var))
obj.add_terse('has_parens', t.bool_node(node.has_parens))
obj.add_terse('is_embed', t.bool_node(node.is_embed))
obj.add_terse('embed_file', t.embed_file(node.embed_file))
obj.add('method_pos', t.pos(node.method_pos))
obj.add_terse('left_type', t.type_node(node.left_type))
@ -1468,6 +1474,7 @@ fn (t Tree) index_expr(node ast.IndexExpr) &Node {
obj.add_terse('is_setter', t.bool_node(node.is_setter))
obj.add_terse('is_direct', t.bool_node(node.is_direct))
obj.add_terse('or_expr', t.or_expr(node.or_expr))
obj.add_terse('typ', t.type_node(node.typ))
obj.add('pos', t.pos(node.pos))
return obj
}
@ -1535,7 +1542,6 @@ fn (t Tree) if_branch(node ast.IfBranch) &Node {
obj.add_terse('cond', t.expr(node.cond))
obj.add('pos', t.pos(node.pos))
obj.add('body_pos', t.pos(node.body_pos))
obj.add_terse('pkg_exist', t.bool_node(node.pkg_exist))
obj.add_terse('stmts', t.array_node_stmt(node.stmts))
obj.add('scope', t.number_node(int(node.scope)))
obj.add('comments', t.array_node_comment(node.comments))
@ -1608,6 +1614,7 @@ fn (t Tree) call_expr(node ast.CallExpr) &Node {
obj.add_terse('is_ctor_new', t.bool_node(node.is_ctor_new))
obj.add_terse('is_return_used', t.bool_node(node.is_return_used))
obj.add_terse('is_static_method', t.bool_node(node.is_static_method))
obj.add_terse('is_variadic', t.bool_node(node.is_variadic))
obj.add('should_be_skipped', t.bool_node(node.should_be_skipped))
obj.add_terse('free_receiver', t.bool_node(node.free_receiver))
obj.add('scope', t.number_node(int(node.scope)))
@ -1643,6 +1650,7 @@ fn (t Tree) or_expr(node ast.OrExpr) &Node {
obj.add_terse('stmts', t.array_node_stmt(node.stmts))
obj.add_terse('kind', t.enum_node(node.kind))
obj.add('pos', t.pos(node.pos))
obj.add('scope', t.number_node(int(node.scope)))
return obj
}

View file

@ -79,8 +79,10 @@ fn (vd &VDoc) render_search_index(out Output) {
}
js_search_index.writeln('];\n')
js_search_data.writeln('];\n')
final := js_search_index.str() + js_search_data.str()
out_file_path := os.join_path(out.path, 'search_index.js')
os.write_file(out_file_path, js_search_index.str() + js_search_data.str()) or { panic(err) }
println('Generating search_index.js of ${final.len:8} bytes in `${out_file_path} ...')
os.write_file(out_file_path, final) or { panic(err) }
}
fn (mut vd VDoc) render_static_html(out Output) {
@ -115,7 +117,7 @@ fn (vd &VDoc) get_resource(name string, out Output) string {
} else {
output_path := os.join_path(out.path, name)
if !os.exists(output_path) {
println('Generating ${out.typ} in "${output_path}"')
println('Copying ${res.len:8} bytes from `${path}` to `${output_path}` ...')
os.write_file(output_path, res) or { panic(err) }
}
return name
@ -180,14 +182,14 @@ fn (vd &VDoc) write_content(cn &doc.DocNode, d &doc.Doc, mut hw strings.Builder)
src_link := get_src_link(vd.manifest.repo_url, vd.manifest.repo_branch, file_path_name,
cn.pos.line_nr + 1)
if cn.content.len != 0 || cn.name == 'Constants' {
hw.write_string(doc_node_html(cn, src_link, false, cfg.include_examples, d.table))
hw.write_string(vd.doc_node_html(cn, src_link, false, cfg.include_examples, d.table))
hw.write_string('\n')
}
for child in cn.children {
child_file_path_name := child.file_path.replace('${base_dir}/', '')
child_src_link := get_src_link(vd.manifest.repo_url, vd.manifest.repo_branch,
child_file_path_name, child.pos.line_nr + 1)
hw.write_string(doc_node_html(child, child_src_link, false, cfg.include_examples,
hw.write_string(vd.doc_node_html(child, child_src_link, false, cfg.include_examples,
d.table))
hw.write_string('\n')
}
@ -200,7 +202,7 @@ fn (vd &VDoc) gen_html(d doc.Doc) string {
mut contents := strings.new_builder(200)
dcs_contents := d.contents.arr()
// generate toc first
contents.writeln(doc_node_html(d.head, '', true, cfg.include_examples, d.table))
contents.writeln(vd.doc_node_html(d.head, '', true, cfg.include_examples, d.table))
if is_module_readme(d.head) {
write_toc(d.head, mut symbols_toc)
}
@ -384,6 +386,7 @@ fn write_token(tok token.Token, typ HighlightTokenTyp, mut buf strings.Builder)
fn html_highlight(code string, tb &ast.Table) string {
mut s := scanner.new_scanner(code, .parse_comments, &pref.Preferences{ output_mode: .silent })
mut tok := s.scan()
mut prev_tok := tok
mut next_tok := s.scan()
mut buf := strings.new_builder(200)
mut i := 0
@ -490,6 +493,9 @@ fn html_highlight(code string, tb &ast.Table) string {
// html documentation outputs / its style rules will affect the readme.
buf.write_string("'${html.escape(tok.lit.str())}'")
} else {
if final_tok_typ == .string && prev_tok.lit == 'return' {
buf.write_string(' ')
}
write_token(tok, tok_typ, mut buf)
}
buf.write_string('</span>')
@ -506,14 +512,14 @@ fn html_highlight(code string, tb &ast.Table) string {
if i - 1 == next_tok.pos {
i--
}
prev_tok = tok
tok = next_tok
next_tok = s.scan()
}
return buf.str()
}
fn doc_node_html(dn doc.DocNode, link string, head bool, include_examples bool, tb &ast.Table) string {
fn (vd &VDoc) doc_node_html(dn doc.DocNode, link string, head bool, include_examples bool, tb &ast.Table) string {
mut dnw := strings.new_builder(200)
head_tag := if head { 'h1' } else { 'h2' }
mut renderer := markdown.HtmlRenderer{

View file

@ -10,12 +10,19 @@ const vexe = os.getenv_opt('VEXE') or { @VEXE }
const vroot = os.dir(vexe)
const allowed_formats = ['md', 'markdown', 'json', 'text', 'ansi', 'html', 'htm']
const allowed_formats = ['md', 'markdown', 'json', 'text', 'ansi', 'html', 'htm', 'none']
enum RunExampleMode {
skip
run
check
}
struct Config {
mut:
pub_only bool = true
show_loc bool // for plaintext
show_time bool // show the total time spend generating content
is_color bool
is_multi bool
is_vlib bool
@ -31,7 +38,8 @@ mut:
input_path string
symbol_name string
platform doc.Platform
run_examples bool // `-run-examples` will run all `// Example: assert mod.abc() == y` comments in the processed modules
run_examples RunExampleMode // `-unsafe-run-examples` will run all `// Example: assert mod.abc() == y` comments in the processed modules.
// -check-examples will only check/validate that they compile, but without running any code.
// The options below are useful for generating a more stable HTML, that is easier to regression test:
html_only_contents bool // `-html-only-contents` will produce only the content of any given page, without styling tags etc.
html_no_vhash bool // `-html-no-vhash` will remove the version hash from the generated html
@ -42,6 +50,7 @@ mut:
}
fn main() {
unbuffer_stdout() // avoid the need for flush_stdout() calls
if os.args.len < 2 || '-h' in os.args || '-help' in os.args || '--help' in os.args
|| os.args[1..] == ['doc', 'help'] {
os.system('${os.quoted_path(vexe)} help doc')
@ -60,8 +69,7 @@ fn main() {
}
vd.vprintln('Setting output type to "${cfg.output_type}"')
vd.generate_docs_from_file()
if cfg.run_examples {
println('')
if cfg.run_examples != .skip {
if vd.example_oks == 0 && vd.example_failures == 0 {
println(term.colorize(term.bright_yellow, 'Found NO examples.'))
} else {
@ -136,8 +144,19 @@ fn parse_arguments(args []string) Config {
cfg.platform = selected_platform
i++
}
'-time' {
cfg.show_time = true
}
'-check-examples' {
cfg.run_examples = .check
}
'-unsafe-run-examples' {
cfg.run_examples = .run
}
'-run-examples' {
cfg.run_examples = true
eprintln('WARNING: the `-run-examples` option is deprecated, and will be removed after 2025-11-13.')
eprintln(' Use `-unsafe-run-examples` instead of `-run-examples` .')
cfg.run_examples = .run
}
'-no-timestamp' {
cfg.no_timestamp = true

View file

@ -2,12 +2,21 @@ module main
import document as doc
import v.vmod
import strings
import os
import rand
import term
fn (mut vd VDoc) process_all_examples(contents []doc.DocNode) {
for cn in contents {
if cn.content.len > 0 {
vd.run_examples(cn)
}
vd.process_all_examples(cn.children)
}
}
const normalised_default_vmodules_path = os.vmodules_dir().replace('\\', '/')
const vdoc_max_fails = os.getenv_opt('VDOC_MAX_FAILS') or { '999' }.int()
fn get_mod_name_by_file_path(file_path string) string {
mut mcache := vmod.get_cache()
@ -23,10 +32,15 @@ fn get_mod_name_by_file_path(file_path string) string {
return mod_name
}
fn (mut vd VDoc) run_examples(dn doc.DocNode, mut pw strings.Builder) {
if dn.comments.len == 0 || !vd.cfg.run_examples {
fn (mut vd VDoc) run_examples(dn doc.DocNode) {
if dn.comments.len == 0 || vd.cfg.run_examples == .skip {
return
}
voptions := match vd.cfg.run_examples {
.run { ' -g run ' }
.check { '-N -W -check' }
.skip { '' }
}
examples := dn.examples()
if examples.len == 0 {
return
@ -38,28 +52,35 @@ fn (mut vd VDoc) run_examples(dn doc.DocNode, mut pw strings.Builder) {
os.rm(sfile) or {}
}
}
mut failures := 0
mut oks := 0
for example in examples {
if vd.example_failures >= vdoc_max_fails {
eprintln('> vdoc: too many examples failed in ${vd.cfg.run_examples} mode')
exit(1)
}
code := example.all_after('Example:').all_after('example:').trim_space()
mod_name := get_mod_name_by_file_path(dn.file_path)
vsource_path := os.join_path(efolder, 'example_${rand.ulid()}.v')
// eprintln('>>> example dn.file_path: ${dn.file_path} | mod_name: ${mod_name} | vsource_path: ${vsource_path} | code: `${code}`')
import_clause := if mod_name in ['builtin', ''] { '' } else { 'import ${mod_name}\n' }
source := '${import_clause}fn main() {\n\t${code}\n}\n'
source := if import_clause != '' && !code.contains('import ') {
'${import_clause}fn main() {\n\t${code}\n}\n'
} else {
code
}
os.write_file(vsource_path, source) or { continue }
cmd := '${os.quoted_path(vexe)} -g run ${os.quoted_path(vsource_path)}'
vd.vprintln('>>> vd.example_oks: ${vd.example_oks:5} | vd.example_failures: ${vd.example_failures:5} | examples.len: ${examples.len} | source.len: ${source.len:5} | dn.name: ${dn.name}')
cmd := '${os.quoted_path(vexe)} ${voptions} ${os.quoted_path(vsource_path)}'
res := os.execute(cmd)
if res.exit_code != 0 {
eprintln('${dn_to_location(dn)}:${term.ecolorize(term.red, 'error in documentation example')}')
eprintln('cmd: ${cmd}')
eprintln('result: ${res.output}')
failures++
eprintln(' cmd: ${cmd}')
eprintln(' example line: ${term.colorize(term.bright_yellow, example)}')
eprintln(' result:')
eprintln(res.output)
vd.example_failures++
continue
}
example_program_source_files << vsource_path
oks++
vd.example_oks++
}
vd.example_failures += failures
vd.example_oks += oks
}

View file

@ -11,6 +11,32 @@ This is a script `<script>console.log('hi from README.md');</script>` .
## Examples
### Functions that return different literals:
Example of a function returning boolean:
```v
fn is_odd(x int) bool {
if x % 2 == 0 {
return false
}
return true
}
```
Another example of a function returning a string:
```v
fn answer() string {
return '42'
}
```
This example shows a function returning a string with interpolation:
```v
fn str_with_interplation() string {
return 'this string has ${42:6} interpolation in it.'
}
```
### Processing command line args
```v

View file

@ -5,6 +5,25 @@ This is a link to the main V site.
This is a bold text.
This is a script <script>console.log('hi from README.md');</script> .
Examples
Functions that return different literals:
Example of a function returning boolean:
fn is_odd(x int) bool {
if x % 2 == 0 {
return false
}
return true
}
Another example of a function returning a string:
fn answer() string {
return '42'
}
This example shows a function returning a string with interpolation:
fn str_with_interplation() string {
return 'this string has ${42:6} interpolation in it.'
}
Processing command line args
import os
@ -150,6 +169,32 @@ The End.
## Examples
### Functions that return different literals:
Example of a function returning boolean:
```v
fn is_odd(x int) bool {
if x % 2 == 0 {
return false
}
return true
}
```
Another example of a function returning a string:
```v
fn answer() string {
return '42'
}
```
This example shows a function returning a string with interpolation:
```v
fn str_with_interplation() string {
return 'this string has ${42:6} interpolation in it.'
}
```
### Processing command line args
```v

View file

@ -1,6 +1,29 @@
<section id="readme_main" class="doc-node">
<div class="title"><h1> main <a href="#readme_main">#</a></h1></div>
<h2>Description</h2><p>This is an example of a an .md file, used for adding more rich text documentation in a project or module.</p><p>This is a <a href="https://vlang.io/">link</a> to the main V site.</p><p>This is a <b>bold text</b>.</p><p>This is a script <code>&lt;script&gt;console.log('hi from README.md');&lt;/script&gt;</code> .</p><h2>Examples</h2><h3>Processing command line args</h3><pre><code class="language-v"><span class="token keyword">import</span> os
<h2 id="description">Description</h2>
<p>This is an example of a an .md file, used for adding more rich text documentation in a project or module.</p>
<p>This is a <a href="https://vlang.io/">link</a> to the main V site.</p>
<p>This is a <b>bold text</b>.</p>
<p>This is a script <code>&lt;script&gt;console.log('hi from README.md');&lt;/script&gt;</code> .</p>
<h2 id="examples">Examples</h2>
<h3 id="functions-that-return-different-literals">Functions that return different literals:</h3>
<p>Example of a function returning boolean:</p>
<pre><code class="language-v"><span class="token keyword">fn</span> <span class="token function">is_odd</span><span class="token punctuation">(</span>x <span class="token builtin">int</span><span class="token punctuation">)</span> <span class="token builtin">bool</span> <span class="token punctuation">{</span>
<span class="token keyword">if</span> x <span class="token operator">%</span> <span class="token number">2</span> <span class="token operator">==</span> <span class="token number">0</span> <span class="token punctuation">{</span>
<span class="token keyword">return</span> <span class="token boolean">false</span>
<span class="token punctuation">}</span>
<span class="token keyword">return</span> <span class="token boolean">true</span>
<span class="token punctuation">}</span></code></pre>
<p>Another example of a function returning a string:</p>
<pre><code class="language-v"><span class="token keyword">fn</span> <span class="token function">answer</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token builtin">string</span> <span class="token punctuation">{</span>
<span class="token keyword">return</span> <span class="token string">'42'</span>
<span class="token punctuation">}</span></code></pre>
<p>This example shows a function returning a string with interpolation:</p>
<pre><code class="language-v"><span class="token keyword">fn</span> <span class="token function">str_with_interplation</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token builtin">string</span> <span class="token punctuation">{</span>
<span class="token keyword">return</span><span class="token string"> 'this string has </span><span class="token string_interp">$</span>{<span class="token number">42</span><span class="token punctuation">:</span><span class="token number">6</span>}<span class="token string"> interpolation in it.'</span>
<span class="token punctuation">}</span></code></pre>
<h3 id="processing-command-line-args">Processing command line args</h3>
<pre><code class="language-v"><span class="token keyword">import</span> os
<span class="token keyword">fn</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">dump</span><span class="token punctuation">(</span>os<span class="token punctuation">.</span>args<span class="token punctuation">)</span>
@ -14,7 +37,9 @@
ch <span class="token operator">:=</span> <span class="token builtin">chan</span> <span class="token builtin">bool</span><span class="token punctuation">{</span>cap<span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">}</span>
ch <span class="token operator"><-</span> <span class="token boolean">true</span>
<span class="token punctuation">}</span></code></pre><h3>A JWT example (test syntax highlighting)</h3><pre><code class="language-v"><span class="token keyword">import</span> crypto<span class="token punctuation">.</span>hmac
<span class="token punctuation">}</span></code></pre>
<h3 id="a-jwt-example-test-syntax-highlighting">A JWT example (test syntax highlighting)</h3>
<pre><code class="language-v"><span class="token keyword">import</span> crypto<span class="token punctuation">.</span>hmac
<span class="token keyword">import</span> crypto<span class="token punctuation">.</span>sha256
<span class="token keyword">import</span> encoding<span class="token punctuation">.</span>base64
<span class="token keyword">import</span> json
@ -57,7 +82,9 @@
sha256<span class="token punctuation">.</span>sum<span class="token punctuation">,</span> sha256<span class="token punctuation">.</span>block_size<span class="token punctuation">)</span>
signature_from_token <span class="token operator">:=</span> base64<span class="token punctuation">.</span><span class="token function">url_decode</span><span class="token punctuation">(</span>token_split<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token keyword">return</span> hmac<span class="token punctuation">.</span><span class="token function">equal</span><span class="token punctuation">(</span>signature_from_token<span class="token punctuation">,</span> signature_mirror<span class="token punctuation">)</span>
<span class="token punctuation">}</span></code></pre><h3>Other language specifiers</h3><pre><code class="language-cpp">##
<span class="token punctuation">}</span></code></pre>
<h3 id="other-language-specifiers">Other language specifiers</h3>
<pre><code class="language-cpp">##
std<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token builtin">map</span><span class="token operator"><</span>std<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token builtin">string</span><span class="token punctuation">,</span> <span class="token builtin">int</span><span class="token operator">></span> <span class="token symbol">my_map</span> <span class="token punctuation">{</span>
<span class="token punctuation">{</span><span class="token string">'KEY_1'</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span><span class="token string">'KEY_2'</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
@ -66,8 +93,11 @@ std<span class="token punctuation">:</span><span class="token punctuation">:</sp
<span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">const</span> auto <span class="token operator">&</span><span class="token punctuation">[</span>key<span class="token punctuation">,</span> value<span class="token punctuation">]</span> <span class="token punctuation">:</span> my_map<span class="token punctuation">)</span> <span class="token punctuation">{</span>
std<span class="token punctuation">:</span><span class="token punctuation">:</span>cout <span class="token operator"><<</span> key <span class="token operator"><<</span> <span class="token string">': '</span> <span class="token operator"><<</span> value <span class="token operator"><<</span> <span class="token string">', '</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
std<span class="token punctuation">:</span><span class="token punctuation">:</span>cout <span class="token operator"><<</span> <span class="token string">'\n'</span><span class="token punctuation">;</span></code></pre><pre><code class="language-v">doc1 <span class="token operator">:=</span> toml<span class="token punctuation">.</span><span class="token function">parse_text</span><span class="token punctuation">(</span><span class="token operator"><</span><span class="token builtin">string</span> content<span class="token operator">></span><span class="token punctuation">)</span> <span class="token keyword">or</span> <span class="token punctuation">{</span> <span class="token function">panic</span><span class="token punctuation">(</span>err<span class="token punctuation">)</span> <span class="token punctuation">}</span>
doc2 <span class="token operator">:=</span> toml<span class="token punctuation">.</span><span class="token function">parse_file</span><span class="token punctuation">(</span><span class="token operator"><</span>file path<span class="token operator">></span><span class="token punctuation">)</span> <span class="token keyword">or</span> <span class="token punctuation">{</span> <span class="token function">panic</span><span class="token punctuation">(</span>err<span class="token punctuation">)</span> <span class="token punctuation">}</span></code></pre><h3>Escape html in strings</h3><pre><code class="language-v"><span class="token keyword">const</span> html <span class="token operator">=</span> <span class="token string">'&lt;!DOCTYPE html&gt;
std<span class="token punctuation">:</span><span class="token punctuation">:</span>cout <span class="token operator"><<</span> <span class="token string">'\n'</span><span class="token punctuation">;</span></code></pre>
<pre><code class="language-v">doc1 <span class="token operator">:=</span> toml<span class="token punctuation">.</span><span class="token function">parse_text</span><span class="token punctuation">(</span><span class="token operator"><</span><span class="token builtin">string</span> content<span class="token operator">></span><span class="token punctuation">)</span> <span class="token keyword">or</span> <span class="token punctuation">{</span> <span class="token function">panic</span><span class="token punctuation">(</span>err<span class="token punctuation">)</span> <span class="token punctuation">}</span>
doc2 <span class="token operator">:=</span> toml<span class="token punctuation">.</span><span class="token function">parse_file</span><span class="token punctuation">(</span><span class="token operator"><</span>file path<span class="token operator">></span><span class="token punctuation">)</span> <span class="token keyword">or</span> <span class="token punctuation">{</span> <span class="token function">panic</span><span class="token punctuation">(</span>err<span class="token punctuation">)</span> <span class="token punctuation">}</span></code></pre>
<h3 id="escape-html-in-strings">Escape html in strings</h3>
<pre><code class="language-v"><span class="token keyword">const</span> html <span class="token operator">=</span> <span class="token string">'&lt;!DOCTYPE html&gt;
&lt;html lang=&#34;en&#34;&gt;
&lt;head&gt;
&lt;style&gt;
@ -90,20 +120,33 @@ doc2 <span class="token operator">:=</span> toml<span class="token punctuation">
console.log(res);
}
&lt;/script&gt;
&lt;/html&gt;'</span></code></pre><ul><li>Regular markdown list point 1</li><li>List point 2</li><li>List point 3</li></ul><ol><li>Numbered markdown list point 1</li><li>List point 2</li><li>List point 3</li></ol><p>A code block without a specific language should be rendered verbatim:</p><pre><code>.
&lt;/html&gt;'</span></code></pre>
<ul>
<li>Regular markdown list point 1</li>
<li>List point 2</li>
<li>List point 3</li></ul>
<ol>
<li>Numbered markdown list point 1</li>
<li>List point 2</li>
<li>List point 3</li></ol>
<p>A code block without a specific language should be rendered verbatim:</p>
<pre><code>.
├── static/
│ ├── css/
│ │ └── main.css
│ └── js/
│ └── main.js
└── main.v
</code></pre><p>The s tags here in the code block, should be rendered verbatim, not interpreted as HTML ones:</p><pre><code>h:m:s // 5:02:33
</code></pre>
<p>The s tags here in the code block, should be rendered verbatim, not interpreted as HTML ones:</p>
<pre><code>h:m:s // 5:02:33
m:s.mi&lt;s&gt; // 2:33.015
s.mi&lt;s&gt; // 33.015s
mi.mc&lt;ms&gt; // 15.007ms
mc.ns&lt;ns&gt; // 7.234us
ns&lt;ns&gt; // 234ns
</code></pre><p>The End.</p>
</code></pre>
<p>The End.</p>
</section>

View file

@ -11,6 +11,32 @@ module main
## Examples
### Functions that return different literals:
Example of a function returning boolean:
```v
fn is_odd(x int) bool {
if x % 2 == 0 {
return false
}
return true
}
```
Another example of a function returning a string:
```v
fn answer() string {
return '42'
}
```
This example shows a function returning a string with interpolation:
```v
fn str_with_interplation() string {
return 'this string has ${42:6} interpolation in it.'
}
```
### Processing command line args
```v

View file

@ -1 +1,18 @@
hello from readme
Example:
```v
fn is_odd(x int) bool {
if x % 2 == 0 {
return false
}
return true
}
```
Another example:
```v
fn answer() string {
return '42'
}
```

View file

@ -1,4 +1,16 @@
hello from readme
Example:
fn is_odd(x int) bool {
if x % 2 == 0 {
return false
}
return true
}
Another example:
fn answer() string {
return '42'
}
module foo
fn bar()

View file

@ -1,5 +1,5 @@
module main
fn abc()
abc just prints 'xyz'. The important thing however is the next line, that does an assertion, that should FAIL to be executed with `v doc -run-examples good.v`:
abc just prints 'xyz'. The important thing however is the next line, that does an assertion, that should FAIL to be executed with `v doc -unsafe-run-examples main.v`, and should compile with -check-examples:
Example: assert 5 * 5 == 77

View file

@ -1,5 +1,5 @@
// abc just prints 'xyz'. The important thing however is the next line, that does an assertion,
// that should FAIL to be executed with `v doc -run-examples good.v`:
// that should FAIL to be executed with `v doc -unsafe-run-examples main.v`, and should compile with -check-examples:
// Example: assert 5 * 5 == 77
pub fn abc() {
println('xyz')

View file

@ -747,6 +747,9 @@ button.copy {
padding: 0 1rem;
justify-content: space-between;
}
.doc-content > .doc-node > .title {
margin-top: 3.5em;
}
}
@media (min-width: 1024px) {

View file

@ -73,6 +73,7 @@ fn set_output_type_from_str(format string) OutputType {
'md', 'markdown' { .markdown }
'json' { .json }
'text' { .plaintext }
'none' { .none }
else { .ansi }
}
}

View file

@ -19,6 +19,7 @@ struct Readme {
enum OutputType {
unset
none
html
markdown
json
@ -143,7 +144,6 @@ fn (mut vd VDoc) write_plaintext_content(contents []doc.DocNode, mut pw strings.
}
}
}
vd.run_examples(cn, mut pw)
}
vd.write_plaintext_content(cn.children, mut pw)
}
@ -152,11 +152,14 @@ fn (mut vd VDoc) write_plaintext_content(contents []doc.DocNode, mut pw strings.
fn (mut vd VDoc) render_doc(d doc.Doc, out Output) (string, string) {
name := vd.get_file_name(d.head.name, out)
output := match out.typ {
.none { '' }
.html { vd.gen_html(d) }
.markdown { vd.gen_markdown(d, true) }
.json { vd.gen_json(d) }
else { vd.gen_plaintext(d) }
}
contents := d.contents.arr()
vd.process_all_examples(contents)
return name, output
}
@ -188,12 +191,12 @@ fn (mut vd VDoc) work_processor(mut work sync.Channel, mut wg sync.WaitGroup) {
break
}
vd.vprintln('> start processing ${pdoc.d.base_path} ...')
flush_stdout()
file_name, content := vd.render_doc(pdoc.d, pdoc.out)
output_path := os.join_path(pdoc.out.path, file_name)
println('Generating ${pdoc.out.typ} in "${output_path}"')
flush_stdout()
os.write_file(output_path, content) or { panic(err) }
if vd.cfg.output_type != .none {
output_path := os.join_path(pdoc.out.path, file_name)
println('Generating ${content.len:8} bytes of ${pdoc.out.typ} in `${output_path}` ...')
os.write_file(output_path, content) or { panic(err) }
}
}
wg.done()
}
@ -278,6 +281,13 @@ fn (vd &VDoc) emit_generate_err(err IError) {
}
fn (mut vd VDoc) generate_docs_from_file() {
sw := time.new_stopwatch()
defer {
if vd.cfg.show_time {
println('Generation took: ${sw.elapsed().milliseconds()} ms.')
}
}
cfg := vd.cfg
mut out := Output{
path: cfg.output_path
@ -295,7 +305,7 @@ fn (mut vd VDoc) generate_docs_from_file() {
ext := os.file_ext(out.path)
out.typ = set_output_type_from_str(ext.all_after('.'))
}
if cfg.include_readme && out.typ !in [.html, .ansi, .plaintext] {
if cfg.include_readme && out.typ !in [.html, .ansi, .plaintext, .none] {
eprintln('vdoc: Including README.md for doc generation is supported on HTML output, or when running directly in the terminal.')
exit(1)
}
@ -436,15 +446,14 @@ fn (mut vd VDoc) generate_docs_from_file() {
vd.render_search_index(out)
// move favicons to target directory
println('Copying favicons...')
favicons_path := os.join_path(cfg.theme_dir, 'favicons')
favicons := os.ls(favicons_path) or { panic(err) }
for favicon in favicons {
favicon_path := os.join_path(favicons_path, favicon)
destination_path := os.join_path(out.path, favicon)
os.cp(favicon_path, destination_path) or { panic(err) }
}
println('Copied ${favicons.len} icons to `${out.path}` .')
}
}
}

View file

@ -1,3 +1,4 @@
// vtest retry: 3
import os
import rand
import term
@ -44,31 +45,6 @@ fn test_output() {
assert total_fails == 0
}
fn test_run_examples_good() {
os.setenv('VCOLORS', 'never', true)
os.chdir(vroot)!
res := os.execute('${vexe} doc -comments -run-examples cmd/tools/vdoc/testdata/run_examples_good/main.v')
assert res.exit_code == 0
assert res.output.contains('module main'), res.output
assert res.output.contains('fn abc()'), res.output
assert res.output.contains("abc just prints 'xyz'"), res.output
assert res.output.contains('and should succeed'), res.output
assert res.output.contains('Example: assert 5 * 5 == 25'), res.output
}
fn test_run_examples_bad() {
os.setenv('VCOLORS', 'never', true)
os.chdir(vroot)!
res := os.execute('${vexe} doc -comments -run-examples cmd/tools/vdoc/testdata/run_examples_bad/main.v')
assert res.exit_code != 0
assert res.output.contains('error in documentation example'), res.output
assert res.output.contains(' left value: 5 * 5 = 25'), res.output
assert res.output.contains('right value: 77'), res.output
assert res.output.contains('V panic: Assertion failed...'), res.output
assert res.output.contains('module main'), res.output
assert res.output.contains('Example: assert 5 * 5 == 77'), res.output
}
const small_pure_v_vlib_module = 'bitfield'
fn test_out_path() {

View file

@ -0,0 +1,56 @@
import os
const vexe_path = @VEXE
const vexe = os.quoted_path(vexe_path)
const vroot = os.dir(vexe_path)
fn testsuite_begin() {
os.setenv('VCOLORS', 'never', true)
os.chdir(vroot)!
}
fn test_check_examples_good() {
cmd := '${vexe} doc -comments -check-examples cmd/tools/vdoc/testdata/run_examples_good/main.v'
println('${@METHOD:30} running ${cmd} ...')
res := os.execute(cmd)
assert res.exit_code == 0
assert res.output.contains('module main'), res.output
assert res.output.contains('fn abc()'), res.output
assert res.output.contains("abc just prints 'xyz'"), res.output
assert res.output.contains('and should succeed'), res.output
assert res.output.contains('Example: assert 5 * 5 == 25'), res.output
}
fn test_check_examples_bad() {
cmd := '${vexe} doc -comments -check-examples cmd/tools/vdoc/testdata/run_examples_bad/main.v'
println('${@METHOD:30} running ${cmd} ...')
res := os.execute(cmd)
assert res.exit_code == 0
assert res.output.contains('module main'), res.output
assert res.output.contains('Example: assert 5 * 5 == 77'), res.output
}
fn test_run_examples_good() {
cmd := '${vexe} doc -comments -unsafe-run-examples cmd/tools/vdoc/testdata/run_examples_good/main.v'
println('${@METHOD:30} running ${cmd} ...')
res := os.execute(cmd)
assert res.exit_code == 0
assert res.output.contains('module main'), res.output
assert res.output.contains('fn abc()'), res.output
assert res.output.contains("abc just prints 'xyz'"), res.output
assert res.output.contains('and should succeed'), res.output
assert res.output.contains('Example: assert 5 * 5 == 25'), res.output
}
fn test_run_examples_bad() {
cmd := '${vexe} doc -comments -unsafe-run-examples cmd/tools/vdoc/testdata/run_examples_bad/main.v'
println('${@METHOD:30} running ${cmd} ...')
res := os.execute(cmd)
assert res.exit_code != 0
assert res.output.contains('error in documentation example'), res.output
assert res.output.contains(' left value: 5 * 5 = 25'), res.output
assert res.output.contains('right value: 77'), res.output
assert res.output.contains('V panic: Assertion failed...'), res.output
assert res.output.contains('module main'), res.output
assert res.output.contains('Example: assert 5 * 5 == 77'), res.output
}

View file

@ -27,6 +27,7 @@ struct FormatOptions {
is_worker bool // true *only* in the worker processes. Note: workers can crash.
is_backup bool // make a `file.v.bak` copy *before* overwriting a `file.v` in place with `-w`
in_process bool // do not fork a worker process; potentially faster, but more prone to crashes for invalid files
is_new_int bool // Forcefully cast the `int` type in @[translated] modules or in the definition of `C.func` to the `i32` type.
mut:
diff_cmd string // filled in when -diff or -verify is passed
}
@ -55,6 +56,7 @@ fn main() {
is_verify: '-verify' in args
is_backup: '-backup' in args
in_process: '-inprocess' in args
is_new_int: '-new_int' in args
}
if term_colors {
os.setenv('VCOLORS', 'always', true)
@ -184,6 +186,7 @@ fn (foptions &FormatOptions) vlog(msg string) {
fn (foptions &FormatOptions) formated_content_from_file(prefs &pref.Preferences, file string) string {
mut table := ast.new_table()
file_ast := parser.parse_file(file, mut table, .parse_comments, prefs)
table.new_int = foptions.is_new_int
formated_content := fmt.fmt(file_ast, mut table, prefs, foptions.is_debug)
return formated_content
}
@ -202,6 +205,7 @@ fn (foptions &FormatOptions) format_file(file string) {
prefs, mut table := setup_preferences_and_table()
file_ast := parser.parse_file(file, mut table, .parse_comments, prefs)
// checker.new_checker(table, prefs).check(file_ast)
table.new_int = foptions.is_new_int
formatted_content := fmt.fmt(file_ast, mut table, prefs, foptions.is_debug)
os.write_file(vfmt_output_path, formatted_content) or { panic(err) }
foptions.vlog('fmt.fmt worked and ${formatted_content.len} bytes were written to ${vfmt_output_path} .')
@ -214,6 +218,7 @@ fn (foptions &FormatOptions) format_pipe() {
input_text := os.get_raw_lines_joined()
file_ast := parser.parse_text(input_text, '', mut table, .parse_comments, prefs)
// checker.new_checker(table, prefs).check(file_ast)
table.new_int = foptions.is_new_int
formatted_content := fmt.fmt(file_ast, mut table, prefs, foptions.is_debug,
source_text: input_text
)

View file

@ -64,12 +64,6 @@ const vls_src_folder = os.join_path(vls_folder, 'src')
const server_not_found_err = error_with_code('Language server is not installed nor found.',
101)
const json_enc = json2.Encoder{
newline: `\n`
newline_spaces_count: 2
escape_unicode: false
}
fn (upd VlsUpdater) check_or_create_vls_folder() ! {
if !os.exists(vls_folder) {
upd.log('Creating .vls folder...')
@ -106,22 +100,11 @@ fn (upd VlsUpdater) update_manifest(new_path string, from_source bool, timestamp
}
}
mut manifest_file := os.open_file(vls_manifest_path, 'w+')!
defer {
manifest_file.close()
}
manifest['server_path'] = json2.Any(new_path)
manifest['last_updated'] = json2.Any(timestamp.format_ss())
manifest['from_source'] = json2.Any(from_source)
mut buffer := []u8{}
json_enc.encode_value(manifest, mut buffer)!
manifest_file.write(buffer)!
unsafe { buffer.free() }
os.write_file(vls_manifest_path, json2.encode(manifest))!
}
fn (upd VlsUpdater) init_download_prebuilt() ! {

View file

@ -64,6 +64,7 @@ mut:
warmup int
show_help bool
show_output bool
is_silent bool // do not print progress lines
use_newline bool // use \n instead of \r, so the last line is not overwritten
fail_on_regress_percent int
fail_on_maxtime int // in ms
@ -135,11 +136,11 @@ fn bold(s string) string {
}
fn (a Aints) str() string {
avg := bold('${a.average / 1000:5.1f}ms')
tdev := c(tred, '${a.stddev / 1000:5.1f}ms')
avg := bold('${a.average / 1000:6.1f}ms')
tdev := c(tred, '${a.stddev / 1000:6.1f}ms')
baseline := '${avg} ± σ: ${tdev},'
tmin := c(tbcyan, '${f64(a.imin) / 1000:5.1f}ms')
tmax := c(tbblue, '${f64(a.imax) / 1000:5.1f}ms')
tmin := c(tbcyan, '${f64(a.imin) / 1000:6.1f}ms')
tmax := c(tbblue, '${f64(a.imax) / 1000:6.1f}ms')
return '${baseline:-46s} ${tmin}${tmax}'
}
@ -149,9 +150,19 @@ fn flushed_print(s string) {
}
fn (mut context Context) clear_line() {
if context.is_silent {
return
}
flushed_print(context.cline)
}
fn (mut context Context) flushed_print(s string) {
if context.is_silent {
return
}
flushed_print(s)
}
fn (mut context Context) expand_all_commands(commands []string) []string {
mut all_commands := []string{}
for cmd in commands {
@ -165,14 +176,10 @@ fn (mut context Context) expand_all_commands(commands []string) []string {
scmd := cscmd.replace('{${paramk}}', paramv)
new_substituted_commands << scmd
}
for sc in new_substituted_commands {
substituted_commands << sc
}
substituted_commands << new_substituted_commands
}
}
for sc in substituted_commands {
all_commands << sc
}
all_commands << substituted_commands
}
mut unique := map[string]int{}
for x in all_commands {
@ -195,11 +202,11 @@ fn (mut context Context) run() {
series_label := '${icmd + 1}/${context.commands.len}, ${si + 1}/${context.series}'
line_prefix := '${context.cgoback}Command: ${c(tgray, cmd)}, ${series_label:9}'
if context.series != 1 || context.commands.len != 1 {
flushed_print(line_prefix)
context.flushed_print(line_prefix)
}
if context.warmup > 0 {
for i in 0 .. context.warmup {
flushed_print('${line_prefix}, warm up run: ${i + 1:4}/${context.warmup:-4}, took: ${f64(duration) / 1000:6.1f}ms ...')
context.flushed_print('${line_prefix}, warm up run: ${i + 1:4}/${context.warmup:-4}, took: ${f64(duration) / 1000:6.1f}ms ...')
mut sw := time.new_stopwatch()
res := os.execute(cmd)
duration = i64(sw.elapsed().microseconds())
@ -234,16 +241,15 @@ fn (mut context Context) run() {
runs++
avg = (f64(sum) / f64(i + 1))
cavg := '${avg / 1000:9.3f}ms'
flushed_print('${line_prefix}, current average: ${c(tgreen, cavg)}, run ${i + 1:4}/${context.run_count:-4}, took: ${f64(duration) / 1000:6} ms')
context.flushed_print('${line_prefix}, current average: ${c(tgreen, cavg)}, run ${
i + 1:4}/${context.run_count:-4}, took: ${f64(duration) / 1000:6} ms')
if context.show_output {
flushed_print(' | result: ${oldres:s}')
context.flushed_print(' | result: ${oldres:s}')
}
trimmed_output := res.output.trim_right('\r\n')
trimmed_normalized := trimmed_output.replace('\r\n', '\n')
lines := trimmed_normalized.split('\n')
for line in lines {
context.results[icmd].outputs << line
}
context.results[icmd].outputs << lines
context.results[icmd].timings << duration
oldres = res.output.replace('\n', ' ')
if should_show_fail_output {
@ -257,7 +263,7 @@ fn (mut context Context) run() {
context.results[icmd].atiming = new_aints(context.results[icmd].timings, context.nmins,
context.nmaxs)
context.clear_line()
flushed_print(context.cgoback)
context.flushed_print(context.cgoback)
context.show_timings_details(si, icmd, cmd)
}
}
@ -345,9 +351,9 @@ fn (mut context Context) show_diff_summary() {
}
mut comparison := ''
if r.atiming.average != base {
comparison = '${cpercent:+6.1f}%'
comparison = '${cpercent:+8.1f}%'
}
mut tcomparison := 'base '
mut tcomparison := ' base '
if r.atiming.average != base {
tcomparison = readable_comparison(r.atiming.average, base, cpercent)
}
@ -381,12 +387,12 @@ fn readable_comparison(tcurrent f64, tbase f64, cpercent f64) string {
if !is_same {
label = c(tgreen, 'faster')
}
return '${tbase / tcurrent:4.2f}x ${label}'
return '${tbase / tcurrent:6.2f}x ${label}'
} else {
if !is_same {
label = c(tcyan, 'slower')
}
return '${tcurrent / tbase:4.2f}x ${label}'
return '${tcurrent / tbase:6.2f}x ${label}'
}
}
@ -421,6 +427,10 @@ fn (mut context Context) parse_options() ! {
context.ignore_failed = fp.bool('ignore', `e`, false, 'Ignore failed commands (returning a non 0 exit code).')
context.no_vexe_setenv = fp.bool('no_vexe_reset', `N`, false, 'Do not reset the VEXE env variable at the start. \n By default, VEXE will be set to "", to allow for measuring different V executables. Use this option to override it')
context.use_newline = fp.bool('newline', `n`, false, 'Use \\n, do not overwrite the last line. Produces more output, but easier to diagnose.')
context.is_silent = fp.bool('silent', `S`, false, 'Do not show progress lines, print only the final summary. Suitable for CIs.')
if os.getenv('VREPEAT_SILENT') != '' {
context.is_silent = true
}
context.show_output = fp.bool('output', `O`, false, 'Show command stdout/stderr in the progress indicator for each command. Note: slower, for verbose commands.')
context.verbose = fp.bool('verbose', `v`, false, 'Be more verbose.')
context.fail_on_maxtime = fp.int('max_time', `m`, max_time, 'Fail with exit code 2, when first cmd takes above M milliseconds (regression). Default: ${max_time}')

View file

@ -441,7 +441,7 @@ fn run_repl(workdir string, vrepl_prefix string) int {
prompt = '... '
}
oline := r.get_one_line(prompt) or { break }
line := oline.trim_space()
line := oline.all_before('//').trim_space()
if line == '' {
continue
}

View file

@ -22,7 +22,7 @@ fn main() {
fp.skip_executable()
fp.limit_free_args_to_at_least(1)!
context.show_help = fp.bool('help', `h`, false, 'Show this help screen.')
context.timeout = fp.float('timeout', `t`, 600.0, 'Timeout in seconds (for all retries). Default: 600.0 seconds (10 minutes).') * time.second
context.timeout = fp.float('timeout', `t`, 900.0, 'Timeout in seconds (for all retries). Default: 900.0 seconds (15 minutes).') * time.second
context.delay = fp.float('delay', `d`, 1.0, 'Delay between each retry in seconds. Default: 1.0 second.') * time.second
context.retries = fp.int('retries', `r`, 10, 'Maximum number of retries. Default: 10.')
if context.show_help {

View file

@ -2,7 +2,6 @@ module main
import os
import v.scanner
import v.pref
import v.token
import flag
@ -13,13 +12,20 @@ fn main() {
fp.description('\nScan .v source files, and print the V tokens contained in them.')
fp.arguments_description('PATH [PATH]...')
fp.limit_free_args_to_at_least(1)!
pref_ := pref.new_preferences()
mut all_paths := fp.remaining_parameters()
for path in all_paths {
mut scanner_ := scanner.new_scanner_file(path, .parse_comments, pref_)!
content := os.read_file(path) or {
eprintln('> could not read: ${path}, skipping; err: ${err}')
continue
}
mut scanner_ := scanner.new_silent_scanner()
scanner_.prepare_for_new_text(content)
scanner_.is_fmt = false
scanner_.pref.output_mode = .stdout
scanner_.comments_mode = .skip_comments
mut tok := token.Token{}
for tok.kind != .eof {
tok = scanner_.scan()
tok = scanner_.text_scan()
pos := tok.pos()
location := '${path}:${pos.line_nr + 1}:${pos.col + 1}:'
println('${location:-32} | pos: ${pos.pos:-5} | ${tok.debug()}')

View file

@ -4,6 +4,10 @@ import os
import term
import time
type FnCheck = fn () !
type OneOrManyStrings = string | []string
const vexe_path = os.getenv('VEXE')
const vroot = os.dir(vexe_path)
@ -27,7 +31,7 @@ fn main() {
// summary
sw := time.new_stopwatch()
for mut cmd in commands {
cmd.run()
cmd.run()?
}
spent := sw.elapsed().milliseconds()
oks := commands.filter(it.ecode == 0)
@ -55,16 +59,6 @@ enum RunCommandKind {
execute
}
const expect_nothing = '<nothing>'
const starts_with_nothing = '<nothing>'
const ends_with_nothing = '<nothing>'
const contains_nothing = '<nothing>'
type FnCheck = fn () !
struct Command {
mut:
line string
@ -72,12 +66,12 @@ mut:
ecode int
okmsg string
errmsg string
rmfile string
rmfile ?OneOrManyStrings
runcmd RunCommandKind = .system
expect string = expect_nothing
starts_with string = starts_with_nothing
ends_with string = ends_with_nothing
contains string = contains_nothing
expect ?string
starts_with ?string
ends_with ?string
contains ?string
output string
before_cb FnCheck = unsafe { nil }
after_cb FnCheck = unsafe { nil }
@ -90,6 +84,11 @@ fn get_all_commands() []Command {
okmsg: 'V can compile hello world.'
rmfile: 'examples/hello_world'
}
res << Command{
line: '${vexe} -W -Wimpure-v examples/hello_world.v'
okmsg: 'V can compile hello world with the stricter `-W -Wimpure-v` mode .'
rmfile: 'examples/hello_world'
}
$if linux {
if l2w_crosscc != '' {
res << Command{
@ -223,18 +222,18 @@ fn get_all_commands() []Command {
res << Command{
line: '${vexe} -os linux -experimental -b native -o hw.linux examples/hello_world.v'
okmsg: 'V compiles hello_world.v on the native backend for linux'
rmfile: 'hw.linux'
rmfile: ['hw.linux', 'hw.linux.o']
}
res << Command{
line: '${vexe} -os macos -experimental -b native -o hw.macos examples/hello_world.v'
okmsg: 'V compiles hello_world.v on the native backend for macos'
rmfile: 'hw.macos'
rmfile: ['hw.macos', 'hw.macos.o']
}
$if windows {
res << Command{
line: '${vexe} -os windows -experimental -b native -o hw.exe examples/hello_world.v'
okmsg: 'V compiles hello_world.v on the native backend for windows'
rmfile: 'hw.exe'
rmfile: ['hw.exe', 'hw.o']
}
}
//
@ -442,7 +441,7 @@ fn get_all_commands() []Command {
return res
}
fn (mut cmd Command) run() {
fn (mut cmd Command) run() ? {
// Changing the current directory is needed for some of the compiler tests,
// vlib/v/tests/local_test.v and vlib/v/tests/repl/repl_test.v
os.chdir(vroot) or {}
@ -485,25 +484,25 @@ fn (mut cmd Command) run() {
if cmd.ecode != 0 {
is_failed = true
}
if cmd.expect != expect_nothing {
if cmd.expect != none {
if cmd.output != cmd.expect {
is_failed = true
is_failed_expected = true
}
}
if cmd.starts_with != starts_with_nothing {
if cmd.starts_with != none {
if !cmd.output.starts_with(cmd.starts_with) {
is_failed = true
is_failed_starts_with = true
}
}
if cmd.ends_with != ends_with_nothing {
if cmd.ends_with != none {
if !cmd.output.ends_with(cmd.ends_with) {
is_failed = true
is_failed_ends_with = true
}
}
if cmd.contains != contains_nothing {
if cmd.contains != none {
if !cmd.output.contains(cmd.contains) {
is_failed = true
is_failed_contains = true
@ -518,25 +517,22 @@ fn (mut cmd Command) run() {
eprintln('> output:\n${cmd.output}')
}
if is_failed && is_failed_starts_with {
eprintln('> expected to start with:\n${cmd.starts_with}')
eprintln('> output:\n${cmd.output#[..cmd.starts_with.len]}')
eprintln('> expected to start with:\n${cmd.starts_with?}')
eprintln('> output:\n${cmd.output#[..cmd.starts_with?.len]}')
}
if is_failed && is_failed_ends_with {
eprintln('> expected to end with:\n${cmd.ends_with}')
eprintln('> output:\n${cmd.output#[-cmd.starts_with.len..]}')
eprintln('> expected to end with:\n${cmd.ends_with?}')
eprintln('> output:\n${cmd.output#[-cmd.starts_with?.len..]}')
}
if is_failed && is_failed_contains {
eprintln('> expected to contain:\n${cmd.contains}')
eprintln('> expected to contain:\n${cmd.contains?}')
eprintln('> output:\n${cmd.output}')
}
if vtest_nocleanup {
return
}
if cmd.rmfile != '' {
if cmd.rmfile != none {
mut file_existed := rm_existing(cmd.rmfile)
if os.user_os() == 'windows' {
file_existed = file_existed || rm_existing(cmd.rmfile + '.exe')
}
if !file_existed {
eprintln('Expected file did not exist: ${cmd.rmfile}')
cmd.ecode = 999
@ -544,10 +540,33 @@ fn (mut cmd Command) run() {
}
}
fn rm_existing(paths OneOrManyStrings) bool {
match paths {
string {
return rm_existing_file(paths)
}
[]string {
mut existing := false
for path in paths {
existing ||= rm_existing_file(path)
}
return existing
}
}
return false
}
// try to remove a file, return if it existed before the removal attempt
fn rm_existing(path string) bool {
existed := os.exists(path)
fn rm_existing_file(path string) bool {
mut existed := os.exists(path)
os.rm(path) or {}
win_path := path + '.exe'
if os.exists(win_path) {
existed = true
os.rm(win_path) or {}
}
return existed
}

View file

@ -1,3 +1,4 @@
// vtest retry: 3
import os
import time
@ -29,22 +30,22 @@ fn execute(cmd string) os.Result {
fn test_normal_exit_without_timeout_echo() {
depend_on_command('echo') or { return }
ee := execute('${qvexe} timeout 0.2 echo')
ee := execute('${qvexe} timeout 0.5 echo')
assert ee.exit_code == 0, ee.output
res := execute('${qvexe} timeout 0.2 echo z123')
res := execute('${qvexe} timeout 0.5 echo z123')
assert res.exit_code == 0, res.output
assert res.output.contains('z123')
}
fn test_normal_exit_without_timeout_sleep() {
depend_on_command('sleep') or { return }
res := execute('${qvexe} timeout 0.4 sleep 0.1')
res := execute('${qvexe} timeout 0.5 sleep 0.1')
assert res.exit_code == 0, res.output
assert res.output == ''
}
fn test_exit_with_timeout() {
depend_on_command('sleep') or { return }
res := execute('${qvexe} timeout 0.2 sleep 2')
res := execute('${qvexe} timeout 0.5 sleep 3')
assert res.exit_code == 124, res.output
}

View file

@ -12,6 +12,7 @@ import v.util.version
import v.builder
import v.builder.cbuilder
@[markused]
const external_tools = [
'ast',
'bin2v',

View file

@ -112,6 +112,8 @@ by using any of the following commands in a terminal:
* [Methods](#methods)
* [Embedded structs](#embedded-structs)
* [Unions](#unions)
* [Why use unions?](#why-use-unions)
* [Embedding](#embedding)
</td><td valign=top>
@ -2853,7 +2855,36 @@ targeted.
## Unions
Just like structs, unions support embedding.
A union is a special type of struct that allows storing different data types in the same memory
location. You can define a union with many members, but only one member may contain a valid value
at any time, depending on the data types of the members. Unions provide an efficient way of using
the same memory location for multiple purposes.
All the members of a union share the same memory location. This means that modifying one member
automatically modifies all the rest. The largest union member defines the size of the union.
### Why use unions?
One reason, as stated above, is to use less memory for storing things. Since the size of a union
is the size of the largest field in it, and the size of a struct is the size of all the fields in
the struct added together, a union is definitely better for lower memory usage. As long as you
only need one of the fields to be valid at any time, the union wins.
Another reason is to allow easier access to parts of a field. For example, without using a union,
if you want to look at each of the bytes of a 32-bit integer separately, you'll need bitwise
`RIGHT-SHIFT`s and `AND` operations. With a union, you can access the individual bytes directly.
```v
union ThirtyTwo {
a u32
b [4]u8
}
```
Since `ThirtyTwo.a` and `ThirtyTwo.b` share the same memory locations, you can directly access
each byte of `a` by referencing `b[byte_offset]`.
### Embedding
Unions also support embedding, the same as structs.
```v
struct Rgba32_Component {
@ -4190,6 +4221,18 @@ user := repo.find_user_by_id(7) or {
}
```
Use `err is ...` to compare errors:
```v oksyntax
import io
x := read() or {
if err is io.Eof {
println('end of file')
}
return
}
```
#### Options/results when returning multiple values
Only one `Option` or `Result` is allowed to be returned from a function. It is
@ -6095,6 +6138,10 @@ that are substituted at compile time:
- `@BUILD_DATE` => replaced with the build date, for example '2024-09-13' .
- `@BUILD_TIME` => replaced with the build time, for example '12:32:07' .
- `@BUILD_TIMESTAMP` => replaced with the build timestamp, for example '1726219885' .
- `@OS` => replaced with the OS type, for example 'linux' .
- `@CCOMPILER` => replaced with the C compiler type, for example 'gcc' .
- `@BACKEND` => replaced with current language backend, for example 'c' or 'golang' .
- `@PLATFORM` => replaced with the platform type, for example 'amd64' .
Note: `@BUILD_DATE`, `@BUILD_TIME`, `@BUILD_TIMESTAMP` represent times in the UTC timezone.
By default, they are based on the current time of the compilation/build. They can be overridden
by setting the environment variable `SOURCE_DATE_EPOCH`. That is also useful while making
@ -8354,4 +8401,4 @@ This is the place to be, to discuss the V language, learn about latest
developments, quickly get help with issues, witness/participate in
~~epic flame wars~~ constructive criticism exchanges and design decisions.
Join it, and learn more about languages, games, editors, people, Klingons,
Conway's law and the universe.
Conway's law and the universe.

View file

@ -1,5 +1,4 @@
import gg
import gx
import math
import math.easing
import os.asset
@ -52,76 +51,76 @@ mut:
}
struct Theme {
bg_color gx.Color
padding_color gx.Color
text_color gx.Color
game_over_color gx.Color
victory_color gx.Color
tile_colors []gx.Color
bg_color gg.Color
padding_color gg.Color
text_color gg.Color
game_over_color gg.Color
victory_color gg.Color
tile_colors []gg.Color
}
const themes = [
&Theme{
bg_color: gx.rgb(250, 248, 239)
padding_color: gx.rgb(143, 130, 119)
victory_color: gx.rgb(100, 160, 100)
game_over_color: gx.rgb(190, 50, 50)
text_color: gx.black
bg_color: gg.rgb(250, 248, 239)
padding_color: gg.rgb(143, 130, 119)
victory_color: gg.rgb(100, 160, 100)
game_over_color: gg.rgb(190, 50, 50)
text_color: gg.black
tile_colors: [
gx.rgb(205, 193, 180), // Empty / 0 tile
gx.rgb(238, 228, 218), // 2
gx.rgb(237, 224, 200), // 4
gx.rgb(242, 177, 121), // 8
gx.rgb(245, 149, 99), // 16
gx.rgb(246, 124, 95), // 32
gx.rgb(246, 94, 59), // 64
gx.rgb(237, 207, 114), // 128
gx.rgb(237, 204, 97), // 256
gx.rgb(237, 200, 80), // 512
gx.rgb(237, 197, 63), // 1024
gx.rgb(237, 194, 46),
gg.rgb(205, 193, 180), // Empty / 0 tile
gg.rgb(238, 228, 218), // 2
gg.rgb(237, 224, 200), // 4
gg.rgb(242, 177, 121), // 8
gg.rgb(245, 149, 99), // 16
gg.rgb(246, 124, 95), // 32
gg.rgb(246, 94, 59), // 64
gg.rgb(237, 207, 114), // 128
gg.rgb(237, 204, 97), // 256
gg.rgb(237, 200, 80), // 512
gg.rgb(237, 197, 63), // 1024
gg.rgb(237, 194, 46),
]
},
&Theme{
bg_color: gx.rgb(55, 55, 55)
padding_color: gx.rgb(68, 60, 59)
victory_color: gx.rgb(100, 160, 100)
game_over_color: gx.rgb(190, 50, 50)
text_color: gx.white
bg_color: gg.rgb(55, 55, 55)
padding_color: gg.rgb(68, 60, 59)
victory_color: gg.rgb(100, 160, 100)
game_over_color: gg.rgb(190, 50, 50)
text_color: gg.white
tile_colors: [
gx.rgb(123, 115, 108),
gx.rgb(142, 136, 130),
gx.rgb(142, 134, 120),
gx.rgb(145, 106, 72),
gx.rgb(147, 89, 59),
gx.rgb(147, 74, 57),
gx.rgb(147, 56, 35),
gx.rgb(142, 124, 68),
gx.rgb(142, 122, 58),
gx.rgb(142, 120, 48),
gx.rgb(142, 118, 37),
gx.rgb(142, 116, 27),
gg.rgb(123, 115, 108),
gg.rgb(142, 136, 130),
gg.rgb(142, 134, 120),
gg.rgb(145, 106, 72),
gg.rgb(147, 89, 59),
gg.rgb(147, 74, 57),
gg.rgb(147, 56, 35),
gg.rgb(142, 124, 68),
gg.rgb(142, 122, 58),
gg.rgb(142, 120, 48),
gg.rgb(142, 118, 37),
gg.rgb(142, 116, 27),
]
},
&Theme{
bg_color: gx.rgb(38, 38, 66)
padding_color: gx.rgb(58, 50, 74)
victory_color: gx.rgb(100, 160, 100)
game_over_color: gx.rgb(190, 50, 50)
text_color: gx.white
bg_color: gg.rgb(38, 38, 66)
padding_color: gg.rgb(58, 50, 74)
victory_color: gg.rgb(100, 160, 100)
game_over_color: gg.rgb(190, 50, 50)
text_color: gg.white
tile_colors: [
gx.rgb(92, 86, 140),
gx.rgb(106, 99, 169),
gx.rgb(106, 97, 156),
gx.rgb(108, 79, 93),
gx.rgb(110, 66, 76),
gx.rgb(110, 55, 74),
gx.rgb(110, 42, 45),
gx.rgb(106, 93, 88),
gx.rgb(106, 91, 75),
gx.rgb(106, 90, 62),
gx.rgb(106, 88, 48),
gx.rgb(106, 87, 35),
gg.rgb(92, 86, 140),
gg.rgb(106, 99, 169),
gg.rgb(106, 97, 156),
gg.rgb(108, 79, 93),
gg.rgb(110, 66, 76),
gg.rgb(110, 55, 74),
gg.rgb(110, 42, 45),
gg.rgb(106, 93, 88),
gg.rgb(106, 91, 75),
gg.rgb(106, 90, 62),
gg.rgb(106, 88, 48),
gg.rgb(106, 87, 35),
]
},
]
@ -518,32 +517,32 @@ fn (mut app App) ai_move() {
app.move(bestprediction.move)
}
fn (app &App) label_format(kind LabelKind) gx.TextCfg {
fn (app &App) label_format(kind LabelKind) gg.TextCfg {
match kind {
.keys {
return gx.TextCfg{
color: gx.Color{150, 150, 255, 200}
return gg.TextCfg{
color: gg.Color{150, 150, 255, 200}
align: .center
vertical_align: .bottom
size: app.ui.font_size / 4
}
}
.points {
return gx.TextCfg{
color: if app.state in [.over, .victory] { gx.white } else { app.theme.text_color }
return gg.TextCfg{
color: if app.state in [.over, .victory] { gg.white } else { app.theme.text_color }
align: .left
size: app.ui.font_size / 2
}
}
.moves {
return gx.TextCfg{
color: if app.state in [.over, .victory] { gx.white } else { app.theme.text_color }
return gg.TextCfg{
color: if app.state in [.over, .victory] { gg.white } else { app.theme.text_color }
align: .right
size: app.ui.font_size / 2
}
}
.tile {
return gx.TextCfg{
return gg.TextCfg{
color: app.theme.text_color
align: .center
vertical_align: .middle
@ -551,7 +550,7 @@ fn (app &App) label_format(kind LabelKind) gx.TextCfg {
}
}
.victory {
return gx.TextCfg{
return gg.TextCfg{
color: app.theme.victory_color
align: .center
vertical_align: .middle
@ -559,7 +558,7 @@ fn (app &App) label_format(kind LabelKind) gx.TextCfg {
}
}
.game_over {
return gx.TextCfg{
return gg.TextCfg{
color: app.theme.game_over_color
align: .center
vertical_align: .middle
@ -567,8 +566,8 @@ fn (app &App) label_format(kind LabelKind) gx.TextCfg {
}
}
.score_end {
return gx.TextCfg{
color: gx.white
return gg.TextCfg{
color: gg.white
align: .center
vertical_align: .middle
size: app.ui.font_size * 3 / 4
@ -623,18 +622,18 @@ fn (app &App) draw() {
app.draw_tiles()
// TODO: Make transparency work in `gg`
if app.state == .over {
app.gg.draw_rect_filled(0, 0, ww, wh, gx.rgba(10, 0, 0, 180))
app.gg.draw_rect_filled(0, 0, ww, wh, gg.rgba(10, 0, 0, 180))
app.gg.draw_text(ww / 2, (m * 4 / 10) + ypad, 'Game Over', app.label_format(.game_over))
f := app.label_format(.tile)
msg := $if android { 'Tap to restart' } $else { 'Press `r` to restart' }
app.gg.draw_text(ww / 2, (m * 6 / 10) + ypad, msg, gx.TextCfg{
app.gg.draw_text(ww / 2, (m * 6 / 10) + ypad, msg, gg.TextCfg{
...f
color: gx.white
color: gg.white
size: f.size * 3 / 4
})
}
if app.state == .victory {
app.gg.draw_rect_filled(0, 0, ww, wh, gx.rgba(0, 10, 0, 180))
app.gg.draw_rect_filled(0, 0, ww, wh, gg.rgba(0, 10, 0, 180))
app.gg.draw_text(ww / 2, (m * 4 / 10) + ypad, 'Victory!', app.label_format(.victory))
// f := app.label_format(.tile)
msg1 := $if android { 'Tap to continue' } $else { 'Press `space` to continue' }
@ -726,7 +725,7 @@ fn (app &App) draw_one_tile(x int, y int, tidx int) {
xpos := xoffset + tw / 2
ypos := yoffset + th / 2
mut fmt := app.label_format(.tile)
fmt = gx.TextCfg{
fmt = gg.TextCfg{
...fmt
size: int(anim_size * (fmt.size - 1))
}
@ -741,15 +740,15 @@ fn (app &App) draw_one_tile(x int, y int, tidx int) {
app.gg.draw_text(xpos, ypos, '2', fmt)
fs2 := int(f32(fmt.size) * 0.67)
app.gg.draw_text(xpos + app.ui.tile_size / 10, ypos - app.ui.tile_size / 8,
'${tidx}', gx.TextCfg{
'${tidx}', gg.TextCfg{
...fmt
size: fs2
align: gx.HorizontalAlign.left
align: gg.HorizontalAlign.left
})
}
.shifts {
fs2 := int(f32(fmt.size) * 0.6)
app.gg.draw_text(xpos, ypos, '2<<${tidx - 1}', gx.TextCfg{
app.gg.draw_text(xpos, ypos, '2<<${tidx - 1}', gg.TextCfg{
...fmt
size: fs2
})
@ -757,7 +756,7 @@ fn (app &App) draw_one_tile(x int, y int, tidx int) {
.none {} // Don't draw any text here, colors only
.end {} // Should never get here
}
// oidx_fmt := gx.TextCfg{...fmt,size: 14}
// oidx_fmt := gg.TextCfg{...fmt,size: 14}
// app.gg.draw_text(xoffset + 50, yoffset + 15, 'y:${oidx >> 16}|x:${oidx & 0xFFFF}|m:${app.mtickers[y][x]:5.3f}', oidx_fmt)
// app.gg.draw_text(xoffset + 52, yoffset + 30, 'ox:${ox}|oy:${oy}', oidx_fmt)
// app.gg.draw_text(xoffset + 52, yoffset + 85, 'dx:${dx}|dy:${dy}', oidx_fmt)

View file

@ -0,0 +1,166 @@
import archive.tar
import flag
import net.http
import os
import term
const default_url = 'https://github.com/vlang/v/archive/refs/tags/v0.1.3.tar.gz'
@[heap]
struct Context {
url string // Web starting with http:// or https://. Local starting with file:///
chunks bool // true: decompress with callback
debug int // print debug lines
max_blocks int // if max_blocks > 0 and is reached stops early.
filename string // if filename is found as a path of a data block, stops early.
}
fn (ctx &Context) read_last_block(mut read tar.Read) bool {
if ctx.max_blocks > 0 && ctx.max_blocks < read.get_block_number() {
read.stop_early = true
return true
}
return false
}
fn new_context() !&Context {
mut fp := flag.new_flag_parser(os.args)
fp.application('tar_gz_reader')
fp.version('0.0.20250721')
fp.description('Reads into memory selected sections of *.tar.gz. archives from https or home_dir.')
fp.skip_executable()
ctx := &Context{
url: fp.string('url', `u`, default_url, 'archive *.tar.gz URL, default(${default_url}). Start name with file:/// for local')
chunks: fp.bool('chunks', `c`, false, 'decompress with chunks to reduce RAM usage, default(false)')
debug: fp.int('debug', `d`, 0, 'prints blocks: 1=other, 2:+dirs, 3=+files, 4=+data, default(0=silent)')
max_blocks: fp.int('max_blocks', `m`, 0, 'maximum blocks to read, stop early. Default(0=read all)')
filename: fp.string('filename', `f`, '', 'filename content complete print, stop early. Default(empty means none)')
}
additional := fp.finalize()!
if additional.len > 0 {
println('unprocessed args ${additional.join_lines()}')
}
return ctx
}
// Downloader downloads a *.tar.gz using HTTP chunks
struct Downloader {
mut:
chunks int
data []u8
}
fn new_downloader(url string) !&Downloader {
mut downloader := &Downloader{}
params := http.DownloaderParams{
downloader: downloader
}
if url.starts_with('http://') || url.starts_with('https://') {
http.download_file_with_progress(url, '', params)!
} else if url.starts_with('file:///') {
path := '${os.home_dir()}/${url[8..]}'
println('path ${path}')
downloader.data = os.read_bytes(path)!
}
return downloader
}
fn (mut d Downloader) on_start(mut request http.Request, path string) ! {}
fn (mut d Downloader) on_chunk(request &http.Request, chunk []u8, already_received u64, expected u64) ! {
if expected == 0 {
return
}
d.chunks++
d.data << chunk
}
fn (mut d Downloader) on_finish(request &http.Request, response &http.Response) ! {}
struct FileReader implements tar.Reader {
ctx &Context
mut:
filepath string
content []u8
}
fn new_file_reader(ctx &Context) FileReader {
return FileReader{
ctx: ctx
}
}
fn (mut f FileReader) other_block(mut read tar.Read, details string) {
if f.ctx.read_last_block(mut read) {
return
}
if f.ctx.debug > 0 {
row := 'OTHER block:${read.get_block_number():6} ${read.get_special()} ${details} ${read.get_path()} '
println(term.colorize(term.bright_yellow, row))
}
}
fn (mut f FileReader) dir_block(mut read tar.Read, size u64) {
if f.ctx.read_last_block(mut read) {
return
}
if f.ctx.debug > 1 {
row := 'DIR block:${read.get_block_number():6} ${read.get_path()} size:${size}'
println(term.colorize(term.green, row))
}
}
fn (mut f FileReader) file_block(mut read tar.Read, size u64) {
if f.ctx.read_last_block(mut read) {
return
}
path := read.get_path()
if f.ctx.debug > 2 {
row := ' FILE block:${read.get_block_number():6} ${path} size:${size}'
println(term.colorize(term.bright_blue, row))
}
if f.ctx.filename != '' && f.filepath == '' && path.ends_with(f.ctx.filename) {
f.filepath = path
}
}
fn (mut f FileReader) data_block(mut read tar.Read, data []u8, pending int) {
if f.ctx.read_last_block(mut read) {
return
}
path := read.get_path()
if f.ctx.debug > 3 {
println(' DATA block:${read.get_block_number():6} ${path} len:${data.len} pend:${pending}')
}
if f.ctx.filename != '' {
if f.filepath == path {
f.content << data
if pending == 0 {
// our file of interest data is complete
read.stop_early = true
}
}
}
}
fn main() {
ctx := new_context()!
reader := FileReader{
ctx: ctx
}
mut untar := tar.new_untar(reader)
mut decompressor := tar.new_decompressor(untar)
downloader := new_downloader(ctx.url)!
if ctx.chunks {
decompressor.read_chunks(downloader.data)!
} else {
decompressor.read_all(downloader.data)!
}
println('-'.repeat(80))
println('Download: ${ctx.url} chunks:${downloader.chunks} bytes=${downloader.data.len}')
println('Untar: ${untar}')
println('Content: Path:${reader.filepath} bytes:${reader.content.len}')
println('-'.repeat(80))
println('${reader.content.bytestr()}')
println('-'.repeat(80))
}

View file

@ -4,7 +4,6 @@
module main
import gg
import gx
import math
import rand
import os.asset
@ -86,8 +85,8 @@ mut:
frames int
text string
size int = 40
color gx.Color
align gx.HorizontalAlign = .center
color gg.Color
align gg.HorizontalAlign = .center
}
fn (mut a Asteroid) setup() {
@ -172,7 +171,7 @@ fn (mut game Game) update() {
game.split_asteroid(a, p.vel.mul_scalar(0.5))
game.player.reset(game.screen)
game.score += 50
game.show_message(text: 'Your ship was destroyed.', color: gx.red, frames: 90)
game.show_message(text: 'Your ship was destroyed.', color: gg.red, frames: 90)
game.ships--
if game.ships <= 0 {
game.ships = 5
@ -210,7 +209,7 @@ fn (mut game Game) update() {
game.ships++
game.player.reset(game.screen)
game.add_asteroids(10)
game.show_message(text: 'YOU WIN', color: gx.green, frames: 90)
game.show_message(text: 'YOU WIN', color: gg.green, frames: 90)
}
game.highscore = int_max(game.score, game.highscore)
}
@ -247,21 +246,21 @@ fn (mut game Game) split_asteroid(a &Asteroid, vel V2) {
fn (mut game Game) draw() {
ws := gg.window_size()
game.screen = V2{ws.width, ws.height}
game.gg.draw_rect_filled(0, 0, game.screen.x, game.screen.y, gx.rgba(20, 20, 20, 255))
game.gg.draw_rect_filled(0, 0, game.screen.x, game.screen.y, gg.rgba(20, 20, 20, 255))
game.draw_ship()
for b in game.bullets {
game.gg.draw_circle_filled(b.pos.x, b.pos.y, 3, gx.yellow)
game.gg.draw_circle_filled(b.pos.x, b.pos.y, 3, gg.yellow)
}
for mut a in game.asteroids {
game.draw_asteroid(mut a)
}
scenter := game.screen.div_scalar(2)
label1 := 'Level: ${game.level} Ships: ${game.ships}'
game.gg.draw_text(5, 10, label1, size: 20, color: gx.white, align: .left)
game.gg.draw_text(5, 10, label1, size: 20, color: gg.white, align: .left)
label2 := 'B: ${game.player.bullets:02} F: ${game.player.fuel:04}'
game.gg.draw_text(int(scenter.x), 10, label2, size: 20, color: gx.green, align: .center)
game.gg.draw_text(int(scenter.x), 10, label2, size: 20, color: gg.green, align: .center)
label3 := 'Score: ${game.score} Highscore: ${game.highscore}'
game.gg.draw_text(int(game.screen.x) - 5, 10, label3, size: 20, color: gx.white, align: .right)
game.gg.draw_text(int(game.screen.x) - 5, 10, label3, size: 20, color: gg.white, align: .right)
if game.msg.frames > 0 {
game.gg.draw_text(int(scenter.x), int(scenter.y / 2), game.msg.text,
size: game.msg.size
@ -272,7 +271,7 @@ fn (mut game Game) draw() {
label4 := 'Use arrows + space to control your ship. Use Escape to end the game.'
game.gg.draw_text(int(game.screen.x - 5), int(game.screen.y - 20), label4,
size: 16
color: gx.gray
color: gg.gray
align: .right
)
}
@ -295,10 +294,10 @@ fn (game &Game) draw_ship() {
p.points[5] = p3.y
p.points[6] = p4.x
p.points[7] = p4.y
game.gg.draw_convex_poly(p.points, gx.white)
game.gg.draw_convex_poly(p.points, gg.white)
if p.is_engine_on {
engine := p.pos.offset(angle + math.pi, 0.7 * p.radius)
game.gg.draw_circle_filled(engine.x, engine.y, 6, gx.yellow)
game.gg.draw_circle_filled(engine.x, engine.y, 6, gg.yellow)
}
}
@ -306,13 +305,13 @@ fn (mut game Game) draw_asteroid(mut a Asteroid) {
if !a.active {
return
}
game.gg.draw_circle_filled(a.pos.x, a.pos.y, a.radius, gx.rgba(235, 235, 255, 215))
game.gg.draw_circle_filled(a.pos.x, a.pos.y, a.radius, gg.rgba(235, 235, 255, 215))
for i in 0 .. a.segments {
angle := rads(a.rotation + f32(i) * 360 / a.segments)
p := a.pos.offset(angle, a.offsets[i])
a.points[i * 2], a.points[i * 2 + 1] = p.x, p.y
}
game.gg.draw_convex_poly(a.points, gx.rgba(155, 155, 148, 245))
game.gg.draw_convex_poly(a.points, gg.rgba(155, 155, 148, 245))
}
fn (mut game Game) add_bullet() {

View file

@ -1,5 +1,4 @@
import gg
import gx
import math
import rand
import sokol.audio
@ -11,8 +10,8 @@ const designed_height = 800
const brick_width = 53
const brick_height = 20
const bevel_size = int(brick_height * 0.18)
const highlight_color = gx.rgba(255, 255, 255, 65)
const shade_color = gx.rgba(0, 0, 0, 65)
const highlight_color = gg.rgba(255, 255, 255, 65)
const shade_color = gg.rgba(0, 0, 0, 65)
struct Brick {
mut:
@ -108,7 +107,7 @@ fn (mut g Game) init_bricks() {
g.bricks << Brick{
x: col * (brick_width + 1) + xoffset
y: row * (brick_height + 1) + yoffset
c: gx.rgb(0x40 | rand.u8(), 0x40 | rand.u8(), 0x40 | rand.u8())
c: gg.rgb(0x40 | rand.u8(), 0x40 | rand.u8(), 0x40 | rand.u8())
value: 10 - row
}
g.nbricks++
@ -139,15 +138,15 @@ fn (mut g Game) draw() {
}
label1 := 'Level: ${g.nlevels:02} Points: ${g.npoints:06}'
label2 := 'Bricks: ${g.nbricks:03} Paddles: ${g.npaddles:02}'
g.ctx.draw_text(5, 3, label1, size: 24, color: gx.rgb(255, 255, 255))
g.ctx.draw_text(320, 3, label2, size: 24, color: gx.rgb(255, 255, 255))
g.ctx.draw_text(5, 3, label1, size: 24, color: gg.rgb(255, 255, 255))
g.ctx.draw_text(320, 3, label2, size: 24, color: gg.rgb(255, 255, 255))
sgl.pop_matrix()
g.ctx.end()
}
fn (g &Game) draw_ball() {
g.ctx.draw_circle_filled(g.ball_x, g.ball_y, g.ball_r, gx.red)
g.ctx.draw_circle_filled(g.ball_x, g.ball_y, g.ball_r, gg.red)
mut ball_r_less := g.ball_r
for _ in 0 .. 3 {
ball_r_less *= 0.8
@ -158,10 +157,10 @@ fn (g &Game) draw_ball() {
fn (g &Game) draw_paddle() {
roffset, rradius := -5, 18
g.ctx.draw_circle_filled(g.paddle_x - roffset, g.height, rradius, gx.blue)
g.ctx.draw_circle_filled(g.paddle_x + g.paddle_w + roffset, g.height, rradius, gx.blue)
g.ctx.draw_circle_filled(g.paddle_x - roffset, g.height, rradius, gg.blue)
g.ctx.draw_circle_filled(g.paddle_x + g.paddle_w + roffset, g.height, rradius, gg.blue)
g.ctx.draw_rect_filled(g.paddle_x, g.height - g.paddle_h + 2, g.paddle_w, g.paddle_h,
gx.blue)
gg.blue)
g.ctx.draw_rect_filled(g.paddle_x, g.height - g.paddle_h + 2, g.paddle_w, bevel_size,
highlight_color)
}

View file

@ -3,7 +3,6 @@
// Written by Stefan Schroeder in 2021 for the v project examples.
// See LICENSE for license information.
import gg
import gx
import math
import time
@ -19,13 +18,13 @@ const th = 25
// Padding of tic-mark to window border
const tp = 10
const tic_color = gx.Color{
const tic_color = gg.Color{
r: 50
g: 50
b: 50
}
const hand_color = gx.black
const second_hand_color = gx.red
const hand_color = gg.black
const second_hand_color = gg.red
struct App {
minutes_tic []f32 = [f32(center - tw), tp, center + tw, tp, center + tw, tp, center + tw,
@ -85,7 +84,7 @@ fn on_frame(mut app App) {
// Rotate a polygon round the centerpoint
@[manualfree]
fn draw_convex_poly_rotate(mut ctx gg.Context, dpi_scale f32, points []f32, c gx.Color, angle f32) {
fn draw_convex_poly_rotate(mut ctx gg.Context, dpi_scale f32, points []f32, c gg.Color, angle f32) {
sa := math.sin(math.pi * angle / 180.0)
ca := math.cos(math.pi * angle / 180.0)
@ -151,7 +150,7 @@ fn main() {
width: design_size
height: design_size
window_title: 'Clock!'
bg_color: gx.white
bg_color: gg.white
user_data: app
frame_fn: on_frame
event_fn: on_event

18
examples/euler.v Normal file
View file

@ -0,0 +1,18 @@
// This example shows 2 solutions for https://projecteuler.net/problem=1 :
fn gauss_sum(n int) fn (int) int {
return fn [n] (m int) int {
return m * ((n - 1) / m) * ((n - 1) / m + 1) / 2
}
}
gs := gauss_sum(1000)
println('O(1) arithmetic progression sum: ${gs(3) + gs(5) - gs(15)}')
// A brute force solution, by checking every n in the range:
mut sum := 0
for n in 1 .. 1000 {
if n % 3 == 0 || n % 5 == 0 {
sum += n
}
}
println('O(n) brute force calculated sum: ${sum}')

View file

@ -1,6 +1,5 @@
import objects
import gg
import gx
import rand
struct App {
@ -99,7 +98,7 @@ fn main() {
width: app.ui.width
height: app.ui.height
window_title: 'Fireworks!'
bg_color: gx.black
bg_color: gg.black
user_data: app
frame_fn: on_frame
event_fn: on_event

View file

@ -1,10 +1,10 @@
module objects
import gx
import gg
import rand
pub fn random_color() gx.Color {
return gx.Color{
pub fn random_color() gg.Color {
return gg.Color{
r: rand.u8()
g: rand.u8()
b: rand.u8()

View file

@ -1,11 +1,10 @@
module objects
import gg
import gx
pub struct Particle {
pub mut:
color gx.Color
color gg.Color
pos Vector
vel Vector
accel Vector

View file

@ -1,12 +1,11 @@
module objects
import gg
import gx
import rand
pub struct Rocket {
pub mut:
color gx.Color
color gg.Color
pos Vector
vel Vector
accel Vector

View file

@ -1,12 +1,11 @@
module main
import gg
import gx
import automaton
const screen_width = 800
const screen_height = 600
const filled_color = gx.blue
const filled_color = gg.blue
@[live]
fn print_automaton(app &App) {
@ -40,14 +39,14 @@ fn main() {
a: automaton.gun()
}
app.gg = gg.new_context(
bg_color: gx.white
bg_color: gg.white
frame_fn: frame
user_data: &app
width: screen_width
height: screen_height
create_window: true
resizable: false
window_title: 'v life (with gg, gx)'
window_title: 'v life (with gg)'
)
app.gg.run()
}

View file

@ -2,7 +2,6 @@ module main
import os
import gg
import gx
import math
@[heap]
@ -42,7 +41,7 @@ pub fn (mut window Window) draw(_ voidptr) {
x: myconfig.img_rect.x + f32(math.sin(f32(window.ctx.frame) / 10.0) * 60)
y: myconfig.img_rect.y + f32(math.cos(f32(window.ctx.frame) / 10.0) * 60)
}
color: gx.Color{255, 0, 0, 255}
color: gg.Color{255, 0, 0, 255}
effect: .add
})
@ -54,7 +53,7 @@ pub fn (mut window Window) draw(_ voidptr) {
x: myconfig.img_rect.x + f32(math.sin(f32(window.ctx.frame) / 10.0) * 80)
y: myconfig.img_rect.y + f32(math.cos(f32(window.ctx.frame) / 10.0) * 80)
}
color: gx.Color{0, 255, 0, 255}
color: gg.Color{0, 255, 0, 255}
effect: .add
})
@ -66,7 +65,7 @@ pub fn (mut window Window) draw(_ voidptr) {
x: myconfig.img_rect.x + f32(math.sin(f32(window.ctx.frame) / 10.0) * 100)
y: myconfig.img_rect.y + f32(math.cos(f32(window.ctx.frame) / 10.0) * 100)
}
color: gx.Color{0, 0, 255, 255}
color: gg.Color{0, 0, 255, 255}
effect: .add
})
@ -78,7 +77,7 @@ pub fn (mut window Window) draw(_ voidptr) {
x: 50
y: 0
}
color: gx.Color{255, 0, 0, 255}
color: gg.Color{255, 0, 0, 255}
effect: .add
})
@ -89,7 +88,7 @@ pub fn (mut window Window) draw(_ voidptr) {
x: 50
y: 50
}
color: gx.Color{0, 255, 0, 255}
color: gg.Color{0, 255, 0, 255}
effect: .add
})
@ -100,7 +99,7 @@ pub fn (mut window Window) draw(_ voidptr) {
x: 50
y: 100
}
color: gx.Color{0, 0, 255, 255}
color: gg.Color{0, 0, 255, 255}
effect: .add
})
@ -115,7 +114,7 @@ fn main() {
width: 800
height: 600
user_data: window
bg_color: gx.gray
bg_color: gg.gray
// FNs
init_fn: window.init
frame_fn: window.draw

View file

@ -1,16 +1,15 @@
module main
import gg
import gx
import math
const win_width = 700
const win_height = 800
const bg_color = gx.white
const bg_color = gg.white
// A transparent color is used to aid in verifying that
// rendering is precise on each of the arc types (e.g. no overlapping or double rendered slices)
const colour = gx.rgba(100, 100, 0, 100)
const colour = gg.rgba(100, 100, 0, 100)
enum Selection {
segs = 0

View file

@ -1,7 +1,6 @@
module main
import gg
import gx
const points = [f32(200.0), 200.0, 200.0, 100.0, 400.0, 100.0, 400.0, 300.0]
@ -14,7 +13,7 @@ mut:
fn main() {
mut app := &App{}
app.gg = gg.new_context(
bg_color: gx.rgb(174, 198, 255)
bg_color: gg.rgb(174, 198, 255)
width: 600
height: 400
window_title: 'Cubic Bézier curve'
@ -31,8 +30,8 @@ fn (mut app App) change(delta int) {
fn frame(mut app App) {
app.gg.begin()
app.gg.draw_cubic_bezier_in_steps(points, u32(app.steps), gx.blue)
app.gg.draw_cubic_bezier_recursive(points, gx.rgba(255, 50, 50, 150))
app.gg.draw_cubic_bezier_in_steps(points, u32(app.steps), gg.blue)
app.gg.draw_cubic_bezier_recursive(points, gg.rgba(255, 50, 50, 150))
app.gg.end()
if app.gg.pressed_keys[int(gg.KeyCode.down)] {
app.change(-1)

View file

@ -1,7 +1,6 @@
module main
import gg
import gx
const rate = f32(1) / 60 * 10
@ -34,7 +33,7 @@ fn main() {
anim: &Anim{}
}
app.gg = gg.new_context(
bg_color: gx.rgb(174, 198, 255)
bg_color: gg.rgb(174, 198, 255)
width: 600
height: 400
window_title: 'Animated cubic Bézier curve'
@ -61,7 +60,7 @@ fn frame(mut app App) {
points := [p1_x, p1_y, ctrl_p1_x, ctrl_p1_y, ctrl_p2_x, ctrl_p2_y, p2_x, p2_y]
app.gg.begin()
app.gg.draw_cubic_bezier(points, gx.blue)
app.gg.draw_cubic_bezier(points, gg.blue)
app.gg.end()
app.anim.advance()
}

View file

@ -1,12 +1,11 @@
module main
import gg
import gx
import sokol.sapp
fn main() {
mut ctx := gg.new_context(
bg_color: gx.white
bg_color: gg.white
window_title: 'Cursor'
frame_fn: frame
init_fn: init

View file

@ -2,7 +2,6 @@
module main
import gg
import gx
import rand
import time
@ -37,7 +36,7 @@ fn main() {
fn rain(mut app App) {
app.ctx = gg.new_context(
bg_color: gx.rgb(0, 0, 0)
bg_color: gg.rgb(0, 0, 0)
width: app.screen_size.width
height: app.screen_size.height
user_data: app
@ -84,7 +83,7 @@ fn frame(mut app App) {
draw_rain_column(rc, app)
}
app.ctx.draw_text(app.screen_size.width / 2 - 190, app.screen_size.height - 15, 'press `f` to toggle fullscreen, Up/Down arrows to change speed',
color: gx.gray
color: gg.gray
)
app.ctx.end()
vprintln('frame: ${app.ctx.frame} | app.cols: ${app.cols} | app.rows: ${app.rows} | app.rain_columns.len: ${app.rain_columns.len} | app.delay: ${app.delay}')
@ -98,9 +97,9 @@ fn vprintln(msg string) {
fn calc_sizes(mut app App) {
app.screen_size = gg.window_size()
app.ctx.set_text_cfg(gx.TextCfg{
app.ctx.set_text_cfg(gg.TextCfg{
size: font_size
color: gx.green
color: gg.green
mono: true
})
// figure out how big character is in pixels
@ -138,7 +137,7 @@ fn draw_rain_column(rc RainColumn, app App) {
else { u8(255) }
}
at_head := i == rc.head - 1
cfg := gx.TextCfg{
cfg := gg.TextCfg{
size: font_size
color: gg.Color{
r: if at_head { u8(255) } else { 0 }

View file

@ -1,7 +1,6 @@
module main
import gg
import gx
import sokol.sapp
const max_files = 12
@ -16,7 +15,7 @@ mut:
fn main() {
mut app := &App{}
app.gg = gg.new_context(
bg_color: gx.rgb(174, 198, 255)
bg_color: gg.rgb(174, 198, 255)
width: 600
height: 400
window_title: 'Drag and drop'
@ -45,8 +44,8 @@ fn my_event_manager(mut ev gg.Event, mut app App) {
fn frame(mut app App) {
app.gg.begin()
mut txt_conf := gx.TextCfg{
color: gx.black
mut txt_conf := gg.TextCfg{
color: gg.black
align: .left
size: int(text_size * app.gg.scale + 0.5)
}

Some files were not shown because too many files have changed in this diff Show more