diff --git a/v.v b/v.v index 3da4b89037..8eb7296316 100644 --- a/v.v +++ b/v.v @@ -8,15 +8,19 @@ import ( benchmark os filepath - //v.types + // v.types // time ) const ( known_commands = ['run', 'build', 'version', 'doc'] - simple_tools = ['fmt', 'up', 'create', 'test', 'test-fmt', 'test-compiler', 'build-tools', - 'bin2v', - 'build-examples', 'build-vbinaries'] + simple_tools = ['fmt', + 'up', + 'create', + 'test', 'test-fmt', 'test-compiler', + 'bin2v', + 'repl', + 'build-tools', 'build-examples', 'build-vbinaries'] ) fn main() { @@ -110,6 +114,8 @@ fn v_command(command string, args []string) { compiler.create_symlink() } 'runrepl' { + //TODO: remove this after 2020/02/01 + eprintln('`v runrepl` has been deprecated. Please use `v repl` instead.') compiler.launch_tool('vrepl', 'runrepl') } 'doc' { diff --git a/vlib/compiler/tests/repl/runner/runner.v b/vlib/compiler/tests/repl/runner/runner.v index 07e997700b..f7b3be59fa 100644 --- a/vlib/compiler/tests/repl/runner/runner.v +++ b/vlib/compiler/tests/repl/runner/runner.v @@ -58,10 +58,10 @@ pub fn run_repl_file(wd string, vexec string, file string) ?string { input_temporary_filename := 'input_temporary_filename.txt' os.write_file(input_temporary_filename, input) - - r := os.exec('"$vexec" runrepl < $input_temporary_filename') or { + rcmd := '"$vexec" repl < $input_temporary_filename' + r := os.exec(rcmd) or { os.rm(input_temporary_filename) - return error('Could not execute "$vexec runrepl < $input_temporary_filename" ') + return error('Could not execute: $rcmd') } os.rm(input_temporary_filename) diff --git a/vlib/compiler/vhelp.v b/vlib/compiler/vhelp.v index 585ac965a7..6207194bf4 100644 --- a/vlib/compiler/vhelp.v +++ b/vlib/compiler/vhelp.v @@ -51,7 +51,7 @@ Options/commands: -obf Obfuscate the resulting binary. -compress Compress the resulting binary. - - Shorthand for `v runrepl`. + - Shorthand for `v repl`. Options for debugging/troubleshooting v programs: -g Generate debugging information in the backtraces. Add *V* line numbers to the generated executable. @@ -69,7 +69,7 @@ Commands: up Update V. Run `v up` at least once per day, since V development is rapid and features/bugfixes are added constantly. run Build and execute the V program in file.v. You can add arguments for the V program *after* the file name. build Compile a module into an object file. - runrepl Run the V REPL. If V is running in a tty terminal, the REPL is interactive, otherwise it just reads from stdin. + repl Run the V REPL. If V is running in a tty terminal, the REPL is interactive, otherwise it just reads from stdin. symlink Useful on Unix systems. Symlinks the current V executable to /usr/local/bin/v, so that V is globally available. test v Run all V test files, and compile all V examples. test folder/ Run all V test files located in the folder and its subfolders. You can also pass individual _test.v files too.