refactor(lower): split front ends into asap-frontend-promql/-sql + facade (#57, phase 4) - #61
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4 of #57 — the riskiest split, now landed. Splits
loweralong 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.asap-frontend-promql.Why the error had to be partitioned
The old monolithic
LoweringErrorembedded aDataFusionError, so a naive split would still make the PromQL crate pull DataFusion. Splitting it intoPromqlError/SqlError(language-neutral variants mirrored, not shared) is what makes the quarantine real:No behavior change — each moved module aliases its error back to
LoweringErrorso bodies are untouched. Full suite green (27 binaries), clippy clean.Part of #57.
🤖 Generated with Claude Code