Skip to content

fix!: consolidate keyword, connectrpc, and buffa fixes#17

Merged
jrandolf merged 3 commits into
mainfrom
jrandolf/fix-keywords-connect-buffa
Jun 28, 2026
Merged

fix!: consolidate keyword, connectrpc, and buffa fixes#17
jrandolf merged 3 commits into
mainfrom
jrandolf/fix-keywords-connect-buffa

Conversation

@jrandolf

Copy link
Copy Markdown
Contributor

Summary

  • escape Rust keyword field and oneof accessors through buffa's field ident helper
  • disable connectrpc default features for the optional connect integration
  • bump buffa, buffa-build, buffa-codegen, and connectrpc to the 0.7 line

Supersedes #14, #15, and #16.

Verification

  • cargo fmt --all --check
  • cargo test -p protovalidate-buffa --all-features
  • cargo tree -p protovalidate-buffa --features connect | rg 'connectrpc|async-compression|flate2|zstd'

Full workspace tests still require protoc on PATH for protovalidate-buffa-protos build scripts.

connyay and others added 3 commits June 27, 2026 18:07
The plugin built field accessors (`self.<field>`) straight from raw proto names, so any field or oneof named with a Rust keyword broke codegen: `format_ident!` emitted invalid `self.type`, `parse_str::<Ident>` returned `Err`, and `Ident::new`/`new_raw` panicked on non-raw-able keywords like `self`.

Route every proto-name to ident site through a shared `field_ident` helper that delegates to `buffa_codegen::idents::make_field_ident`, guaranteeing emitted accessors match buffa-generated structs by construction.

Add keyword-name regression tests for the real emit::render pipeline.
The optional connect integration only needs ConnectError/ErrorCode, so opt out of connectrpc defaults to avoid pulling streaming and compression dependencies when the feature is enabled.
Update buffa, buffa-build, and buffa-codegen dependencies to the 0.7 line across the workspace.

Move connectrpc to 0.7 as part of the bump so its transitive buffa dependency also resolves to 0.7 while keeping default features disabled.
@jrandolf jrandolf merged commit 61b2485 into main Jun 28, 2026
9 of 10 checks passed
@jrandolf jrandolf deleted the jrandolf/fix-keywords-connect-buffa branch June 28, 2026 01:19
@jrandolf jrandolf mentioned this pull request Jun 28, 2026
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.

2 participants