deprecate `v runrepl` in favour of `v repl`
parent
ccf6134beb
commit
ddc04979a4
10
v.v
10
v.v
|
@ -14,9 +14,13 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
known_commands = ['run', 'build', 'version', 'doc']
|
known_commands = ['run', 'build', 'version', 'doc']
|
||||||
simple_tools = ['fmt', 'up', 'create', 'test', 'test-fmt', 'test-compiler', 'build-tools',
|
simple_tools = ['fmt',
|
||||||
|
'up',
|
||||||
|
'create',
|
||||||
|
'test', 'test-fmt', 'test-compiler',
|
||||||
'bin2v',
|
'bin2v',
|
||||||
'build-examples', 'build-vbinaries']
|
'repl',
|
||||||
|
'build-tools', 'build-examples', 'build-vbinaries']
|
||||||
)
|
)
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -110,6 +114,8 @@ fn v_command(command string, args []string) {
|
||||||
compiler.create_symlink()
|
compiler.create_symlink()
|
||||||
}
|
}
|
||||||
'runrepl' {
|
'runrepl' {
|
||||||
|
//TODO: remove this after 2020/02/01
|
||||||
|
eprintln('`v runrepl` has been deprecated. Please use `v repl` instead.')
|
||||||
compiler.launch_tool('vrepl', 'runrepl')
|
compiler.launch_tool('vrepl', 'runrepl')
|
||||||
}
|
}
|
||||||
'doc' {
|
'doc' {
|
||||||
|
|
|
@ -58,10 +58,10 @@ pub fn run_repl_file(wd string, vexec string, file string) ?string {
|
||||||
|
|
||||||
input_temporary_filename := 'input_temporary_filename.txt'
|
input_temporary_filename := 'input_temporary_filename.txt'
|
||||||
os.write_file(input_temporary_filename, input)
|
os.write_file(input_temporary_filename, input)
|
||||||
|
rcmd := '"$vexec" repl < $input_temporary_filename'
|
||||||
r := os.exec('"$vexec" runrepl < $input_temporary_filename') or {
|
r := os.exec(rcmd) or {
|
||||||
os.rm(input_temporary_filename)
|
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)
|
os.rm(input_temporary_filename)
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ Options/commands:
|
||||||
|
|
||||||
-obf Obfuscate the resulting binary.
|
-obf Obfuscate the resulting binary.
|
||||||
-compress Compress the resulting binary.
|
-compress Compress the resulting binary.
|
||||||
- Shorthand for `v runrepl`.
|
- Shorthand for `v repl`.
|
||||||
|
|
||||||
Options for debugging/troubleshooting v programs:
|
Options for debugging/troubleshooting v programs:
|
||||||
-g Generate debugging information in the backtraces. Add *V* line numbers to the generated executable.
|
-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.
|
up Update V. Run `v up` at least once per day, since V development is rapid and features/bugfixes are added constantly.
|
||||||
run <file.v> Build and execute the V program in file.v. You can add arguments for the V program *after* the file name.
|
run <file.v> Build and execute the V program in file.v. You can add arguments for the V program *after* the file name.
|
||||||
build <module> Compile a module into an object file.
|
build <module> 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.
|
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 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.
|
test folder/ Run all V test files located in the folder and its subfolders. You can also pass individual _test.v files too.
|
||||||
|
|
Loading…
Reference in New Issue