Skip to content

S7: report commands — check, explain, optimize, trace, bundle, ir, provenance #11

Closed

Description

@david-Darkcollective

Part of #17. Design: docs/design.md §3, §4.

Scope

Each view of a script is a command that writes one thing to stdout.

Command stdout API it uses
check nothing; diagnostics on stderr; --json for one document on stdout. Exit 0 or 3. validate
explain the physical plan (--json) explain, explainJson
optimize the rewritten Relix text, so it works as a filter (relix optimize q.relix > fast.relix); --report for the rules fired and the before/after trees optimized().render(), rewrites(), OptimizationReport
trace the event feed (rows discarded) stream(listener)
bundle the playground JSON bundle, still produced for a broken script QueryBundleJson
ir the IR report model().ir()
provenance annotated rows; --semiring, --weight provenance(semiring[, weight])

run --trace[=FILE] writes the event feed to stderr, or to FILE, while the rows go to stdout.

Dependencies

Acceptance

  • Every command end-to-end over the example scripts, including a script with several queries and one that does not analyse.
  • find … | xargs relix check exit behaviour.
  • run --trace produces rows on stdout and events on stderr in one run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliThe relix command itselfbacklogNot yet scheduledenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions