0 Replies Latest reply on Aug 4, 2008 12:18 AM by (Jono_Spiro)

    [svn] 2716: SDK-15848 - Conditional compilation constants defined in flex-config. xml are never used if a single constant is specified on the command line

    Level 1
      Revision: 2716
      Author: jspiro@adobe.com
      Date: 2008-08-04 01:18:12 -0700 (Mon, 04 Aug 2008)

      Log Message:
      -----------
      SDK-15848 - Conditional compilation constants defined in flex-config.xml are never used if a single constant is specified on the command line
      * There's a possibility this will break a conditional complication test which disallows overwriting an existing definition -- I don't know if that will break the build, but the test should be removed either way.
      * Using append syntax ("-define+=" on the command line or ant tasks, or append="true" in flex-config) and redefining a value works now if you use an already-defined namespace and name.
      * So your flex-config may have -define=CONFIG::debug,false, and you may want -define+=CONFIG::debug,true from the commandline build, or FB build.
      * Made the ASC ConfigVar fields final as a sanity check since overwriting is now allowed. It would be harder to track changes and subtle bugs if they were mutable. This means that you must build a new ConfigVar object if you need to make changes.

      Bugs: SDK-15848
      QA: Yes. Please read the updated javadocs in CompilerConfiguration. Tests need to be added to validate that overwriting is allowed, and happens correctly in different situations: I believe the order should be that flex-config is overwritten by a custom config (can we have more than one user config? is the order deterministic? I forget...), is overwritten by commandline or OEM. Did I miss any? (I didn't write code which changes this, it works however the existing configuration system allows overwriting and appending; if we have tests for that, maybe we don't need them duplicated for this feature.)
      Doc: Yes. Please read the updated javadocs in CompilerConfiguration.
      Reviewer: Pete

      Ticket Links:
      ------------
      http://bugs.adobe.com/jira/browse/SDK-15848
      http://bugs.adobe.com/jira/browse/SDK-15848

      Modified Paths:
      --------------
      flex/sdk/trunk/modules/asc/src/java/macromedia/asc/embedding/ConfigVar.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/internal/OEMConfiguration.java