Skip to content

Commit 14e5ba3

Browse files
committed
fix CI regressions across V1 and V3
1 parent 539f2bc commit 14e5ba3

25 files changed

Lines changed: 218 additions & 118 deletions

cmd/v/macos_v3_test.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,8 @@ fn main() {
10441044
environment['VFLAGS'] = ''
10451045
environment['VOSARGS'] = ''
10461046
mut process := os.new_process(@VEXE)
1047-
process.set_args(['-ownership', '-d=ownership', '-gc', 'none', '-o', output, source])
1047+
process.set_args(['-ownership', '-no-parallel', '-d=ownership', '-gc', 'none', '-o', output,
1048+
source])
10481049
process.set_environment(environment)
10491050
process.set_redirect_stdio()
10501051
process.run()

vlib/net/websocket/tests/autobahn/ws_test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COPY ./ /src/
55

66
WORKDIR /src
77

8-
RUN make CC=clang
8+
RUN make fresh_tcc CC=clang && make CC=clang
99

1010
RUN /src/v /src/vlib/net/websocket/tests/autobahn/autobahn_server.v
1111
RUN chmod +x /src/vlib/net/websocket/tests/autobahn/autobahn_server

vlib/v/checker/tests/assign_multi_mismatch.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ vlib/v/checker/tests/assign_multi_mismatch.vv:30:15: notice: condition is always
3737
29 | _ := if true { f() } else { f() }
3838
30 | _, _ := 0, if true { f() } else { f() }
3939
| ~~~~
40-
vlib/v/checker/tests/assign_multi_mismatch.vv:5:3: error: assignment mismatch: 1 variable 2 values
40+
vlib/v/checker/tests/assign_multi_mismatch.vv:5:9: error: unexpected `,` in expression, use `;` or a new line to separate statements
4141
3 | }
4242
4 |
4343
5 | _ := 0, 0
44-
| ~~
44+
| ^
4545
6 | _ := f()
4646
7 | _, _ := f()
4747
vlib/v/checker/tests/assign_multi_mismatch.vv:6:3: error: assignment mismatch: 1 variable but `f()` returns 2 values

vlib/v/gen/c/cgen.v

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13628,9 +13628,12 @@ fn (mut g Gen) type_default_impl(typ_ ast.Type, decode_sumtype bool) string {
1362813628
.sum_type {
1362913629
return if decode_sumtype { g.type_default_sumtype(typ, sym) } else { '{0}' }
1363013630
}
13631-
.interface, .multi_return, .thread {
13631+
.interface, .multi_return {
1363213632
return '{0}'
1363313633
}
13634+
.thread {
13635+
return '0'
13636+
}
1363413637
.alias {
1363513638
return g.type_default((sym.info as ast.Alias).parent_type)
1363613639
}

vlib/v/gen/c/embed.v

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ fn (mut g Gen) gen_embedded_data() {
145145
*/
146146
// Declare the index before any generated helper references it, to keep MSVC happy.
147147
index_len := g.embedded_files.len + 1
148-
g.embedded_data.writeln('static const v__embed_file__EmbedFileIndexEntry _v_embed_file_index[${index_len}];')
148+
if g.is_cc_msvc {
149+
g.embedded_data.writeln('static const v__embed_file__EmbedFileIndexEntry _v_embed_file_index[${index_len}];')
150+
}
149151
for i, emfile in g.embedded_files {
150152
g.embedded_data.write_string('static const unsigned char _v_embed_blob_${i}[${emfile.bytes.len}] = {\n ')
151153
for j := 0; j < emfile.bytes.len; j++ {

vlib/v/gen/c/struct.v

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,10 @@ fn (mut g Gen) struct_init_field_default(field_unwrap_typ ast.Type, sfield &ast.
12951295
g.write('/* autoref */&')
12961296
}
12971297

1298-
if (sfield.expected_type.has_flag(.option) && !field_unwrap_typ.has_flag(.option))
1298+
if sfield.expected_type.has_flag(.option) && field_unwrap_typ.has_flag(.option)
1299+
&& g.styp(sfield.expected_type) != g.styp(field_unwrap_typ) {
1300+
g.expr_opt_with_cast(sfield.expr, field_unwrap_typ, sfield.expected_type)
1301+
} else if (sfield.expected_type.has_flag(.option) && !field_unwrap_typ.has_flag(.option))
12991302
|| (sfield.expected_type.has_flag(.result) && !field_unwrap_typ.has_flag(.result)) {
13001303
g.expr_with_opt(sfield.expr, field_unwrap_typ, sfield.expected_type)
13011304
} else if sfield.expr is ast.LambdaExpr && sfield.expected_type.has_flag(.option) {
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
static const v__embed_file__EmbedFileIndexEntry _v_embed_file_index[2];
21
static const v__embed_file__EmbedFileIndexEntry _v_embed_file_index[2] = {
32
v__embed_file__EmbedFileData _v_embed_file_metadata(u64 ef_hash) {

vlib/v/gen/c/testdata/embed_with_prod_zlib.c.must_have

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#define _VPROD (1)
22

33
// V embedded data:
4-
static const v__embed_file__EmbedFileIndexEntry _v_embed_file_index[2];
54
static const unsigned char _v_embed_blob_0[139] = {
65
0x78,0x9c,0xd3,0xd7,0x57,0x28,0x2b,0x49,0x2d,0x2e,0x51,0x28,0x4b,0xcb,0x49,0x4c,
76

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.worker = 0,
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
struct ThreadHolder {
2+
worker thread
3+
}
4+
5+
fn main() {
6+
_ := ThreadHolder{}
7+
}

0 commit comments

Comments
 (0)