Skip to content

cli: add a validate subcommand #81

Description

@OmarAlJarrah

Problem

The CLI has exactly one subcommand. A CI spec-lint gate — an obvious early adopter use for morphic — must today marshal and write the full IR (~95 MB for the GitHub REST spec, or -o /dev/null still paying ~390 ms + whole-document buffers) just to get diagnostics and an exit code.

Proposed direction

morphic validate <spec>: the compile pipeline minus the marshal/write step — diagnostics + exit code only, honoring --fail-on (and the diagnostics-output improvements in #79). Size: S. This also sets up the subcommand structure Milestone 3's emitter verb will need.

Acceptance

  • morphic validate spec.yaml produces the same diagnostics and exit code as compile, with no IR output and measurably lower cost on large specs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions