Conversation
Add `push: tags: ['v*']` to the publish-crates workflow so a release tag triggers the crates.io publish automatically, matching the buffa publish-crates workflow. The workflow_dispatch path stays for re-runs and dry-run verification. On a tag push `inputs.dry_run` is undefined (falsy), so the run is always a real publish; the `crates-io` environment's branch policy restricts which refs can run in it.
|
All contributors have signed the CLA ✍️ ✅ |
…dundant_captures in generated mod.rs The 0.4.0 codegen output trips two rustc lints in workspaces that build with -D warnings: - impl_trait_redundant_captures: the use<'a, Self> precise-capturing clause on trait method RPITs is required for edition-2021 consumers (which capture only 'static by default) but redundant under edition 2024. Codegen targets both editions and cannot know the consumer's at write time, so the clause must stay. - unused_qualifications: buffa 0.5 codegen always references sibling types through the canonical pkg::__buffa::view::* path even when a shorter natural-path re-export exists, because the re-export can be shadowed by a same-named proto type. The qualification is intentional. Both lints fire at locations under the generated `pub mod <pkg>` tree that connectrpc-build's include_file() writes, so the right scope for the suppression is the same #[allow(...)] block that already carries dead_code, unused_imports, etc. This patch release also documents refining_impl_trait_internal in the CHANGELOG: there is no codegen-side workaround for it (the warning fires on the consumer's handler `impl`, outside the generated tree), so consumers building with -D warnings must allow it themselves.
bd3e488 to
86de223
Compare
rpb-ant
approved these changes
May 7, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds
unused_qualificationsandimpl_trait_redundant_capturesto the#[allow(...)]blockconnectrpc-buildwrites into the generatedmod.rspackage tree, and documents the relatedrefining_impl_trait_internallint.Why
The 0.4.0 codegen output trips two rustc lints in workspaces that build with
-D warnings:impl_trait_redundant_captures: trait method RPITs carry ause<'a, Self>precise-capturing clause. It is required for edition-2021 consumers (RPIT-in-trait captures only'staticby default there) but redundant under edition 2024 (which captures all in-scope generics by default). Codegen targets both editions and cannot know the consumer's at write time, so the clause must stay — but it shouldn't warn.unused_qualifications: buffa 0.5 codegen always references sibling types through the canonicalpkg::__buffa::view::*path even when a shorter natural-path re-export exists, because the re-export can be shadowed by a same-named proto type. The qualification is intentional. (Suppressed redundantly here on top of fix(buffa-codegen): add unused_qualifications to ALLOW_LINTS buffa#102 forconnectrpc-buildconsumers whoseprotoc-gen-buffatoolchain hasn't picked up that release yet.)Both lints fire at locations under the generated
pub mod <pkg>tree thatconnectrpc_build::Config::include_file()writes, so the right scope for the suppression is the same#[allow(...)]block that already carriesdead_code,unused_imports, etc.refining_impl_trait_internal— known limitation, no codegen-side fixThis release also documents (CHANGELOG only) that
refining_impl_trait_internal(warnby default since rust 1.86, rust-lang/rust#121718) fires on every handlerimpl, because the generated trait declaresServiceResult<impl Encodable<Out> + …>while the handler returnsServiceResult<Out>. The refinement is intentional — it lets handlers return either an owned message, a borrowed view, orMaybeBorrowed<M, V>— and is benign for handler impls. There is no place in the generated module tree where#[allow(...)]could reach the consumer's handler impl. Consumers who deny warnings should setrefining_impl_trait_internal = "allow"in[lints.rust](or workspace lints) or#[allow(refining_impl_trait)]on each handlerimplblock.Verification
cargo test -p connectrpc-build -p connectrpc-codegen --lib: 18 + 35 passedcargo build -p eliza-example -p multiservice-example: cleancargo clippy -p connectrpc-conformance -p eliza-example -- -D warnings: clean