Skip to content

refactor(lower): split front ends into asap-frontend-promql/-sql + facade (#57, phase 4) - #61

Merged
zzylol merged 1 commit into
mainfrom
refactor/reorg-phase4-split-lower
Jul 2, 2026
Merged

refactor(lower): split front ends into asap-frontend-promql/-sql + facade (#57, phase 4)#61
zzylol merged 1 commit into
mainfrom
refactor/reorg-phase4-split-lower

Conversation

@zzylol

@zzylol zzylol commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Phase 4 of #57 — the riskiest split, now landed. Splits lower along its real seam so each front end pulls only its own parser.

Crates

  • asap-frontend-promql (dep: promql-parser) — promql.rs + lower_promql/lower_promql_batch; PromqlError (no DataFusion variant).
  • asap-frontend-sql (dep: datafusion) — sql/ + lower_sql/lower_sql_batch + SqlCatalog; SqlError (no Parse variant).
  • asap-lower — thin facade re-exporting both for callers that want one crate.
  • Corpora + conformance tests move to the front end they exercise; e2e (PromQL-only) now depends directly on asap-frontend-promql.

Why the error had to be partitioned

The old monolithic LoweringError embedded a DataFusionError, so a naive split would still make the PromQL crate pull DataFusion. Splitting it into PromqlError/SqlError (language-neutral variants mirrored, not shared) is what makes the quarantine real:

cargo tree -p asap-frontend-promql | grep -c datafusion   => 0
cargo tree -p asap-frontend-sql    | grep -c promql-parser => 0

No behavior change — each moved module aliases its error back to LoweringError so bodies are untouched. Full suite green (27 binaries), clippy clean.

Part of #57.

🤖 Generated with Claude Code

…cade (#57, phase 4)

Phase 4 of the crate reorg (#57): split the lower crate along its real
seam so each front end pulls only its own parser.

- `asap-frontend-promql` (dep: promql-parser) — promql.rs + `lower_promql`
  / `lower_promql_batch` + a `PromqlError` with no DataFusion variant.
- `asap-frontend-sql` (dep: datafusion) — sql/ + `lower_sql` /
  `lower_sql_batch` + `SqlCatalog` + a `SqlError` with no Parse variant.
- `asap-lower` — thin facade re-exporting both language paths for callers
  that want one crate.
- The corpora + conformance tests move to the front end they exercise;
  e2e (PromQL-only) now depends directly on asap-frontend-promql.

The old monolithic `LoweringError` embedded a `DataFusionError`, which
would have made the PromQL crate pull DataFusion. Partitioning it into
`PromqlError` / `SqlError` (language-neutral variants mirrored, not shared)
is what makes the quarantine real: `cargo tree` confirms the PromQL front
end pulls 0 datafusion and the SQL front end pulls 0 promql-parser.

No behavior change (per-module error aliased back to `LoweringError` so
bodies are untouched). Full workspace suite green; clippy --all-targets
clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit ccffab6 into main Jul 2, 2026
1 check passed
@zzylol
zzylol deleted the refactor/reorg-phase4-split-lower branch July 2, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant