mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
deprecate v runrepl
in favour of v repl
This commit is contained in:
parent
ccf6134beb
commit
ddc04979a4
14
v.v
14
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' {
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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 <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.
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user