Skip to content

Commit 8f844ea

Browse files
committed
veb: deprecate vweb (part 3)
1 parent 8683e63 commit 8f844ea

11 files changed

+11
-5
lines changed

vlib/v/checker/checker.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -2777,8 +2777,8 @@ fn (mut c Checker) hash_stmt(mut node ast.HashStmt) {
27772777
fn (mut c Checker) import_stmt(node ast.Import) {
27782778
if node.mod == 'x.vweb' {
27792779
println('`x.vweb` is now `veb`. The module is no longer experimental. Simply `import veb` instead of `import x.vweb`.')
2780-
//} else if node.mod == 'vweb' {
2781-
// println('`vweb` has been deprecated. Please use the more stable and fast `veb` instead')
2780+
} else if node.mod == 'vweb' {
2781+
println('`vweb` has been deprecated. Please use the more stable and fast `veb` instead.')
27822782
}
27832783
c.check_valid_snake_case(node.alias, 'module alias', node.pos)
27842784
for sym in node.syms {

vlib/v/checker/tests/comptime_veb_vweb_call_err.out

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
`vweb` has been deprecated. Please use the more stable and fast `veb` instead.
12
vlib/v/checker/tests/comptime_veb_vweb_call_err.vv:5:2: error: `$veb.html()` must be called inside a web method, e.g. `fn (mut app App) foo(mut ctx Context) veb.Result { return $veb.html('index.html') }`
2-
3 |
3+
3 |
34
4 | fn main() {
45
5 | $veb.html('./templates/empty.html')
56
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vlib/v/checker/tests/invalid_vweb_param_type.out

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
`vweb` has been deprecated. Please use the more stable and fast `veb` instead.
12
vlib/v/checker/tests/invalid_vweb_param_type.vv:8:24: error: invalid type `[]bool` for parameter `list` in vweb app method `index` (only strings, numbers, and bools are allowed)
2-
6 |
3+
6 |
34
7 | @['/:list'; get]
45
8 | fn (mut app App) index(list []bool) vweb.Result {
56
| ~~~~

vlib/v/checker/tests/vweb_missing_result.out

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
`vweb` has been deprecated. Please use the more stable and fast `veb` instead.
12
vlib/v/checker/tests/vweb_missing_result.vv:9:1: error: vweb actions must return `vweb.Result`
23
7 | // actions must return results
34
8 | @['/foo/:bar']

vlib/v/checker/tests/vweb_routing_checks.out

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
`vweb` has been deprecated. Please use the more stable and fast `veb` instead.
12
vlib/v/checker/tests/vweb_routing_checks.vv:20:1: warning: mismatched parameters count between vweb method `App.bar` (1) and route attribute ['/bar'] (0)
23
18 | // segfault because path takes 0 vars and fcn takes 1 arg
34
19 | @['/bar']
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1+
`vweb` has been deprecated. Please use the more stable and fast `veb` instead.
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
done
2+
`vweb` has been deprecated. Please use the more stable and fast `veb` instead.
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
done
2+
`vweb` has been deprecated. Please use the more stable and fast `veb` instead.

0 commit comments

Comments
 (0)