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.
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."