Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ ci-rust: setup-python
cargo clippy --workspace {{WORKSPACE_EXCLUDE}} --all-targets -- -D warnings
cargo build --release --workspace {{WORKSPACE_EXCLUDE}}
cargo build --examples --workspace {{WORKSPACE_EXCLUDE}}
# MLIR-free module-seam feature combinations (issue #407). Runs after
# the release workspace build so `cargo build --release -p quonc` is a
# cache hit and the dev-profile MLIR-free builds reuse clippy's deps.
just ci-feature-seams
export PATH="$PWD/.venv/bin:$PATH"
export QUON_REQUIRE_LIT=1
cargo nextest run --workspace {{WORKSPACE_EXCLUDE}}
Expand Down Expand Up @@ -209,6 +213,24 @@ na-rap-sweep:
--csv /tmp/quon_na_rap_sweep/rap_table_i_sweep.csv
echo "wrote /tmp/quon_na_rap_sweep/rap_table_i_sweep.csv"

# Feature-combination module-seam checks (issue #407). Verifies the
# MLIR-free seams stay MLIR-free: parser-only, analysis-only, and the
# MLIR-free neutral-atom library build without linking LLVM/MLIR, while the
# full compiler combination (quonc with frontend `full` + quon_na `mlir`)
# still builds. Run inside `ci-rust` so the `--release -p quonc` line reuses
# the release workspace build above as a cache hit.
ci-feature-seams:
#!/usr/bin/env bash
set -euo pipefail
echo "==> frontend parser-only (no MLIR)"
cargo build -p frontend --no-default-features
echo "==> frontend analysis-only (no MLIR)"
cargo build -p frontend --no-default-features --features analyze
echo "==> quon_na MLIR-free (no LLVM/MLIR)"
cargo build -p quon_na --no-default-features
echo "==> quonc full compiler (frontend full + quon_na mlir)"
cargo build --release -p quonc

# quonfmt · quonlint · LSP smoke on CI corpus
ci-tooling: _tooling-build
#!/usr/bin/env bash
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Static analysis and refinement-type checks for the Quon workspace.
| `just test-fast` | `cargo test --workspace --exclude flux_verify` (lit soft-skips if tools missing; no Aer) |
| `just test-ci` | Local CI parity: `ci-rust` + `ci-tooling` + `ci-docs-assert` (not the website build) |
| `just ci-rust` | What the `ci.yml` `rust` job runs (sets `QUON_REQUIRE_LIT`); its `cargo test --workspace` step already includes the sample corpus catalog lint (`quonc/tests/samples_catalog.rs`, ADR-0025 / #185) as an ordinary workspace test crate |
| `just ci-samples` | Local-only convenience: re-run just the sample corpus catalog lint (schema, paths, category coverage, README sections, `ci: smoke` typecheck) in isolation. **Not** part of `test-ci` or `ci.yml` — it would double-pay for what `ci-rust` already covers |
| `just ci-feature-seams` | Invoked inside `just ci-rust` (#407): builds frontend parser-only, frontend analysis-only, `quon_na` MLIR-free (no LLVM/MLIR link), and the full-compiler `quonc` combination to keep the MLIR-free module seams intact |
| `just ci-tooling` | What the `ci.yml` `tooling` job runs |
| `just tooling-full` | Broader local fmt/lint corpus (not CI) |
| `just qec-benchmarks-smoke` | #254 local convenience: one-cell ablation + nested Sinter (`--mode smoke`). CI smoke is the unittest in `just ci-rust`. |
Expand Down
6 changes: 4 additions & 2 deletions frontend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ default = ["full"]
# is buildable and testable without linking LLVM/MLIR (ADR-0038, issue #206).
analyze = ["dep:quon_core", "dep:z3"]
# `full`: the whole frontend including the `lower` → `quantum.circ` MLIR adapter,
# which pulls in `mlir_bridge` / `melior`. `quonc` / `quon_lsp` take this by
# default; `quonfmt` uses `default-features = false` (parser only).
# which pulls in `mlir_bridge` / `melior`. Only the compiler binary (`quonc`)
# opts into this; `quonfmt` (parser only), `quonlint`, and `quon_lsp`
# (analysis only) all use `default-features = false` so they never link
# LLVM/MLIR (ADR-0038, issue #407).
full = ["analyze", "dep:mlir_bridge", "dep:melior", "dep:anyhow"]

[dependencies]
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ pub mod pretty;
// specialize) gates on `analyze`, which pulls in only `quon_core` / `z3` — no
// `mlir_bridge` / `melior`. `specialized_circuit` (issue #206) is the typed
// boundary between `elaborate` and `lower`. `lower` — the `quantum.circ` MLIR
// adapter — is the only module that needs `full` (Melior). Cargo unifies
// features across the workspace, so `quonfmt`'s `default-features = false`
// (parser only) never strips these from `quon_lsp` / `quonc` (`full`), and
// specialization is buildable/testable under `--features analyze` without
// linking LLVM/MLIR.
// adapter — is the only module that needs `full` (Melior). Only `quonc` opts
// into `full`; `quonfmt` (parser only), `quonlint`, and `quon_lsp` (analysis
// only) all use `default-features = false` so a tooling build never links
// LLVM/MLIR, and specialization is buildable/testable under `--features
// analyze` without linking LLVM/MLIR (ADR-0038, issue #407).
#[cfg(feature = "analyze")]
pub mod analysis;
#[cfg(feature = "analyze")]
Expand Down
2 changes: 1 addition & 1 deletion quon_lsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "quon_lsp"
path = "src/main.rs"

[dependencies]
frontend = { path = "../frontend" }
frontend = { path = "../frontend", default-features = false, features = ["analyze"] }
quonfmt = { path = "../quonfmt" }
quonlint = { path = "../quonlint" }
tower-lsp = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion quon_na/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository.workspace = true
description = "MLIR-free neutral-atom layout, schedule, and reporting types for Quon"

[features]
default = ["mlir"]
default = []
# Opt-in Flux refinement-type checking. Off by default so the stable workspace
# build never compiles `flux-rs`; enabled by `cargo flux -p quon_na
# --no-default-features --features flux` (nightly).
Expand Down
4 changes: 2 additions & 2 deletions quonc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ default = []
solver = ["quon_na/solver"]

[dependencies]
frontend = { path = "../frontend" }
frontend = { path = "../frontend", default-features = false, features = ["full"] }
mlir_bridge = { path = "../mlir_bridge" }
backend = { path = "../backend" }
quon_core = { path = "../quon_core" }
quon_na = { path = "../quon_na" }
quon_na = { path = "../quon_na", default-features = false, features = ["mlir"] }
quon_qec = { path = "../quon_qec" }
melior = { workspace = true }
clap = { workspace = true }
Expand Down
10 changes: 5 additions & 5 deletions quonlint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ repository.workspace = true

[features]
default = []
ir-analysis = ["dep:mlir_bridge", "dep:melior", "dep:backend"]
# quonlint only needs the Melior-free analysis pipeline (parse → desugar →
# typecheck → elaborate). IR/lowering rules are out of scope here; the
# `frontend` `analyze` feature pulls in `quon_core` / `z3` only — no
# `mlir_bridge` / `melior` (ADR-0038, issue #407).

[dependencies]
frontend = { path = "../frontend" }
frontend = { path = "../frontend", default-features = false, features = ["analyze"] }
quon_core = { path = "../quon_core" }
backend = { path = "../backend", optional = true }
mlir_bridge = { path = "../mlir_bridge", optional = true }
melior = { workspace = true, optional = true }
thiserror = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
Expand Down
Loading