Compare commits

...

5 commits

Author SHA1 Message Date
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
5 changed files with 61 additions and 22 deletions

View file

@ -1,10 +1,11 @@
#!/bin/bash
echo "APT MIRRORS BEFORE:"
cat /etc/apt/apt-mirrors.txt
sudo sed -i 's@http://azure.archive.ubuntu.com@https://us.archive.ubuntu.com@gm' /etc/apt/apt-mirrors.txt
echo "APT MIRRORS AFTER:"
cat /etc/apt/apt-mirrors.txt
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/
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

@ -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,19 +30,17 @@ concurrency:
jobs:
v-compiles-puzzle-vibes:
runs-on: ubuntu-24.04
timeout-minutes: 30
timeout-minutes: 20
steps:
- uses: actions/checkout@v5
- uses: awalsh128/cache-apt-pkgs-action@v1.5.3
with:
packages: libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev
version: 1.0
- name: Build V
run: make && ./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'
- name: Install & Setup SDL
run: v retry -- v install sdl && v ~/.vmodules/sdl/setup.vsh
@ -48,14 +50,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

@ -1685,6 +1685,16 @@ fn (mut c Checker) fn_call(mut node ast.CallExpr, mut continue_check &bool) ast.
return ast.void_type
}
}
if !func.is_variadic && func.params.len < (param_i + arg_typ_sym.info.types.len) {
c.fn_call_error_have_want(
nr_params: func.params.len
nr_args: param_i + arg_typ_sym.info.types.len
params: func.params
args: node.args
pos: node.pos
)
return ast.void_type
}
out: for n in 0 .. arg_typ_sym.info.types.len {
curr_arg := arg_typs[n]
multi_param := if func.is_variadic && i >= func.params.len - 1 {

View file

@ -0,0 +1,15 @@
vlib/v/checker/tests/fn_call_arg_multi_err.vv:9:7: error: assignment mismatch: 1 variable but `a()` returns 2 values
7 |
8 | fn main() {
9 | rets := a()
| ~~
10 | b(1, rets)
11 | }
vlib/v/checker/tests/fn_call_arg_multi_err.vv:10:2: error: expected 2 arguments, but got 3
8 | fn main() {
9 | rets := a()
10 | b(1, rets)
| ~~~~~~~~~~
11 | }
Details: have (int literal, (int, int))
want (int, []int)

View file

@ -0,0 +1,11 @@
fn a() (int, int) {
return 1, 1
}
fn b(w int, arg []int) {
}
fn main() {
rets := a()
b(1, rets)
}