Skip to content

Update protobuf-javascript to support Protobuf 25.2 #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions: read-all

# update in build.yml and codeql.yml at same time
env:
PROTOC_VERSION: 21.7
PROTOC_VERSION: 23.1

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions: read-all

# update in build.yml and codeql.yml at same time
env:
PROTOC_VERSION: 21.7
PROTOC_VERSION: 23.1

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module(name = "protobuf_javascript", version = "3.21.2")

bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that 23.1 is the latest available through bzlmod, but this is tested to also work with 25.x on our internal system.

Copy link
Contributor

@luangong luangong Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use a specific version of the module even if it’s not yet published to BCR with git_override, like this:

bazel_dep(name = "protobuf", version = "25.3", repo_name = "com_google_protobuf")

git_override(
    module_name = "protobuf",
    remote = "https://github.com/protocolbuffers/protobuf.git",
    # https://github.com/protocolbuffers/protobuf/releases/tag/v25.3
    commit = "4a2aef570deb2bfb8927426558701e8bfc26f2a4",
)

or with archive_override, like this:

bazel_dep(name = "protobuf", version = "25.3", repo_name = "com_google_protobuf")

archive_override(
    module_name = "protobuf",
    urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protobuf-25.3.tar.gz"],
    integrity = "sha256-0ZZD0mW5eDgzUrMUPwTAZB7qdadSNcERzAGhNQFzGA4=",
    strip_prefix = "protobuf-25.3",
)

bazel_dep(name = "rules_pkg", version = "0.7.0")
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "com_google_protobuf",
urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v21.7.zip"],
sha256 = "e13ca6c2f1522924b8482f3b3a482427d0589ff8ea251088f7e39f4713236053",
strip_prefix = "protobuf-21.7",
urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v23.1.zip"],
sha256 = "c0ea9f4d75b37ea8e9d78ce4c670d066bcb7cebdba190fa5fc8c57b1f00c0c2c",
strip_prefix = "protobuf-23.1",
)

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