Skip to content

Releases: bazelbuild/rules_proto

6.0.0

28 Apr 16:13
d205d37
Compare
Choose a tag to compare

NEW FEATURES

When used with Bazel 7, Protobuf Toolchainization is now available. This allows you to choose where the protobuf compiler (protoc) comes from, as well as configure a toolchain for each language you generate proto stubs for.

This de-couples rules_proto from the https://github.com/protocolbuffers/protobuf repository; rules_proto no longer depends on com_google_protobuf. The Bazel rules in that repository are now maintained by the protobuf team for Google use cases, and may diverge from rules_proto over time.

rules_proto does not include the toolchain implementation. See https://registry.bazel.build/modules/toolchains_protoc for an example module that registers the prebuilt binary from https://github.com/protocolbuffers/protobuf/releases.

The tracking issue for this feature is #179

BREAKING CHANGES

Upgrading from rules_proto 5.x requires some changes:

  • The load site for rules_proto_toolchains has changed. See the new WORKSPACE snippet below.
  • As mentioned above, rules_proto no longer depends on the protobuf repo (commonly as com_google_protobuf). As a result, the rules_proto_dependencies macro no longer fetches one. For WORKSPACE users, this may affect what version of protobuf you end up with. We recommend explicitly fetching com_google_protobuf early in the WORKSPACE file, as the first declaration wins.

Install

Using bzlmod with Bazel 6 or later:

  1. [Bazel 6] Add common --enable_bzlmod to .bazelrc.

  2. Add to your MODULE.bazel file:

bazel_dep(name = "rules_proto", version = "6.0.0")

Using WORKSPACE:

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

http_archive(
    name = "rules_proto",
    sha256 = "303e86e722a520f6f326a50b41cfc16b98fe6d1955ce46642a5b7a67c11c0f5d",
    strip_prefix = "rules_proto-6.0.0",
    url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.0/rules_proto-6.0.0.tar.gz",
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")
rules_proto_dependencies()

load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")
rules_proto_toolchains()

What's Changed

New Contributors

Full Changelog: 4.0.0...6.0.0

6.0.0-rc3

16 Apr 16:18
c2110a0
Compare
Choose a tag to compare

NEW FEATURES

When used with Bazel 7, Protobuf Toolchainization is now available. This allows you to choose where the protobuf compiler (protoc) comes from, as well as configure a toolchain for each language you generate proto stubs for.

This de-couples rules_proto from the https://github.com/protocolbuffers/protobuf repository; rules_proto no longer depends on com_google_protobuf. The Bazel rules in that repository are now maintained by the protobuf team for Google use cases, and may diverge from rules_proto over time.

rules_proto does not include the toolchain implementation. See https://registry.bazel.build/modules/toolchains_protoc for an example module that registers the prebuilt binary from https://github.com/protocolbuffers/protobuf/releases.

The tracking issue for this feature is #179

BREAKING CHANGES

Upgrading from rules_proto 5.x requires some changes:

  • The load site for rules_proto_toolchains has changed. See the new WORKSPACE snippet below.
  • As mentioned above, rules_proto no longer depends on the protobuf repo (commonly as com_google_protobuf). As a result, the rules_proto_dependencies macro no longer fetches one. For WORKSPACE users, this may affect what version of protobuf you end up with. We recommend explicitly fetching com_google_protobuf early in the WORKSPACE file, as the first declaration wins.

Using bzlmod with Bazel 6 or later:

  1. [Bazel 6] Add common --enable_bzlmod to .bazelrc.

  2. Add to your MODULE.bazel file:

bazel_dep(name = "rules_proto", version = "6.0.0-rc3")

Using WORKSPACE:

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

http_archive(
    name = "rules_proto",
    sha256 = "a88d018bdcb8df1ce8185470eb4b4899d778f9ac3a66cb36d514beb81e345282",
    strip_prefix = "rules_proto-6.0.0-rc3",
    url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.0-rc3/rules_proto-6.0.0-rc3.tar.gz",
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")
rules_proto_dependencies()

load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")
rules_proto_toolchains()

What's Changed

  • fix: add bazel versions tested to presubmit by @thesayyn in #202

Full Changelog: 6.0.0-rc2...6.0.0-rc3

6.0.0-rc2

02 Feb 19:18
5cb4053
Compare
Choose a tag to compare

Using bzlmod with Bazel 6 or later:

  1. [Bazel 6] Add common --enable_bzlmod to .bazelrc.

  2. Add to your MODULE.bazel file:

bazel_dep(name = "rules_proto", version = "6.0.0-rc2")

Using WORKSPACE:

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

http_archive(
    name = "rules_proto",
    sha256 = "71fdbed00a0709521ad212058c60d13997b922a5d01dbfd997f0d57d689e7b67",
    strip_prefix = "rules_proto-6.0.0-rc2",
    url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.0-rc2/rules_proto-6.0.0-rc2.tar.gz",
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")
rules_proto_dependencies()

load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")
rules_proto_toolchains()

What's Changed

New Contributors

Full Changelog: 6.0.0-rc1...6.0.0-rc2

6.0.0-rc1

04 Dec 23:17
f9b0b88
Compare
Choose a tag to compare
6.0.0-rc1 Pre-release
Pre-release

Using bzlmod with Bazel 6 or later:

  1. [Bazel 6] Add common --enable_bzlmod to .bazelrc.

  2. Add to your MODULE.bazel file:

bazel_dep(name = "rules_proto", version = "6.0.0-rc1")

Using WORKSPACE:

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

http_archive(
    name = "rules_proto",
    sha256 = "904a8097fae42a690c8e08d805210e40cccb069f5f9a0f6727cf4faa7bed2c9c",
    strip_prefix = "rules_proto-6.0.0-rc1",
    url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.0-rc1/rules_proto-6.0.0-rc1.tar.gz",
)

What's Changed

Full Changelog: 6.0.0-rc0...6.0.0-rc1

6.0.0-rc0

03 Nov 15:09
c911daa
Compare
Choose a tag to compare
6.0.0-rc0 Pre-release
Pre-release

Note: you cannot use --incompatible_enable_proto_toolchain_resolution yet.

Using bzlmod with Bazel 6 or later:

This release doesn't work with bzlmod due to protocolbuffers/protobuf#14569

Using WORKSPACE:

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

http_archive(
    name = "com_google_protobuf",
    sha256 = "616bb3536ac1fff3fb1a141450fa28b875e985712170ea7f1bfe5e5fc41e2cd8",
    strip_prefix = "protobuf-24.4",
    urls = ["https://github.com/protocolbuffers/protobuf/archive/v24.4.tar.gz"],
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

http_archive(
    name = "rules_proto",
    sha256 = "903af49528dc37ad2adbb744b317da520f133bc1cbbecbdd2a6c546c9ead080b",
    strip_prefix = "rules_proto-6.0.0-rc0",
    url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.0-rc0/rules_proto-6.0.0-rc0.tar.gz",
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")

rules_proto_dependencies()

rules_proto_toolchains()

What's Changed

New Contributors

Full Changelog: 5.3.0-21.7...6.0.0-rc0

rules_proto 5.3.0-21.7

27 Dec 15:53
3f1ab99
Compare
Choose a tag to compare

To use this release add the following to your WORKSPACE file:

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

http_archive(
    name = "rules_proto",
    sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",
    strip_prefix = "rules_proto-5.3.0-21.7",
    urls = [
        "https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz",
    ],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()

rules_proto 5.3.0-21.5

16 Sep 09:58
Compare
Choose a tag to compare

To use this release add the following to your WORKSPACE file:

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

http_archive(
    name = "rules_proto",
    sha256 = "80d3a4ec17354cccc898bfe32118edd934f851b03029d63ef3fc7c8663a7415c",
    strip_prefix = "rules_proto-5.3.0-21.5",
    urls = [
        "https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.5.tar.gz",
    ],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()

rules_proto 4.0.0-3.20.0

05 Apr 10:13
3212323
Compare
Choose a tag to compare

To use this release add the following to your WORKSPACE file:

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

http_archive(
    name = "rules_proto",
    sha256 = "e017528fd1c91c5a33f15493e3a398181a9e821a804eb7ff5acdd1d2d6c2b18d",
    strip_prefix = "rules_proto-4.0.0-3.20.0",
    urls = [
        "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0-3.20.0.tar.gz",
    ],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()

rules_proto 4.0.0-3.19.2-2

04 Apr 15:08
b828a0a
Compare
Choose a tag to compare

To use this release add the following to your WORKSPACE file:

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

http_archive(
    name = "rules_proto",
    sha256 = "9850fcf6ad40fa348e6f13b2cfef4bb4639762f804794f2bf61d988f4ba0dae9",
    strip_prefix = "rules_proto-4.0.0-3.19.2-2",
    urls = [
        "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0-3.19.2-2.tar.gz",
    ],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()

rules_proto 4.0.0-3.19.2

18 Feb 16:17
244e0b6
Compare
Choose a tag to compare

To use this release add the following to your WORKSPACE file:

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

http_archive(
    name = "rules_proto",
    sha256 = "c22cfcb3f22a0ae2e684801ea8dfed070ba5bed25e73f73580564f250475e72d",
    strip_prefix = "rules_proto-4.0.0-3.19.2",
    urls = [
        "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0-3.19.2.tar.gz",
    ],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()