Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-20816

Remove VERSION consts from all classes and replace them with compiler-generated version metadata on each class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Later
    • Adobe Flex SDK Previous
    • None
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      PARB has been discussing how ActionScript code should be versioned. We accepted Alex's recommendation that we need to have version info in every class, similar to what Flex provides with its mx_internal VERSION:String const. However, we believe that it would be better if mxmlc implemented a new compiler option like -version="4.0.0.1234" that autogenerated metadata like [Version("4.0.0.1234")] on very class. Developers would access this metadata with describeType().

      The advantages of this approach include:

      1. Decreased memory usage.

      Erik Tierney wrote: "The metadata entry in the swf would be pretty small. It would be 2 strings added to the string table, and then the index of the 2 strings in the metadata entry. There is no runtime impact of metadata until you call describeType. At that time the VM goes pack and parses the metadata in the abc - other than that, the VM ignores it. "

      2. Fixing the problem that when we create new classes we often forget to include Version.as.

      3. Fixing the problem that the build system has to update a copy of Version.as for each SWC.

      4. Relying on fewer include statements, which pleases David Zuckerman.

      Pete Farland wrote: "As for compiler effort... it sounds pretty small... could we revisit after beta2?"

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: