Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 05 Nov 17:46
· 3 commits to main since this release
19a916e

Note

Use v0.6.1 instead - this release failed to publish to the BCR.

Highlights

  • buf v1.75.0 by default. The default buf version moves from v1.47.2 to v1.75.0 (#166). Newer buf versions can report different lint and breaking-change results, so pin a version with buf.toolchains(version = "...") if you need to stay on an older one.
  • More host platforms. The buf toolchain now downloads on FreeBSD and OpenBSD (amd64 and arm64, buf v1.67.0+), Linux armv7 (buf v1.47.0+), and Linux riscv64 (buf v1.54.0+) (#166).
  • Proto rules load from protobuf. buf_lint_test and buf_breaking_test now load ProtoInfo and the proto toolchain from @com_google_protobuf instead of the archived rules_proto (#167).
  • Gazelle 0.54. Gazelle now generates proto_library loads from protobuf's bazel/proto_library.bzl instead of @rules_proto//proto:defs.bzl (#170). Expect a one-time diff in your BUILD files the next time you run Gazelle.

Fixes

  • buf_lint_test and buf_breaking_test no longer fail during analysis with 'NoneType' value has no field or method 'proto' when --incompatible_enable_proto_toolchain_resolution is enabled (#167). This fix applies to Bazel modules. WORKSPACE projects that resolve rules_proto 7.0.x still hit it.
  • In module mode, the generated buf_breaking_test no longer lists targets for .proto files in directories Gazelle skips (.bazelignore and REPO.bazel ignore_directories entries, # gazelle:exclude paths, .git) (#171, fixes #133).
  • The Gazelle extension no longer panics with a nil pointer dereference when the proto language isn't loaded (#148, fixes #147).

Minimum version changes

Bazel modules (MODULE.bazel) now resolve at least these versions of:

Module Previous minimum New minimum
gazelle 0.40.0 0.54.0
platforms 0.0.10 1.1.0
rules_proto 7.0.2 7.1.0

rules_proto 7.1.0 makes @rules_proto//proto:toolchain_type an alias for protobuf's proto toolchain type, so toolchains registered against either label keep working.

WORKSPACE projects: the Gazelle extension now requires Gazelle 0.45.0 or later.

MODULE.bazel Usage

bazel_dep(name = "rules_buf", version = "0.6.0")

WORKSPACE Usage

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_buf",
    sha256 = "06382834357f2ed235d399a1ccfe4ba09978ec1bea9e17c929fbc0af528aecd9",
    strip_prefix = "rules_buf-0.6.0",
    urls = [
        "https://github.com/bufbuild/rules_buf/releases/download/v0.6.0/rules_buf-0.6.0.tar.gz",
    ],
)

What's Changed

New Contributors

Full Changelog: v0.5.4...v0.6.0