Add a deprecated warning for the scanner keyword argument for Builder creation. ...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 6 Oct 2004 03:08:45 +0000 (03:08 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 6 Oct 2004 03:08:45 +0000 (03:08 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1113 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Builder.py
src/engine/SCons/Tool/midl.py

index dc9b733bebe14f46be6c20ee49a48364a631be61..cf8a4e9d4f1a919b4b41446c52ca18e6b2469612 100644 (file)
@@ -183,6 +183,9 @@ RELEASE 0.97 - XXX
     Make comparisons of Scanner objects more robust.  Add a name to
     an internal default ObjSourceScanner.
 
+  - Add a deprecated warning for use of the old "scanner" keyword argument
+    to Builder creation.
+
   From Christoph Wiedemann:
 
   - Add an Environment.SetDefault() method that only sets values if
index 8e46332d1e1fb5825cae6f81526e5fe8727e46b4..e9d4e117ba1e0540a7efc2db59c83085f031c627 100644 (file)
@@ -430,6 +430,11 @@ class BuilderBase:
                 "\tspecify the items as keyword arguments to the Builder() call instead.")
             overrides.update(overrides['overrides'])
             del overrides['overrides']
+        if overrides.has_key('scanner'):
+            SCons.Warnings.warn(SCons.Warnings.DeprecatedWarning,
+                                "The \"scanner\" keyword to Builder() creation has been deprecated;\n"
+                                "\tuse: source_scanner or target_scanner as appropriate.")
+            del overrides['scanner']
         self.overrides = overrides
 
         self.set_src_suffix(src_suffix)
index 843d31bf621ac4543a880adfc4690360f00d7491..6be91efd207dc18e1d1122f3cc26a4a482a57939 100644 (file)
@@ -57,7 +57,7 @@ midl_builder = SCons.Builder.Builder(action='$MIDLCOM',
                                      src_suffix = '.idl',
                                      suffix='.tlb',
                                      emitter = midl_emitter,
-                                     scanner = idl_scanner)
+                                     source_scanner = idl_scanner)
 
 def generate(env):
     """Add Builders and construction variables for midl to an Environment."""