summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-09-11 16:57:57 (GMT)
committerMats Wichmann <mats@linux.com>2019-09-12 13:47:40 (GMT)
commit2781e4e52b0910c408b0ffc7c0bc1b511a42a754 (patch)
treec1f5e13c370446abec1f9a39672df85466a3a749 /src/engine/SCons
parenteacd78c2b40a157977d22be5fa195b73e16befdb (diff)
downloadSCons-2781e4e52b0910c408b0ffc7c0bc1b511a42a754.zip
SCons-2781e4e52b0910c408b0ffc7c0bc1b511a42a754.tar.gz
SCons-2781e4e52b0910c408b0ffc7c0bc1b511a42a754.tar.bz2
Remove deprecated debug options
These options have been deprecated since 2007. They were originally announced to be disabled in SCons 2.0.0, but that didn't happen. Left the deprecated-debug-options behavior is in, but the dictionary of such options is now empty, and there's a new dict of removed options, and presence in that dict raises an exception. The four tests that were in test/Deprecated move to a new directory test/Removed and are simplified just to make sure invocation errors scons out. (git interprets most of these as remove/add for some reason) These appear to have been already removed from docs, so no doc impact. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'src/engine/SCons')
-rw-r--r--src/engine/SCons/Script/SConsOptions.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py
index c45cb01..add1150 100644
--- a/src/engine/SCons/Script/SConsOptions.py
+++ b/src/engine/SCons/Script/SConsOptions.py
@@ -584,9 +584,15 @@ def Parser(version):
help="Print build actions for files from CacheDir.")
def opt_invalid(group, value, options):
+ """report an invalid option from a group"""
errmsg = "`%s' is not a valid %s option type, try:\n" % (value, group)
return errmsg + " %s" % ", ".join(options)
+ def opt_invalid_rm(group, value, msg):
+ """report an invalid option from a group: recognized but removed"""
+ errmsg = "`%s' is not a valid %s option type " % (value, group)
+ return errmsg + msg
+
config_options = ["auto", "force" ,"cache"]
opt_config_help = "Controls Configure subsystem: %s." \
@@ -604,9 +610,11 @@ def Parser(version):
help="Search up directory tree for SConstruct, "
"build all Default() targets.")
- deprecated_debug_options = {
+ deprecated_debug_options = {}
+
+ removed_debug_options = {
"dtree" : '; please use --tree=derived instead',
- "nomemoizer" : ' and has no effect',
+ "nomemoizer" : '; there is no replacement',
"stree" : '; please use --tree=all,status instead',
"tree" : '; please use --tree=all instead',
}
@@ -618,11 +626,12 @@ def Parser(version):
def opt_debug(option, opt, value__, parser,
debug_options=debug_options,
- deprecated_debug_options=deprecated_debug_options):
+ deprecated_debug_options=deprecated_debug_options,
+ removed_debug_options=removed_debug_options):
for value in value__.split(','):
if value in debug_options:
parser.values.debug.append(value)
- elif value in list(deprecated_debug_options.keys()):
+ elif value in deprecated_debug_options:
parser.values.debug.append(value)
try:
parser.values.delayed_warnings
@@ -632,6 +641,9 @@ def Parser(version):
w = "The --debug=%s option is deprecated%s." % (value, msg)
t = (SCons.Warnings.DeprecatedDebugOptionsWarning, w)
parser.values.delayed_warnings.append(t)
+ elif value in removed_debug_options:
+ msg = removed_debug_options[value]
+ raise OptionValueError(opt_invalid_rm('debug', value, msg))
else:
raise OptionValueError(opt_invalid('debug', value, debug_options))