fix(codegen): parseable non-throwing Julia output; honest FFI relabel; Zig 0.13 build#48
Merged
Merged
Conversation
…; Zig 0.13 build
Closes three critical codegen defects plus the Zig build breakage.
- parser.rs: extract_parenthesised_args tracked only () depth, so
np.array([1,2,3]) emitted unparseable `collect([1)`. Now tracks (), [], {}
and string-literal depth (escape-aware). (G30)
- parser.rs: any qualifier.func() with a local-variable qualifier (df.dropna(),
result.to_csv()) was treated as a library call and codegen emitted
error("Unmapped call ...") inside run_pipeline -- so a "drop-in" module threw
on the first DataFrame call. Qualified calls now resolve only through the
import-alias table; unresolved local qualifiers are skipped, not errored. (G31)
- README/TOPOLOGY/0-AI-MANIFEST: relabelled honestly -- the operational pipeline
is the Rust codegen; the Idris2 ABI + Zig FFI layer is scaffolding, not built
by cargo nor dlopened by the CLI. Unmeasured speedup claims hedged. (G32)
- build.zig: fixed for Zig 0.13 (addInstallHeaderFile; version in
addSharedLibrary; linkLibC); added missing include/julianiser.h and
bench/bench.zig; fixed an integration test null comparison. (G33)
- Ignore Zig build cache/output.
Verified: cargo test 76 pass (was 59); cargo build --release ok; cargo clippy
clean; `zig build test` 7/7 + integration 20/20 from a clean cache.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UPFC9YQ7g9gc3VnRox42Q1
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.
Summary
Closes three critical codegen defects that made generated Julia unparseable or throwing, brings the docs in line with what the tool actually does, and repairs the Zig 0.13 build. Part of the Axiom.jl flagship / registry-infrastructure hardening effort.
Changes
src/codegen/parser.rs(G30):extract_parenthesised_argstracked only()depth, sonp.array([1,2,3])emitted unparseablecollect([1). Now tracks(),[],{}, and string-literal depth (escape-aware).src/codegen/parser.rs(G31): anyqualifier.func()with a local-variable qualifier (df.dropna(),result.to_csv()) was treated as a library call, so codegen emittederror("Unmapped call …")insiderun_pipeline— the "drop-in" module threw on the first DataFrame call. Qualified calls now resolve only through the import-alias table; unresolved local qualifiers are skipped, not errored.README.md/TOPOLOGY.md/0-AI-MANIFEST.a2ml(G32): honest relabel — the operational pipeline is the Rust codegen; the Idris2 ABI + Zig FFI layer is scaffolding (not built by cargo, never dlopened). Unmeasured speedup claims hedged.src/interface/ffi/build.zig(+ newinclude/julianiser.h,bench/bench.zig) (G33): fixed for Zig 0.13 (addInstallHeaderFile; version inaddSharedLibrary;linkLibC); fixed an integration-test null comparison..gitignore: ignore Zig build cache/output.RSR Quality Checklist
Required
cargo test76 passed (was 59)cargo clippy --all-targets --all-features -- -D warningsclean (note:cargo fmt --checknot separately re-run in my verify; CI fmt gate will confirm)unsafeblocksbelieve_me/Admitted/sorry— Idris2 ABI files unchanged)julianiser.h,bench.zig) — verified.envAs Applicable
TOPOLOGY.mdupdatedzig build test7/7 +test-integration20/20 from a clean cache; the ABI/FFI layer remains scaffolding (now labelled as such, not wired).machine_readable/STATE.a2ml— not updated (STATE reconciliation is a tracked residual)Testing
Independently re-verified (not self-graded by the worker):
cargo test→ 76 pass (lib 33 + bin 33 + integration 9 + doctest 1), incl. the newtest_local_method_calls_do_not_produce_unmapped_call_errorsregression againstexamples/data-pipeline.cargo build --release→ ok.cargo clippy -D warnings→ clean.cd src/interface/ffi && rm -rf .zig-cache zig-out && zig build test→ exit 0 (7/7; integration 20/20).Residuals (tracked, not in this PR)
%>%pipe parsing (G35); emptyverification/+src/{core,…}scaffolding (G36); Containerfile/guix placeholders (G37); STATE/CHANGELOG reconciliation.🤖 Generated with Claude Code
https://claude.ai/code/session_01UPFC9YQ7g9gc3VnRox42Q1
Generated by Claude Code