Deprecate the -source command.

This commit is contained in:
Qi Xiao 2020-08-16 23:07:30 +01:00
parent 735d30c0ff
commit ff7c500506
3 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,8 @@ or compiled, even if it is not executed:
- The `has-suffix` command is now deprecated. Use `str:has-suffix` instead.
- The `-source` command is now deprecated. Use `eval` instead.
The following deprecated features trigger a warning when the code is evaluated:
- Using `:` in slice indicies is deprecated. Use `..` instead.

View File

@ -251,6 +251,8 @@ func nextEvalCount() int {
//
// Read the named file, and evaluate it in the current scope.
//
// This function is deprecated. Use [eval](#eval) instead.
//
// Examples:
//
// ```elvish-transcript

View File

@ -152,6 +152,8 @@ func (cp *compiler) checkDeprecatedBuiltin(name string, r diag.Ranger) {
}
msg := ""
switch name {
case "-source~":
msg = `the "source" command is deprecated; use "eval" instead`
case "ord~":
msg = `the "ord" command is deprecated; use "str:to-codepoints" instead`
case "chr~":