Skip to content

[Bug]: Examples fail to build with v29.0-rc3 or LATEST (when LATEST is a release candidate) #32

@aaylward

Description

@aaylward

What happened?

When I try to use one of the v29 rc releases, the repository fetch fails due to a small naming inconsistency between version names like v29.0-rc3 and release artifact names like protoc-29.0-rc-3-osx-aarch_64.zip (note the dash between rc and 3 in the artifact name). prebuilt_protoc_toolchain doesn't know about this detail in release candidate naming, so I see the following build failure:

➜  examples git:(main) ✗ bazel build //...
INFO: Repository toolchains_protoc~~protoc~toolchains_protoc_hub.osx_aarch_64 instantiated at:
  <builtin>: in <toplevel>
Repository rule prebuilt_protoc_repo defined at:
  /private/var/tmp/_bazel_andy/4cc4769677fc1e3bb8be3c9c6bb2b2f6/external/toolchains_protoc~/protoc/private/prebuilt_protoc_toolchain.bzl:70:39: in <toplevel>
ERROR: An error occurred during the fetch of repository 'toolchains_protoc~~protoc~toolchains_protoc_hub.osx_aarch_64':
   Traceback (most recent call last):
	File "/private/var/tmp/_bazel_andy/4cc4769677fc1e3bb8be3c9c6bb2b2f6/external/toolchains_protoc~/protoc/private/prebuilt_protoc_toolchain.bzl", line 41, column 53, in _prebuilt_protoc_repo_impl
		integrity = PROTOC_VERSIONS[release_version][filename],
Error: key "protoc-29.0-rc2-osx-aarch_64.zip" not found in dictionary
ERROR: no such package '@@toolchains_protoc~~protoc~toolchains_protoc_hub.osx_aarch_64//': key "protoc-29.0-rc2-osx-aarch_64.zip" not found in dictionary
ERROR: /Users/andy/src/toolchains_protoc/examples/BUILD.bazel:7:14: //:foo_proto depends on @@toolchains_protoc~~protoc~toolchains_protoc_hub.osx_aarch_64//:prebuilt_protoc_toolchain in repository @@toolchains_protoc~~protoc~toolchains_protoc_hub.osx_aarch_64 which failed to fetch. no such package '@@toolchains_protoc~~protoc~toolchains_protoc_hub.osx_aarch_64//': key "protoc-29.0-rc2-osx-aarch_64.zip" not found in dictionary
ERROR: Analysis of target '//:foo_proto' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.256s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully

Version

Development (host) and target OS/architectures: N/A

Output of bazel --version: bazel 7.3.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file: bazel_dep(name = "toolchains_protoc", version = "0.3.4")

Language(s) and/or frameworks involved: N/A

How to reproduce

Bump the protoc version in the examples directory to `v29.0-rc3` and build the examples.

Any other information?

The filename for release candidate versions should have a bonus dash between rc and the candidate number. It might also make sense to add another example that builds with latest to catch any future funkiness in tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions