Skip to content

v0.4.3: built with mise instead of Bazel; references and real validation in the examples

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 22:20
· 1 commit to main since this release
v0.4.3
45795d3

The generated code and the runtime are the same as in 0.4.2. For a consumer, one thing changes: building the plugin from source (cargo install protoc-gen-protocontract-buffa) needs Rust 1.100.0. The release binaries need no Rust, and their names and checksums-sha256.txt are as before.

Added

  • examples/glossary uses references to a service: a catalog service,
    Glossaries, keeps glossaries by topic, takes one as a reference in a
    message field (Add(Shelf)), and returns one (Open(Topic) gives a
    GlossaryRef). The consumer opens its topic and annotates through the
    glossary it gets back; the application wires it all. No change to the
    plugin or the runtime.

Changed

  • examples/refs validates for real: Alarm and Tick declare
    protovalidate rules (a required, non-empty label, a required clock, at
    most three backups, no time before the epoch), Alarms.Set fails with
    the new ALARMS_ERROR_CODE_INVALID_ALARM, and the tests check each rule.
    The README describes validate=true with an example. protovalidate's
    protos come from mise (http:protovalidate 1.2.2, staged by
    mise run protos), not from the Buf Schema Registry.

  • The example's protovalidate moves to protovalidate-buffa 0.8.0 with
    protoc-gen-protovalidate-buffa 0.11.0 (released together: time
    replaces chrono). The Validate impl that validate=true emits is
    unchanged and builds against both.

  • Every dependency is declared once, in the root [workspace.dependencies],
    and an unused dependency fails the build (cargo::unused_dependencies,
    Cargo 1.100). Nothing changes for a consumer of the crates.

  • The repository builds with Cargo and mise
    instead of Bazel: mise run gate is the gate (generated files, clippy,
    rustfmt, cargo-deny, buf lint and format, markdownlint, tests),
    mise run generate refreshes the golden files and the examples, and
    mise run format formats in place. The release workflow runs the gate
    on the same six platforms, the golden check now on Windows ARM64 too.
    The plugin's binaries, their names, and checksums-sha256.txt are
    unchanged, so the bazel_utils catalog and a mise github: backend
    keep working; the crates are unchanged.

  • The dependency check is cargo-deny (deny.toml): advisories as before,
    plus licences, duplicate crates, and sources.

  • The pinned toolchain is Rust 1.100.0 (was 1.99.1), and building the
    plugin from source (cargo install protoc-gen-protocontract-buffa) now
    needs it. The runtime and the generated code still need Rust 1.92; the
    generated code is the same.

  • Cargo.lock takes the newest version of each dependency that is at
    least two days old (tokio 1.54.1, syn 3.0.10, and others), which the
    plugin's release binaries are built with. The version ranges in
    Cargo.toml, what a consumer resolves against, are unchanged.

Removed

  • The Bazel module protocontract_buffa (MODULE.bazel and every
    BUILD.bazel). No consumer took it through bazel_dep; a Bazel build
    takes the plugin from the bazel_utils catalog as before.