Menu

Compatibility Mode SWC Policy (Mini Specification)

SourceForge Editorial Staff

Summary and Background


Currently when a developer leverages the MX-Only work flow in Flash Builder, all Flex 4 swcs are absent from the project's library path automatically.

When a command line developer leverages the compatibility-version flag to set 3.x compatibility or when a Flash Builder user enables Flex 3 compatibility mode, unlike an MX-Only project, we still continue to link with the Flex 4 libraries. Unfortunately we have found that the use of Flex 4 components and classes in Flex 3 compatibility mode can be problematic, leading to inconsistent and buggy behavior.

Going forward the Flex compiler will now exclude spark.swc, spark_rb.swc, and sparkskins.swc automatically from the library path when the compatibility-version specified at compile-time is less than 4. The flex compiler will also exclude any other swcs in the library-path whose minimumSupportedVersion is greater than the currently specified compatibility-version.

Feature Details


  • All Flex 4 framework swcs will now be marked with a minimum supported version by adding a new attribute to the flex version tag (minimumSupportedVersion). The flex version tag is a component of the swc catalog. e.g.:

    <?xml version="1.0" encoding ="utf-8"?>
    <swc xmlns="http://www.adobe.com/flash/swccatalog/9">
    <versions>
    <swc version="1.2"/>
    <flex version="4.0.0" build="0" minimumSupportedVersion="4.0.0"/>
    </versions>

  • If a compatibility-version is specified that is less than the minimum supported version for a given swc, that swc will be excluded from linkage. A compiler error will be issued in this case, e.g.: "Error: The dependency spark.components.Application from spark.swc has a minimum supported version of 4.0.0, which is higher than the compatibility version, 3.0.0."

  • By default if no minimum supported version is specified when building a new library, the minimum supported version is assumed to be the major version prior to the current SDK version (e.g. 3.0.0) OR the largest minimumSupportedVersion of any dependent swcs (whichever is greater).
  • spark.swc will specify an explicit minimum of 4.0.0. sparkskins.swc and spark_rb will take on a minimum of 4.0.0 due to their dependency on spark.swc.

Related

Wiki: Flex 4

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.