Skip to content

Declare pragma circom 2.2.0 in every circuit - #158

Closed
OBrezhniev wants to merge 1 commit into
fix/circomlib_buses_reviewfrom
fix/pragma-2.2.0
Closed

OBrezhniev wants to merge 1 commit into
fix/circomlib_buses_reviewfrom
fix/pragma-2.2.0

Conversation

@OBrezhniev

Copy link
Copy Markdown
Member

Split out of #149 so that review's diff stays about the correctness fixes: this is the one commit that touches every file, and it changes nothing but the pragma line (plus the two sentences in CHANGES.txt and circuits/README.md that describe it).

Why 2.2.0. The library uses buses, which circom introduced in 2.2.0 (RELEASES.md, 2024-10-07). The files declared a mix of 2.0.0, 2.1.5 and 2.1.9 — all below the real floor — so a user on 2.1.x got a parse error on bus instead of a version refusal. CHANGES.txt had also said 2.1.5. A pragma is the minimum the compiler checks against its own version, so declaring the true floor turns that parse error into a clear message.

What changes. Every file under circuits/ and test/circuits/ now declares pragma circom 2.2.0; at column 0 (some had the line indented). test/circuits/tags_specifications.circom is left as is (it is CIVER input, not a circuit). 108 files, 113 insertions, 114 deletions; no constraint is touched.

Verified. The tree at this branch's tip is byte-identical to the tip #149 had before the split (b85175e), on which the full suite passed (118 tests). Not done here, as before: enforcing the floor from package.json and pinning the circom version CI installs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D1w729xzwemQigkf3PCisD

The library needs circom 2.2.0, where buses were introduced, but its
pragma lines said otherwise: most files declared 2.1.5, seven SMT files
2.1.9, four files 2.0.0, and several had the line indented. A pragma is a
minimum the compiler checks against its own version, so a user on 2.1.x
got a parse error on the bus syntax rather than a clear version message.

Every file under circuits/ and test/circuits/ now declares
"pragma circom 2.2.0;" at column 0. test/circuits/tags_specifications.circom
is left as is by earlier decision. CHANGES.txt and circuits/README.md,
which had described the inconsistent pragmas, now describe the uniform
one. Full suite passes; the change is the pragma line only.

This reverses upstream's explicit choice of 2.1.5, on the evidence of
circom's own release notes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D1w729xzwemQigkf3PCisD
@OBrezhniev

Copy link
Copy Markdown
Member Author

Closing: the pragma lines are to stay as they are on circomlib_buses. The compiler requirement remains documented in CHANGES.txt.

@OBrezhniev OBrezhniev closed this Sep 29, 2026
@OBrezhniev
OBrezhniev deleted the fix/pragma-2.2.0 branch September 29, 2026 20:04
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