4 Replies Latest reply on Feb 20, 2007 1:01 PM by rascalJDB

    Local configuration files - mxmlc compiler

    rascalJDB
      I'm baffled by the inability to override configuration variables in a local config file (i.e. myApp-config.xml) that have been defaulted in flex-config.xml. For example, I have a unit test runner application where I want to set 'verbose-stacktraces' to true, but since this is defaulted in flex-config.xml I get an error that the variable 'verbose-stacktraces' must only be set once. The livedocs lead you to believe that you can override any variable. Is this as designed or a bug?
        • 1. Re: Local configuration files - mxmlc compiler
          I am not having any issues with compiling using a local config file that contains the following:

          <compiler>
          <verbose-stacktraces>false</verbose-stacktraces>
          </compiler>

          The only way that I can reproduce what you are seeing is if I place the verbose-stracktrace node in the config file twice. The compiler options should have the following precedence order: command line, local config, default config
          • 2. Re: Local configuration files - mxmlc compiler
            rascalJDB Level 1
            Ok, so I dug a little deeper and you're partially right. My local config file looked like this when I got the error message:

            <compiler>
            <allow-source-path-overlap>true</allow-source-path-overlap>
            <library-path append="true">
            <path-element>lib/swc</path-element>
            </library-path>
            <source-path append="true">
            <path-element>locale/{locale}</path-element>
            </source-path>
            <verbose-stacktraces>true</verbose-stacktraces>
            </compiler>

            I found that if I moved the <verbose-stacktraces> tag to be the first child node under the compiler tag the compilation worked just fine. I'm not sure why it's reacting to where tags are, but I'm just happy that it works if ordered correctly. It would help if the livedocs mentioned this as well.

            FYI, I'm running the mxmlc command line compiler with Flex 2.0.1.
            • 3. Re: Local configuration files - mxmlc compiler
              Excellent catch. Looks like there is an issue in the configuration code. As soon as you set a configuration option with the append="true" attribute, it "appears" that it will try to append ALL subsequent nodes. So if you have any options that are NOT repeatable after the "append='true'", the compiler will throw the error that you are seeing. I have entered a bug for this.

              Thanks
              -brent
              • 4. Re: Local configuration files - mxmlc compiler
                rascalJDB Level 1
                Thanks for qualifying this Brent. Hopefully 2.0.2 is already in the works and is not being overshadowed by Moxy.