From e12ba2b67e2cae2c06ab407bb8bc3e4d56548dc3 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 4 Apr 2026 23:28:56 +0300 Subject: [PATCH] fixes --- .github/workflows/compare_pr_to_master.v | 9 ++++++--- vlib/v/tests/skip_unused/generics_method.vv | 2 +- vlib/v/tests/skip_unused/nested_generics_method.vv | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/compare_pr_to_master.v b/.github/workflows/compare_pr_to_master.v index 6ab59b72d..4215547ce 100755 --- a/.github/workflows/compare_pr_to_master.v +++ b/.github/workflows/compare_pr_to_master.v @@ -109,9 +109,12 @@ fn main() { r('git checkout v_repo_master') master_branch := gbranch() hline(' Compiling old V executables from branch: ${master_branch}, commit: ${gcommit()} ...') + // Use `make` to bootstrap the old V from the C sources on the master branch, + // because the new V compiler may have breaking changes that prevent it from + // compiling the old code directly. + xtime('make -j4') xtime('./v -o vold1 cmd/v') - xtime('./vold1 -o vold2 cmd/v') - xtime('./vold2 -no-parallel -o vold cmd/v') + xtime('./vold1 -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') @@ -126,7 +129,7 @@ fn main() { if compare_prod { show_size('vold_prod') } - r('rm -rf vold1 vold2') + r('rm -rf vold1') hline('File sizes so far ...') compare_size('ohw_master.c', 'nhw_current.c') diff --git a/vlib/v/tests/skip_unused/generics_method.vv b/vlib/v/tests/skip_unused/generics_method.vv index 8f9a7e835..03e325aa3 100644 --- a/vlib/v/tests/skip_unused/generics_method.vv +++ b/vlib/v/tests/skip_unused/generics_method.vv @@ -10,7 +10,7 @@ struct App[M] { f M } -fn (mut self App[M]) next[M, T](input T) f64 { +fn (mut self App[M]) next[M, T](_input T) f64 { $if M is Something { return 0 } $else { diff --git a/vlib/v/tests/skip_unused/nested_generics_method.vv b/vlib/v/tests/skip_unused/nested_generics_method.vv index 64843e65a..1c6249b04 100644 --- a/vlib/v/tests/skip_unused/nested_generics_method.vv +++ b/vlib/v/tests/skip_unused/nested_generics_method.vv @@ -15,11 +15,11 @@ fn (mut c Calc[S]) next[T](input T) f64 { } } -fn (mut t TypeA) next[T](input T) f64 { +fn (mut t TypeA) next[T](_input T) f64 { return 10 } -fn (mut t TypeB) next[T](input T) f64 { +fn (mut t TypeB) next[T](_input T) f64 { return 11 } -- 2.39.5