Skip to content

Expose the build model as data: fallout describe --json and plan --json #642

Description

@ChrisonSimtian

Problem

To learn what a Fallout build can do, a tool has to read Build.cs, follow its partial classes, resolve the attributes, and re-run the dependency resolution in its head. --help renders that same information as human text, and there is no machine-readable form of it. There is also no way to ask what a target would run without running it.

Outcome

Two read-only commands that print the build model as JSON and never execute a target.

  • fallout describe --json — every target, the dependency edges (DependsOn, Before, After, Triggers), every parameter with its CLR type, default value and required flag, tool requirements, and descriptions.
  • fallout plan <target> --json — the ordered list of targets that would run, with skip reasons. This is the existing plan resolution with the executor not attached.

Acceptance criteria

  • fallout describe --json emits a schema-versioned document covering targets, dependency edges, parameters, and tool requirements
  • fallout plan <target> --json emits the resolved plan and invokes no target
  • Both commands leave the working tree untouched and run no external tool
  • Both exit non-zero with a machine-readable error when the build project fails to load
  • --help is rendered from the same model, so the human and machine views cannot drift

Notes

src/Fallout.Build/Execution/ExecutionPlanner.cs already computes the plan, then discards it into the console. #391 (the Serilog and NDJSON output work) names describe --json as a motivation but does not track it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttarget/backlogNo committed release year; long-tail / demand-driven

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions