From fb95f4cc6f3879bf6c8740edcd753274536a2b1e Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 7 Sep 2025 08:46:08 +0300 Subject: [PATCH 1/3] ci: run input_rune_iterator_test.v only on linux for now --- vlib/builtin/input_rune_iterator_test.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/builtin/input_rune_iterator_test.v b/vlib/builtin/input_rune_iterator_test.v index e121ead2ba..0124c9a5d3 100644 --- a/vlib/builtin/input_rune_iterator_test.v +++ b/vlib/builtin/input_rune_iterator_test.v @@ -1,4 +1,4 @@ -// vtest build: !windows +// vtest build: linux // vtest retry: 2 import os import time From 7cba3a249b469df01cdc0e7a20c6d6d873a85138 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 7 Sep 2025 08:49:15 +0300 Subject: [PATCH 2/3] ci: retry vlib/v/eval/interpret_test.v 2 times --- vlib/v/eval/interpret_test.v | 1 + 1 file changed, 1 insertion(+) diff --git a/vlib/v/eval/interpret_test.v b/vlib/v/eval/interpret_test.v index f19e19ed03..77fbbdf32f 100644 --- a/vlib/v/eval/interpret_test.v +++ b/vlib/v/eval/interpret_test.v @@ -1,3 +1,4 @@ +// vtest retry: 2 import os import benchmark import term From 6e0fd17a721362b53218cddd8d2ef230e76aba44 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 7 Sep 2025 03:11:22 -0300 Subject: [PATCH 3/3] veb: fix generic field access from alias (fix #25215) (#25246) --- vlib/v/gen/c/cgen.v | 2 +- .../tests/veb_aliased_app_and_context_test.v | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 vlib/veb/tests/veb_aliased_app_and_context_test.v diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index c1e0368510..950599f36e 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -4479,7 +4479,7 @@ fn (mut g Gen) selector_expr(node ast.SelectorExpr) { } // struct embedding mut has_embed := false - if sym.info in [ast.Struct, ast.Aggregate] { + if sym.info in [ast.Alias, ast.Struct, ast.Aggregate] { if node.generic_from_embed_types.len > 0 && sym.info is ast.Struct { if sym.info.embeds.len > 0 { mut is_find := false diff --git a/vlib/veb/tests/veb_aliased_app_and_context_test.v b/vlib/veb/tests/veb_aliased_app_and_context_test.v new file mode 100644 index 0000000000..c4c9999329 --- /dev/null +++ b/vlib/veb/tests/veb_aliased_app_and_context_test.v @@ -0,0 +1,53 @@ +import os +import veb +import time +import net.http + +const app_port = 29123 +const exit_after = 10 * time.second + +pub struct Context { + veb.Context +} + +pub struct App { + veb.Middleware[Context] + veb.Controller + veb.StaticHandler + started chan bool +} + +pub fn (mut app App) before_accept_loop() { + app.started <- true +} + +type AliasApp = App +type AliasContext = Context + +fn testsuite_begin() { + os.chdir(os.dir(@FILE))! + spawn fn () { + time.sleep(exit_after) + assert true == false, 'timeout reached!' + exit(1) + }() +} + +fn test_aliased_app_compiles_and_starts() { + mut app := &AliasApp{} + spawn veb.run_at[AliasApp, AliasContext](mut app, + port: app_port + timeout_in_seconds: 2 + family: .ip + ) + eprintln('waiting for app to start ...') + _ := <-app.started + eprintln('>>> app was started') +} + +fn test_static_root() { + x := http.get('http://127.0.0.1:${app_port}/')! + eprintln('>>>> http request was sent and received') + assert x.status() == .not_found + assert x.body == '404 Not Found' +}