Build errors with `make`: error: type `sync.WaitGroup` is private; type `v.depgraph.DepGraph` is private; …
SamuelMarks opened this issue · comments
Samuel Marks commented
V version: v0.2.x
OS: macOS 12.4 (21F79)
What did you do?
$ unzip v_macos.zip
$ cd v && make
What did you expect to see?
Should build v
What did you see instead?
cd ./vc && git clean -xf && git pull --quiet
cd ./thirdparty/tcc && git clean -xf && git pull --quiet
cc -std=gnu99 -w -o v1.exe ./vc/v.c -lm -lpthread
./v1.exe -no-parallel -o v2.exe cmd/v
vlib/sync/pool/pool.v:20:23: error: type `sync.WaitGroup` is private
18 | results []voidptr
19 | ntask u32 // reading/writing to this should be atomic
20 | waitgroup sync.WaitGroup
| ~~~~~~~~~
21 | shared_context voidptr
22 | thread_contexts []voidptr
vlib/v/ast/scope.v:45:12: error: `s` is immutable, cannot have a mutable reference to an immutable object
43 |
44 | pub fn (s &Scope) find(name string) ?ScopeObject {
45 | for sc := s; true; sc = sc.parent {
| ^
46 | if name in sc.objects {
47 | return unsafe { sc.objects[name] }
vlib/v/ast/scope.v:58:12: error: `s` is immutable, cannot have a mutable reference to an immutable object
56 | // selector_expr: name.field_name
57 | pub fn (s &Scope) find_struct_field(name string, struct_type Type, field_name string) ?ScopeStructField {
58 | for sc := s; true; sc = sc.parent {
| ^
59 | if field := sc.struct_fields[name] {
60 | if field.struct_type == struct_type && field.name == field_name {
vlib/v/checker/checker.v:177:18: error: `ast_file_` is immutable, cannot have a mutable reference to an immutable object
175 |
176 | pub fn (mut c Checker) check(ast_file_ &ast.File) {
177 | mut ast_file := ast_file_
| ~~~~~~~~~
178 | c.reset_checker_state_at_start_of_new_file()
179 | c.change_current_file(ast_file)
vlib/v/checker/fn.v:875:26: error: `param_typ_sym` is immutable, cannot have a mutable reference to an immutable object
873 | }
874 | }
875 | mut final_param_sym := param_typ_sym
| ~~~~~~~~~~~~~
876 | mut final_param_typ := param.typ
877 | if func.is_variadic && param_typ_sym.info is ast.Array {
vlib/v/checker/fn.v:1347:25: error: `exp_arg_sym` is immutable, cannot have a mutable reference to an immutable object
1345 | arg.pos)
1346 | }
1347 | mut final_arg_sym := exp_arg_sym
| ~~~~~~~~~~~
1348 | mut final_arg_typ := exp_arg_typ
1349 | if method.is_variadic && exp_arg_sym.info is ast.Array {
vlib/v/parser/containers.v:92:23: error: `var` is immutable, cannot have a mutable reference to an immutable object
90 | default_expr = p.expr(0)
91 | has_it = if var := p.scope.find_var('it') {
92 | mut variable := var
| ~~~
93 | is_used := variable.is_used
94 | variable.is_used = true
vlib/v/parser/containers.v:151:23: error: `var` is immutable, cannot have a mutable reference to an immutable object
149 | default_expr = p.expr(0)
150 | has_it = if var := p.scope.find_var('it') {
151 | mut variable := var
| ~~~
152 | is_used := variable.is_used
153 | variable.is_used = true
vlib/v/callgraph/callgraph.v:36:27: error: type `v.dotgraph.DotGraph` is private
34 | dot_caller_name string
35 | is_caller_used bool
36 | dg dotgraph.DotGraph
| ~~~~~~~~
37 | }
38 |
vlib/v/builder/builder.v:268:36: error: type `v.depgraph.DepGraph` is private
266 |
267 | // graph of all imported modules
268 | pub fn (b &Builder) import_graph() &depgraph.DepGraph {
| ~~~~~~~~~~~~~~~~~~
269 | builtins := util.builtin_module_parts.clone()
270 | mut graph := depgraph.new_dep_graph()
make: *** [all] Error 1
yuyi commented
Fixed, Please get the latest vlang.