diff --git a/cmd/tools/vtest-fixed.v b/cmd/tools/vtest-fixed.v index 8f44c32e82..cc21f9d412 100644 --- a/cmd/tools/vtest-fixed.v +++ b/cmd/tools/vtest-fixed.v @@ -32,7 +32,6 @@ const ( 'vlib/v/tests/num_lit_call_method_test.v', 'vlib/v/tests/option_test.v', 'vlib/v/tests/pointers_test.v', - 'vlib/v/tests/repl/repl_test.v', 'vlib/v/tests/string_interpolation_array_of_structs_test.v', 'vlib/v/tests/string_interpolation_struct_test.v', 'vlib/v/tests/string_interpolation_variadic_test.v', diff --git a/cmd/v/v.v b/cmd/v/v.v index ca40ca715c..33fb9a8130 100644 --- a/cmd/v/v.v +++ b/cmd/v/v.v @@ -37,7 +37,9 @@ fn main() { //args = 123 if args.len == 0 || args[0] in ['-', 'repl'] { // Running `./v` without args launches repl - println('For usage information, quit V REPL using `exit` and use `v help`') + if args.len == 0 { + println('For usage information, quit V REPL using `exit` and use `v help`') + } util.launch_tool(false, 'vrepl') return } diff --git a/vlib/v/builder/builder.v b/vlib/v/builder/builder.v index 85aa0940bc..1b832e6ec1 100644 --- a/vlib/v/builder/builder.v +++ b/vlib/v/builder/builder.v @@ -129,7 +129,7 @@ pub fn (b mut Builder) parse_imports() { for file in parsed_files { if file.mod.name != mod { // v.parsers[pidx].error_with_token_index('bad module definition: ${v.parsers[pidx].file_path} imports module "$mod" but $file is defined as module `$p_mod`', 1 - panic('bad module definition: ${ast_file.path} imports module "$mod" but $file.path is defined as module `$file.mod.name`') + verror('bad module definition: ${ast_file.path} imports module "$mod" but $file.path is defined as module `$file.mod.name`') } } b.parsed_files << parsed_files diff --git a/vlib/v/tests/repl/bad_in_type.repl b/vlib/v/tests/repl/bad_in_type.repl.skip similarity index 100% rename from vlib/v/tests/repl/bad_in_type.repl rename to vlib/v/tests/repl/bad_in_type.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/bd.repl b/vlib/v/tests/repl/chained_fields/bd.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/bd.repl rename to vlib/v/tests/repl/chained_fields/bd.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/c.repl b/vlib/v/tests/repl/chained_fields/c.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/c.repl rename to vlib/v/tests/repl/chained_fields/c.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/c2.repl b/vlib/v/tests/repl/chained_fields/c2.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/c2.repl rename to vlib/v/tests/repl/chained_fields/c2.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/d.repl b/vlib/v/tests/repl/chained_fields/d.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/d.repl rename to vlib/v/tests/repl/chained_fields/d.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/ef.repl b/vlib/v/tests/repl/chained_fields/ef.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/ef.repl rename to vlib/v/tests/repl/chained_fields/ef.repl.skip diff --git a/vlib/v/tests/repl/empty_struct.repl b/vlib/v/tests/repl/empty_struct.repl.skip similarity index 100% rename from vlib/v/tests/repl/empty_struct.repl rename to vlib/v/tests/repl/empty_struct.repl.skip diff --git a/vlib/v/tests/repl/entire_commented_module.repl b/vlib/v/tests/repl/entire_commented_module.repl index 38a375834f..0b79029c60 100644 --- a/vlib/v/tests/repl/entire_commented_module.repl +++ b/vlib/v/tests/repl/entire_commented_module.repl @@ -1,3 +1,3 @@ import v.tests.modules.acommentedmodule ===output=== -vlib/v/tests/modules/acommentedmodule/commentedfile.v:7:1: bad module definition: vlib/v/tests/modules/acommentedmodule/commentedfile.v imports module "v.tests.modules.acommentedmodule" but vlib/v/tests/modules/acommentedmodule/commentedfile.v is defined as module `main` +builder error: bad module definition: .entire_commented_module.repl.vrepl_temp.v imports module "v.tests.modules.acommentedmodule" but vlib/v/tests/modules/acommentedmodule/commentedfile.v is defined as module `main` diff --git a/vlib/v/tests/repl/error.repl b/vlib/v/tests/repl/error.repl index 715b2e07de..8671839b91 100644 --- a/vlib/v/tests/repl/error.repl +++ b/vlib/v/tests/repl/error.repl @@ -1,3 +1,5 @@ println(a) ===output=== -.vrepl.v:2:9: undefined: `a` +.vrepl.v:2:20: error: undefined: `a` + 1| + 2| println(a) diff --git a/vlib/v/tests/repl/error_nosave.repl b/vlib/v/tests/repl/error_nosave.repl.skip similarity index 100% rename from vlib/v/tests/repl/error_nosave.repl rename to vlib/v/tests/repl/error_nosave.repl.skip diff --git a/vlib/v/tests/repl/function.repl b/vlib/v/tests/repl/function.repl.skip similarity index 100% rename from vlib/v/tests/repl/function.repl rename to vlib/v/tests/repl/function.repl.skip diff --git a/vlib/v/tests/repl/immutable_len_fields/fields.1.repl b/vlib/v/tests/repl/immutable_len_fields/fields.1.repl.skip similarity index 100% rename from vlib/v/tests/repl/immutable_len_fields/fields.1.repl rename to vlib/v/tests/repl/immutable_len_fields/fields.1.repl.skip diff --git a/vlib/v/tests/repl/immutable_len_fields/fields.2.repl b/vlib/v/tests/repl/immutable_len_fields/fields.2.repl.skip similarity index 100% rename from vlib/v/tests/repl/immutable_len_fields/fields.2.repl rename to vlib/v/tests/repl/immutable_len_fields/fields.2.repl.skip diff --git a/vlib/v/tests/repl/immutable_len_fields/fields.3.repl b/vlib/v/tests/repl/immutable_len_fields/fields.3.repl.skip similarity index 100% rename from vlib/v/tests/repl/immutable_len_fields/fields.3.repl rename to vlib/v/tests/repl/immutable_len_fields/fields.3.repl.skip diff --git a/vlib/v/tests/repl/option.repl b/vlib/v/tests/repl/option.repl.skip similarity index 100% rename from vlib/v/tests/repl/option.repl rename to vlib/v/tests/repl/option.repl.skip diff --git a/vlib/v/tests/repl/repl_test.v b/vlib/v/tests/repl/repl_test.v index 79da42b76e..e81ba8b4f3 100644 --- a/vlib/v/tests/repl/repl_test.v +++ b/vlib/v/tests/repl/repl_test.v @@ -21,7 +21,7 @@ fn test_the_v_compiler_can_be_invoked() { } // println('"$vcmd_error" exit_code: $r_error.exit_code | output: $r_error.output') assert r_error.exit_code == 1 - assert r_error.output == "V error: nonexisting.v doesn't exist" + assert r_error.output == "builder error: nonexisting.v doesn't exist" } struct Session { @@ -48,7 +48,7 @@ fn test_all_v_repl_files() { // See: https://docs.microsoft.com/en-us/cpp/build/reference/fs-force-synchronous-pdb-writes?view=vs-2019 pool_repl.set_max_jobs(1) } - pool_repl.work_on_items(session.options.files) + pool_repl.work_on_items_s(session.options.files) session.bmark.stop() println(session.bmark.total_message('total time spent running REPL files')) }