-
Notifications
You must be signed in to change notification settings - Fork 60
Description
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:
- [fud2] Json Parser for Serialized Plans #2564: Add serialization and deserialization of flang in JSON form.
- [fud2/flang] Represent Stdio in Flang #2568 Figure out how flang represents stdin and stdout
- [fud2] Paths dumpled by json-plan are relative to where fud2 was run #2569 Fix bug where paths for an emitted planner are relative to where
fud2was invoked instead of relative to where the hidden directoryfud2is run in is. - [fud2] Make Planners Return Flang #2572 Make all planners return 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.