author monikamaheshwari <monikamaheshwari1996@gmail.com>
Tue, 12 Mar 2019 15:13:24 +0000
changeset 521544 a9c9368e4902276951295263be5f88f00e589346
parent 479281 e3d9b7024efa256b0835b0acdd807d75121bdbdf
permissions -rw-r--r--
Bug 1422680 - simplify aboutReader.css font-size classes using CSS variables r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D22994

Loading Tasks

The full task graph generation involves creating tasks for each kind.  Kinds
are ordered to satisfy ``kind-dependencies``, and then the ``loader`` specified
in ``kind.yml`` is used to load the tasks for that kind. It should point to
a Python function like::

    def loader(cls, kind, path, config, parameters, loaded_tasks):

The ``kind`` is the name of the kind; the configuration for that kind
named this class.

The ``path`` is the path to the configuration directory for the kind. This
can be used to load extra data, templates, etc.

The ``parameters`` give details on which to base the task generation. See
:doc:`parameters` for details.

At the time this method is called, all kinds on which this kind depends
(that is, specified in the ``kind-dependencies`` key in ``config``)
have already loaded their tasks, and those tasks are available in
the list ``loaded_tasks``.

The return value is a list of inputs to the transforms listed in the kind's
``transforms`` property. The specific format for the input depends on the first
transform - whatever it expects. The final transform should be
``taskgraph.transform.task:transforms``, which produces the output format the
task-graph generation infrastructure expects.

The ``transforms`` key in ``kind.yml`` is further documented in
:doc:`transforms`.  For more information on how all of this works, consult the
docstrings and comments in the source code itself.