The generator, heart of qooxdoo's tool chain, has been overhauled extensively for 0.8, close to a complete rewrite. Main objectives for the new implementation include

  • support for parts
  • run multiple jobs "in one go"
  • replace "make" and other GNU/Unix tools as far as possible, to cut down on prerequisites
  • support a unified application/library structure throughout the project
  • pave the way for an enhanced GUI-based build tool

The first and maybe most visible change the new generator brings for the users is the changed configuration. The current tool chain relies heavily on GNU's make, deploying various related Makefiles. The primary means to configure the build process is through Makefile variables. The new generator replaces these make tools with config files that are based on JSON, a data format that blends well with both Javascript and Python.

The challenge here was to use JSON's basic declarative syntax elements like dictionaries (maps), arrays and simple data types, and build upon them a semantics that is both rich, to provide a sufficient level of power and abstraction, and generic, to cover all necessary use cases. (It almost feels like defining a new XML schema...).

The current state of the issue is that a config file contains a single big map that keeps a varying number of keys that represent jobs. A job can be anything from copying files around to generating the build version of an application or its API documentation. Consequently, jobs deploy certain keywords to trigger those actions, along with necessary configuration data like where to look for source classes, where to place outputs, where to find resources, and so forth. To foster re-use (and limit unnecessary typing), config files deploy three basic mechanisms: They can include other config files, and jobs can "extend" each other (This works a bit like inheritance between classes; the parent job's settings are merged into the current job, which can add new settings or override some of the parent's settings). The third tool are string macros that are expanded in other strings in the config.

For the curious who want to get their feet wet and their hands dirty, the generator2 config page provides a lot of further stuff to read and ponder. Feedback welcome.