diff --git a/CHANGELOG.md b/CHANGELOG.md index ef931ef..43af069 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ## [Unreleased] +## [0.5.1] - 2026-05-07 + +### Fixed + +- **`buffa-codegen`: `ALLOW_LINTS` now includes `unused_qualifications`.** + Cross-proto references within the same package are emitted through the + canonical `super::super::__buffa::view::…` (and `…::oneof::…`) path even + though the target lives in the same generated module. The bare name would + resolve, but the canonical path is stable when a sibling proto defines a + same-named natural-path re-export. Workspaces that opt + `unused_qualifications = "warn"` and build with `-D warnings` were getting + false positives from generated code; the lint is now in the package + stitcher's `#[allow(...)]` block alongside `dead_code`, `unused_imports`, + etc. + ## [0.5.0] - 2026-05-05 This release is a minor bump under the diff --git a/Cargo.lock b/Cargo.lock index 3cddc62..2640db4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,7 +58,7 @@ checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "buffa" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arbitrary", "base64", @@ -72,7 +72,7 @@ dependencies = [ [[package]] name = "buffa-build" -version = "0.5.0" +version = "0.5.1" dependencies = [ "buffa", "buffa-codegen", @@ -81,7 +81,7 @@ dependencies = [ [[package]] name = "buffa-codegen" -version = "0.5.0" +version = "0.5.1" dependencies = [ "buffa", "buffa-descriptor", @@ -95,14 +95,14 @@ dependencies = [ [[package]] name = "buffa-descriptor" -version = "0.5.0" +version = "0.5.1" dependencies = [ "buffa", ] [[package]] name = "buffa-test" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arbitrary", "buffa", @@ -115,7 +115,7 @@ dependencies = [ [[package]] name = "buffa-types" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arbitrary", "buffa", @@ -520,7 +520,7 @@ dependencies = [ [[package]] name = "protoc-gen-buffa" -version = "0.5.0" +version = "0.5.1" dependencies = [ "buffa", "buffa-codegen", @@ -528,7 +528,7 @@ dependencies = [ [[package]] name = "protoc-gen-buffa-packaging" -version = "0.5.0" +version = "0.5.1" dependencies = [ "buffa", "buffa-codegen", diff --git a/Cargo.toml b/Cargo.toml index b32da4d..8246224 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ exclude = [ ] [workspace.package] -version = "0.5.0" +version = "0.5.1" edition = "2021" rust-version = "1.85" license = "Apache-2.0" @@ -33,12 +33,12 @@ keywords = ["protobuf", "protocol-buffers", "serialization", "no-std", "editions categories = ["encoding", "no-std"] [workspace.dependencies] -buffa = { path = "buffa", version = "0.5.0", default-features = false } -buffa-types = { path = "buffa-types", version = "0.5.0" } -buffa-descriptor = { path = "buffa-descriptor", version = "0.5.0" } -buffa-codegen = { path = "buffa-codegen", version = "0.5.0" } -buffa-build = { path = "buffa-build", version = "0.5.0" } -buffa-test = { path = "buffa-test", version = "0.5.0" } +buffa = { path = "buffa", version = "0.5.1", default-features = false } +buffa-types = { path = "buffa-types", version = "0.5.1" } +buffa-descriptor = { path = "buffa-descriptor", version = "0.5.1" } +buffa-codegen = { path = "buffa-codegen", version = "0.5.1" } +buffa-build = { path = "buffa-build", version = "0.5.1" } +buffa-test = { path = "buffa-test", version = "0.5.1" } base64 = { version = "0.22", default-features = false, features = ["alloc"] } bytes = { version = "1", default-features = false } hashbrown = { version = "0.15", default-features = false, features = ["default-hasher"] } diff --git a/buffa-build/Cargo.toml b/buffa-build/Cargo.toml index 0af6468..1a1bc41 100644 --- a/buffa-build/Cargo.toml +++ b/buffa-build/Cargo.toml @@ -13,6 +13,6 @@ categories = ["development-tools::build-utils"] rustdoc-args = ["--cfg", "docsrs"] [dependencies] -buffa = { path = "../buffa", version = "0.5.0" } +buffa = { path = "../buffa", version = "0.5.1" } buffa-codegen = { workspace = true } tempfile = "3" diff --git a/buffa-codegen/Cargo.toml b/buffa-codegen/Cargo.toml index c0b39e7..924f081 100644 --- a/buffa-codegen/Cargo.toml +++ b/buffa-codegen/Cargo.toml @@ -11,7 +11,7 @@ categories = ["development-tools::build-utils"] [dependencies] # `path` wins for local workspace development; `version` is used on publish. -buffa = { path = "../buffa", version = "0.5.0" } +buffa = { path = "../buffa", version = "0.5.1" } buffa-descriptor = { workspace = true } prettyplease = { workspace = true } proc-macro2 = { workspace = true } diff --git a/buffa-codegen/src/lib.rs b/buffa-codegen/src/lib.rs index db4d8e4..fc6af88 100644 --- a/buffa-codegen/src/lib.rs +++ b/buffa-codegen/src/lib.rs @@ -49,6 +49,12 @@ pub const ALLOW_LINTS: &[&str] = &[ "non_camel_case_types", "dead_code", "unused_imports", + // Cross-proto refs within the same package are emitted through the + // canonical `super::super::__buffa::view::…` path even though the + // target lives in the same generated module — using the bare name + // would resolve, but the canonical path is stable when a sibling + // proto defines a same-named natural-path re-export. + "unused_qualifications", "clippy::derivable_impls", "clippy::match_single_binding", "clippy::uninlined_format_args", diff --git a/buffa-descriptor/src/generated/google.protobuf.compiler.mod.rs b/buffa-descriptor/src/generated/google.protobuf.compiler.mod.rs index 8afffae..0e4186e 100644 --- a/buffa-descriptor/src/generated/google.protobuf.compiler.mod.rs +++ b/buffa-descriptor/src/generated/google.protobuf.compiler.mod.rs @@ -5,6 +5,7 @@ include!("google.protobuf.compiler.plugin.rs"); non_camel_case_types, dead_code, unused_imports, + unused_qualifications, clippy::derivable_impls, clippy::match_single_binding, clippy::uninlined_format_args, diff --git a/buffa-descriptor/src/generated/google.protobuf.mod.rs b/buffa-descriptor/src/generated/google.protobuf.mod.rs index bdb029a..fee39ec 100644 --- a/buffa-descriptor/src/generated/google.protobuf.mod.rs +++ b/buffa-descriptor/src/generated/google.protobuf.mod.rs @@ -5,6 +5,7 @@ include!("google.protobuf.descriptor.rs"); non_camel_case_types, dead_code, unused_imports, + unused_qualifications, clippy::derivable_impls, clippy::match_single_binding, clippy::uninlined_format_args, diff --git a/buffa-types/src/generated/google.protobuf.mod.rs b/buffa-types/src/generated/google.protobuf.mod.rs index abbb42f..410821c 100644 --- a/buffa-types/src/generated/google.protobuf.mod.rs +++ b/buffa-types/src/generated/google.protobuf.mod.rs @@ -11,6 +11,7 @@ include!("google.protobuf.wrappers.rs"); non_camel_case_types, dead_code, unused_imports, + unused_qualifications, clippy::derivable_impls, clippy::match_single_binding, clippy::uninlined_format_args, diff --git a/docs/guide.md b/docs/guide.md index 30e3bcd..ee39c0b 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -295,25 +295,25 @@ Download the binaries for your platform from the [releases page](https://github. ```sh # Download binaries + cosign signatures + certificates (both plugins match) -gh release download v0.5.0 --repo anthropics/buffa \ +gh release download v0.5.1 --repo anthropics/buffa \ --pattern 'protoc-gen-buffa*-linux-x86_64*' # Verify with GitHub attestations (requires gh CLI ≥ 2.49) -gh attestation verify protoc-gen-buffa-v0.5.0-linux-x86_64 --repo anthropics/buffa -gh attestation verify protoc-gen-buffa-packaging-v0.5.0-linux-x86_64 --repo anthropics/buffa +gh attestation verify protoc-gen-buffa-v0.5.1-linux-x86_64 --repo anthropics/buffa +gh attestation verify protoc-gen-buffa-packaging-v0.5.1-linux-x86_64 --repo anthropics/buffa # Or with cosign (standalone, no gh required) — shown for one binary cosign verify-blob \ - --signature protoc-gen-buffa-v0.5.0-linux-x86_64.sig \ - --certificate protoc-gen-buffa-v0.5.0-linux-x86_64.pem \ + --signature protoc-gen-buffa-v0.5.1-linux-x86_64.sig \ + --certificate protoc-gen-buffa-v0.5.1-linux-x86_64.pem \ --certificate-identity-regexp "github.com/anthropics/buffa" \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ - protoc-gen-buffa-v0.5.0-linux-x86_64 + protoc-gen-buffa-v0.5.1-linux-x86_64 # Install both -chmod +x protoc-gen-buffa-v0.5.0-linux-x86_64 protoc-gen-buffa-packaging-v0.5.0-linux-x86_64 -mv protoc-gen-buffa-v0.5.0-linux-x86_64 ~/.local/bin/protoc-gen-buffa -mv protoc-gen-buffa-packaging-v0.5.0-linux-x86_64 ~/.local/bin/protoc-gen-buffa-packaging +chmod +x protoc-gen-buffa-v0.5.1-linux-x86_64 protoc-gen-buffa-packaging-v0.5.1-linux-x86_64 +mv protoc-gen-buffa-v0.5.1-linux-x86_64 ~/.local/bin/protoc-gen-buffa +mv protoc-gen-buffa-packaging-v0.5.1-linux-x86_64 ~/.local/bin/protoc-gen-buffa-packaging ``` Available platforms: `linux-x86_64`, `linux-aarch64`, `darwin-x86_64`, `darwin-aarch64`, `windows-x86_64` (`.exe`). All releases include SHA-256 checksums, Sigstore cosign signatures, and signed SLSA build provenance for supply chain verification. @@ -369,7 +369,7 @@ Plugin options (passed via `opt:`): ```yaml version: v2 plugins: - - remote: buf.build/anthropic/buffa:v0.5.0 + - remote: buf.build/anthropic/buffa:v0.5.1 out: src/generated opt: [views=true] ``` diff --git a/protoc-gen-buffa-packaging/Cargo.toml b/protoc-gen-buffa-packaging/Cargo.toml index fed2306..ce466bf 100644 --- a/protoc-gen-buffa-packaging/Cargo.toml +++ b/protoc-gen-buffa-packaging/Cargo.toml @@ -10,5 +10,5 @@ keywords = ["protobuf", "protocol-buffers", "protoc", "plugin", "codegen"] categories = ["development-tools::build-utils", "command-line-utilities"] [dependencies] -buffa = { path = "../buffa", version = "0.5.0" } +buffa = { path = "../buffa", version = "0.5.1" } buffa-codegen = { workspace = true } diff --git a/protoc-gen-buffa/Cargo.toml b/protoc-gen-buffa/Cargo.toml index 9bfa17d..37313fa 100644 --- a/protoc-gen-buffa/Cargo.toml +++ b/protoc-gen-buffa/Cargo.toml @@ -10,5 +10,5 @@ keywords = ["protobuf", "protocol-buffers", "protoc", "plugin", "codegen"] categories = ["development-tools::build-utils", "command-line-utilities"] [dependencies] -buffa = { path = "../buffa", version = "0.5.0" } +buffa = { path = "../buffa", version = "0.5.1" } buffa-codegen = { workspace = true }