Skip to content

[fud2] Tracker: Refactor fud2 Plans to Use an Internal Language #2570

@jku20

Description

@jku20

Currently fud2 planner output a list of ops paired with used output states as the output of planners. After, files are assigned to these states and then this is lowered to ninja. This representation makes supporting more varied planners difficult. For example, an op may take two files of the same type. With this representation of a planner output, a planner has no input on which file gets assigned to which op's argument. Additionally, an adhoc internal representation makes it difficult to reason about extensions to fud2 ops such as extensions to fud2 ops which could combine similar ops.

To solve this, I am proposing an internal language to describe processing files using ops called flang (fud lang). It currently is composed of a list of function calls, each of which assigns some set of variables.

A slightly more detailed description of flang syntax and a draft of a parser for that syntax can be found in #2555.

Below is a list of tasks to swap out fud2's middle bit to use flang:

An easy way to verify most of this issue has been implemented is when any planner can dump a plan using the json-plan mode and then load and run that same plan using the json planner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions