Repository navigation
Description
Diagnostic
chapel-ci.yml (Compile Chapel Metalayer job) has never passed in repository history (gh run list --repo hyperpolymath/echidna --workflow chapel-ci.yml --status success returns []).
Root cause is structural — the .chpl source files use Rust/C++ FFI syntax, not Chapel syntax.
Concrete errors (reproducible)
Tested with both Chapel 2.3.0 (CI) and 2.8.0 (local) — identical errors:
chapel_ffi_exports.chpl:29: syntax error: near '{'
chapel_ffi_exports.chpl:94: syntax error: near '}'
chapel_ffi_exports.chpl:128: syntax error: near '}'
chapel_ffi_exports.chpl:139: syntax error: near '}'
chapel_ffi_exports.chpl:143: syntax error: near '}'
chapel_ffi_exports.chpl:199: syntax error: near '}'
chapel_ffi_exports.chpl:210: syntax error: octal escape not supported in string literal
chapel_ffi_exports.chpl:221: syntax error: near '}'
chapel_ffi_exports.chpl:228: syntax error: near '}'
parallel_proof_search.chpl:186: syntax error: near 'proc'
parallel_proof_search.chpl:190: syntax error: near 'proc'
parallel_proof_search.chpl:196: syntax error: near '.'
parallel_proof_search.chpl:211: syntax error: near '.'
parallel_proof_search.chpl:217: syntax error: near 'proc'
parallel_proof_search.chpl:226: syntax error: near 'proc'
parallel_proof_search.chpl:247: syntax error: near '}'
parallel_proof_search.chpl:292: syntax error: near '}'
parallel_proof_search.chpl:349: syntax error: near '}'
parallel_proof_search.chpl:366: syntax error: near '}'
parallel_proof_search.chpl:419: syntax error: near '}'
Root example (line 29 of chapel_ffi_exports.chpl)
extern "C" {
// Interactive proof assistants
const PROVER_AGDA: c_int = 0;
const PROVER_COQ: c_int = 1;
...
}This is C++/Rust FFI block syntax. Chapel does not support extern "C" { ... } blocks (with the "C" linkage spec). Chapel has:
extern proc foo(): c_int;— single extern declarationextern { ... }(no"C"keyword, requires--llvmcompile) — embedded C code for inline interopextern record Foo { ... }— extern record typeexport proc bar(): c_int { ... }— exports a Chapel function to C
The extern "C" { const X: c_int = N; ... } pattern as a way to "declare C-visible constants" is not in Chapel's grammar — Chapel constants would need a different export path (header file co-distributed with --library build, or wrapper export proc get_PROVER_AGDA(): c_int { return 0; }).
parallel_proof_search.chpl:186+ shows similar — proc declared in a context Chapel rejects (likely inside a wrongly-typed block).
The line 210 octal escape not supported in string literal suggests a \nnn string-escape that Chapel rejects (Chapel uses \xNN hex escapes; \NNN octal is unsupported).
Recommended fix path
This is a substantial rewrite of two files (~30+ syntax sites). Two clean options:
Option 1 — rewrite .chpl to use real Chapel syntax
For chapel_ffi_exports.chpl:
- Drop the
extern "C" { ... }wrapper. - Declare each constant at top level:
const PROVER_AGDA: c_int = 0; - Add
export procaccessors for any constants that need to be readable from Zig FFI. - Co-distribute a generated
.hheader (Chapel's--library --staticcan emit one).
For parallel_proof_search.chpl:
- Walk every
procdeclaration site reported; check the enclosing structure. - Convert string literals with octal escapes to hex escapes.
Estimated effort: 1-2 focused sessions, requires Chapel domain knowledge.
Option 2 — mark chapel-ci.yml non-blocking + park the Chapel work
If Chapel is not load-bearing for shipping (per CLAUDE.md "L2.1 done; L2.2–L2.7 gated"), set continue-on-error: true on the Chapel jobs so they don't poison the CI signal while the rewrite is queued. File this issue as the unblock target.
Impact
- Chapel feature path (
--features chapelin Cargo) builds Rust glue but the actual Chapel.chplcompilation has never succeeded — the Chapel metalayer is scaffold only, not functional. - L2.1 marker in
CLAUDE.mdreads as "wired" but the underlying Chapel build is broken; "wired Rust→Zig→Chapel" requires the Chapel side to compile.
Cross-references
CLAUDE.md§Next (v2.2+) — Chapel L2.1-L2.7 statuschapel-ci.ymlworkflow definition- Failed runs across multiple PRs (most recent:
#128revert-dependabot-major-bumps-broke-ci)
Activity
ci(chapel): mark chapel-build + zig-ffi non-blocking until #133 fix l…
feat(chapel): L2 parallel proof search — rehabilitation (closes #133) (…
ci(chapel): mark rust-chapel-feature continue-on-error to match upstr…