Skip to content
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

Add ruby release targets #11468

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
37169e7
Merge with main
deannagarcia Oct 18, 2022
23ecec3
Separate jruby release from cruby release
deannagarcia Oct 19, 2022
cb46372
Update with new way to pick ruby version
deannagarcia Jan 4, 2023
77c071f
Add include flag
deannagarcia Jan 5, 2023
a86c0f7
Add workspace deps setup
deannagarcia Jan 5, 2023
6cff86c
Change dependency format
deannagarcia Jan 5, 2023
b0ca44a
GHA install ruby test
deannagarcia Jan 6, 2023
2d1093e
Fix workflow
deannagarcia Jan 6, 2023
79cf753
Workflow update
deannagarcia Jan 6, 2023
7245f1d
workflow fixes
deannagarcia Jan 6, 2023
1143df8
Remove target_compatible_with for now
deannagarcia Jan 6, 2023
502a37c
Fix tests
deannagarcia Jan 6, 2023
33ac195
More test fixes
deannagarcia Jan 6, 2023
2168904
Try different way to access bazel runfiles
deannagarcia Jan 6, 2023
e06f706
Use bazel runfile dir
deannagarcia Jan 9, 2023
a959bd9
Update bazel
deannagarcia Jan 10, 2023
f3d3013
change where we look for gem
deannagarcia Jan 10, 2023
f9821fa
Change installation test
deannagarcia Jan 11, 2023
c337ae1
Change tests
deannagarcia Jan 11, 2023
4fba166
Checkout repo in test
deannagarcia Jan 12, 2023
de13307
Specify proto path
deannagarcia Jan 12, 2023
78c6163
Fix test
deannagarcia Jan 12, 2023
2a2f131
Fix jruby
deannagarcia Jan 12, 2023
c6cfbeb
debugging tests
deannagarcia Jan 12, 2023
5f35b87
Use new rules_ruby
deannagarcia Jan 12, 2023
f8d4f2b
More debugging
deannagarcia Jan 12, 2023
f3cbca0
Add proto path
deannagarcia Jan 13, 2023
3f0d3f0
Add missing proto file
deannagarcia Jan 13, 2023
252ab69
Add proto path
deannagarcia Jan 13, 2023
87238e7
More protoc work
deannagarcia Jan 13, 2023
f3f4972
Add other proto to protoc call
deannagarcia Jan 13, 2023
6a7a83f
Support ruby 3.2
deannagarcia Jan 13, 2023
22aa441
More gha
deannagarcia Jan 13, 2023
c5d2b4d
maybe this will work
deannagarcia Jan 13, 2023
fa2aff1
Test fix and add target_compatible_with
deannagarcia Jan 17, 2023
13227fb
Run protoc on imported proto file
deannagarcia Jan 17, 2023
642b99a
Cleaning up
deannagarcia Jan 17, 2023
4f9d690
Relative proto files
deannagarcia Jan 17, 2023
6df57e6
Another protoc change
deannagarcia Jan 17, 2023
f164ae4
more protoc changes
deannagarcia Jan 18, 2023
b10ce37
Add source files to jruby
deannagarcia Jan 18, 2023
b7b7eb6
Separate build and install to get an estimate install time
deannagarcia Jan 19, 2023
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
56 changes: 56 additions & 0 deletions .github/workflows/ruby_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Ruby Install Tests

on:
push:
branches:
- main
- '[0-9]+.x'
pull_request:
branches:
- main
- '[0-9]+.x'
workflow_dispatch:

jobs:
test_ruby_gems:
name: Test ruby gems
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby: [2.6, 2.7, 3.0, 3.1, 3.2, jruby-9.2, jruby-9.3]

steps:
- uses: actions/checkout@v2
- name: Install bazel
run: |
sudo apt-get install -qy wget
mkdir $HOME/bin
wget -O $HOME/bin/bazel https://github.com/bazelbuild/bazel/releases/download/6.0.0/bazel-6.0.0-linux-x86_64
chmod a+x $HOME/bin/bazel
- name: Install git
run: |
sudo apt-get install -qy --no-install-recommends git
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build and install cruby gem
run: |
$HOME/bin/bazel run ruby:release
gem install bazel-bin/ruby/release.runfiles/com_google_protobuf/tmp/google-protobuf-*
if: ${{ !contains(matrix.ruby, 'jruby') }}
- name: Build and install jruby gem
run: |
$HOME/bin/bazel run ruby:jruby_release
gem install bazel-bin/ruby/jruby_release.runfiles/com_google_protobuf/tmp/google-protobuf-*
if: ${{ contains(matrix.ruby, 'jruby') }}
- name: Test installation
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should add a sanity check to the beginning to make sure these tests fail before installation?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you know how to run in GHA expecting a failure? I can't find a good way of doing that (but can confirm that I have seen this fail when the gems were not correct).

Copy link
Member

@mkruskal-google mkruskal-google Jan 19, 2023

Choose a reason for hiding this comment

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

! bazel test <target> will invert the result

run: |
bazel run //:protoc -- --proto_path=$GITHUB_WORKSPACE/src --proto_path=$GITHUB_WORKSPACE/ruby/tests --proto_path=$GITHUB_WORKSPACE/ruby --ruby_out=$GITHUB_WORKSPACE/ruby tests/test_import_proto2.proto
bazel run //:protoc -- --proto_path=$GITHUB_WORKSPACE/src --proto_path=$GITHUB_WORKSPACE/ruby/tests --proto_path=$GITHUB_WORKSPACE/ruby --ruby_out=$GITHUB_WORKSPACE/ruby tests/basic_test.proto
ruby ruby/tests/basic.rb
8 changes: 8 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ http_archive(
load("//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")
protobuf_deps()

load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")

rules_jvm_external_deps()

load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")

rules_jvm_external_setup()

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
Expand Down
4 changes: 2 additions & 2 deletions protobuf_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def protobuf_deps():
_github_archive(
name = "rules_ruby",
repo = "https://github.com/protocolbuffers/rules_ruby",
commit = "59732544ce3a4bc4e8e4d4e8c8f318c931c17eae",
sha256 = "4fc45adf1056c824afde9a52b743b915eeada3633539eb1dbd641a66dc9f4c4f",
commit = "5cf6ff74161d7f985b9bf86bb3c5fb16cef6337b",
sha256 = "c88dd69eb50fcfd7fbc5d7db79adc6631ef0e1d80b3c94efe33ac5ee3ccc37f7",
)

if not native.existing_rule("rules_jvm_external"):
Expand Down
1 change: 1 addition & 0 deletions protobuf_version.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ PROTOC_VERSION = "21.12"
PROTOBUF_JAVA_VERSION = "3.21.12"
PROTOBUF_PYTHON_VERSION = "4.21.12"
PROTOBUF_PHP_VERSION = "3.21.12"
PROTOBUF_RUBY_VERSION = "3.21.12"
39 changes: 39 additions & 0 deletions ruby/BUILD.bazel
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_ruby//ruby:defs.bzl", "ruby_library")
load("//:protobuf.bzl", "internal_ruby_proto_library")
load("//conformance:defs.bzl", "conformance_test")
load("//:protobuf_version.bzl", "PROTOBUF_RUBY_VERSION")

################################################################################
# Ruby Runtime
Expand All @@ -19,6 +20,44 @@ ruby_library(
],
)

sh_binary(
name = "jruby_release",
data = [
"//ruby/lib/google:copy_jar",
"//ruby/lib/google:dist_files",
"//:well_known_ruby_protos",
"google-protobuf.gemspec",
],
srcs = [
"build_jruby_release.sh",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
target_compatible_with = select({
"@rules_ruby//ruby/runtime:config_jruby": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
)

sh_binary(
name = "release",
mkruskal-google marked this conversation as resolved.
Show resolved Hide resolved
data = [
"@utf8_range//:utf8_range_srcs",
"@utf8_range//:LICENSE",
"//:well_known_ruby_protos",
"//ruby/ext/google/protobuf_c:dist_files",
"//ruby/lib/google:dist_files",
"google-protobuf.gemspec",
],
srcs = [
"build_release.sh",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
target_compatible_with = select({
"@rules_ruby//ruby/runtime:config_ruby": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
)

################################################################################
# Tests
################################################################################
Expand Down
63 changes: 63 additions & 0 deletions ruby/build_jruby_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash
# This file should be executed with jruby

set -ex

# --- begin runfiles.bash initialization ---
# Copy-pasted from Bazel's Bash runfiles library (tools/bash/runfiles/runfiles.bash).
set -euo pipefail
if [[ ! -d "${RUNFILES_DIR:-/dev/null}" && ! -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
if [[ -f "$0.runfiles_manifest" ]]; then
export RUNFILES_MANIFEST_FILE="$0.runfiles_manifest"
elif [[ -f "$0.runfiles/MANIFEST" ]]; then
export RUNFILES_MANIFEST_FILE="$0.runfiles/MANIFEST"
elif [[ -f "$0.runfiles/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
export RUNFILES_DIR="$0.runfiles"
fi
fi
if [[ -f "${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
source "${RUNFILES_DIR}/bazel_tools/tools/bash/runfiles/runfiles.bash"
elif [[ -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
source "$(grep -m1 "^bazel_tools/tools/bash/runfiles/runfiles.bash " \
"$RUNFILES_MANIFEST_FILE" | cut -d ' ' -f 2-)"
else
echo >&2 "ERROR: cannot find @bazel_tools//tools/bash/runfiles:runfiles.bash"
exit 1
fi
# --- end runfiles.bash initialization ---
mkruskal-google marked this conversation as resolved.
Show resolved Hide resolved

# Make a temporary directory and move to it to do all packaging work
mkdir -p tmp
Copy link
Member

Choose a reason for hiding this comment

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

Since we're in the sandbox now do we need a tmp directory?

Copy link
Member Author

Choose a reason for hiding this comment

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

I needed to make a new directory to start with a clean directory since this ends up being run in bazel-bin's runfile directory where a copy of all of the dependency files are.

Copy link
Member

@mkruskal-google mkruskal-google Jan 19, 2023

Choose a reason for hiding this comment

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

This gets run in bazel-bin/ruby/jruby_release.runfiles/com_google_protobuf/, which should only contain your dependencies. Why do we need to copy all of them into a fresh folder? This seems redundant, we could just run gem build from this directory

cd tmp

# Move all generated files to lib/google/protobuf
mkdir -p lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/any_pb.rb)" lib/google/protobuf
Copy link
Member

Choose a reason for hiding this comment

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

You can use dirname to copy these with a wildcard

Copy link
Member Author

Choose a reason for hiding this comment

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

I went back and forth on this. rlocation doesn't support wildcards, but I think you are suggesting that I get the dirname and then use wildcards which could be possible.

I ended up manually listing them as more of a precaution. Everywhere else the files are wildcarded in which I think could make it very easy to lose a file. This will fail in that case, which I think ends up being a good check. On the other hand, a new file being added could cause this to fail silently. What do you think about that tradeoff?

Copy link
Member

@mkruskal-google mkruskal-google Jan 19, 2023

Choose a reason for hiding this comment

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

If we were missing a file I would expect the gem build/test to fail in our CI. This seems a bit redundant to me, and not worth the maintenance burden.

One alternative that might work nicely is to add an sh_test rule that actually runs the tests using the built gem. That way we can actually run our tests locally and not have to wait for the CI to be run over a PR. It would also simplify the ruby_install.yml file I think

Copy link
Member

Choose a reason for hiding this comment

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

ln or mv would be slightly more efficient here

cp "$(rlocation com_google_protobuf/src/google/protobuf/api_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/descriptor_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/duration_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/empty_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/field_mask_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/source_context_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/struct_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/timestamp_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/type_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/wrappers_pb.rb)" lib/google/protobuf

cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf_java.jar)" lib/google

# Move all source files to the correct location
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf.rb)" lib/google
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf/descriptor_dsl.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf/message_exts.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf/repeated_field.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf/well_known_types.rb)" lib/google/protobuf

# Move gemspec file to current directory
cp "$(rlocation com_google_protobuf/ruby/google.protobuf.gemspec)" .

# Make all files global readable/writable/executable
chmod -R 777 ./

# Build gem
gem build google-protobuf.gemspec
88 changes: 88 additions & 0 deletions ruby/build_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#!/bin/bash
# This file should be executed with ruby

set -ex

# --- begin runfiles.bash initialization ---
# Copy-pasted from Bazel's Bash runfiles library (tools/bash/runfiles/runfiles.bash).
set -euo pipefail
if [[ ! -d "${RUNFILES_DIR:-/dev/null}" && ! -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
if [[ -f "$0.runfiles_manifest" ]]; then
export RUNFILES_MANIFEST_FILE="$0.runfiles_manifest"
elif [[ -f "$0.runfiles/MANIFEST" ]]; then
export RUNFILES_MANIFEST_FILE="$0.runfiles/MANIFEST"
elif [[ -f "$0.runfiles/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
export RUNFILES_DIR="$0.runfiles"
fi
fi
if [[ -f "${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
source "${RUNFILES_DIR}/bazel_tools/tools/bash/runfiles/runfiles.bash"
elif [[ -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
source "$(grep -m1 "^bazel_tools/tools/bash/runfiles/runfiles.bash " \
"$RUNFILES_MANIFEST_FILE" | cut -d ' ' -f 2-)"
else
echo >&2 "ERROR: cannot find @bazel_tools//tools/bash/runfiles:runfiles.bash"
exit 1
fi
# --- end runfiles.bash initialization ---

# rvm use ruby-3.0

# Make a temporary directory and move to it to do all packaging work
mkdir -p tmp
Copy link
Member

Choose a reason for hiding this comment

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

Same comments here

cd tmp

# Move all generated files to lib/google/protobuf
mkdir -p lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/any_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/api_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/descriptor_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/duration_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/empty_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/field_mask_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/source_context_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/struct_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/timestamp_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/type_pb.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/src/google/protobuf/wrappers_pb.rb)" lib/google/protobuf

# Move all utf-8 files to ext/google/protobuf_c/third_party/utf8_range
UTF8_DIR=ext/google/protobuf_c/third_party/utf8_range
mkdir -p $UTF8_DIR
cp "$(rlocation utf8_range/LICENSE)" $UTF8_DIR/LICENSE
cp "$(rlocation utf8_range/naive.c)" $UTF8_DIR
cp "$(rlocation utf8_range/range2-neon.c)" $UTF8_DIR
cp "$(rlocation utf8_range/range2-sse.c)" $UTF8_DIR
cp "$(rlocation utf8_range/utf8_range.h)" $UTF8_DIR

# Move all source files to the correct location
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/convert.c)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/convert.h)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/defs.c)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/defs.h)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/extconf.rb)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/map.c)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/map.h)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/message.c)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/message.h)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/protobuf.c)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/protobuf.h)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/repeated_field.c)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/repeated_field.h)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/ruby-upb.c)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/ruby-upb.h)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/ext/google/protobuf_c/wrap_memcpy.c)" ext/google/protobuf_c
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf.rb)" lib/google
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf/descriptor_dsl.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf/message_exts.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf/repeated_field.rb)" lib/google/protobuf
cp "$(rlocation com_google_protobuf/ruby/lib/google/protobuf/well_known_types.rb)" lib/google/protobuf

# Move gemspec file to current directory
cp "$(rlocation com_google_protobuf/ruby/google.protobuf.gemspec)" .

# Make all files global readable/writable/executable
chmod -R 777 ./

# Build gem
gem build google-protobuf.gemspec
4 changes: 2 additions & 2 deletions ruby/ext/google/protobuf_c/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
dir_config(ext_name)

if RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ || RUBY_PLATFORM =~ /freebsd/
$CFLAGS += " -std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement"
$CFLAGS += " -std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement -I$(srcdir)/third_party/utf8_range"
else
$CFLAGS += " -std=gnu99 -O3 -DNDEBUG"
end
Expand All @@ -25,4 +25,4 @@
"repeated_field.c", "map.c", "ruby-upb.c", "wrap_memcpy.c",
"naive.c", "range2-neon.c", "range2-sse.c"]

create_makefile(ext_name, Dir.pwd+"/../../../../ext/google/protobuf_c")
create_makefile(ext_name)
2 changes: 2 additions & 0 deletions ruby/lib/google/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ java_binary(
runtime_deps = [
"//ruby/src/main/java:protobuf_java"
],
deploy_env = ["@rules_ruby//ruby/runtime:jruby_binary"],
create_executable = False,
)

Expand All @@ -37,6 +38,7 @@ genrule(
outs = ["protobuf_java.jar"],
cmd = "cp $< $@",
tags = ["manual"],
visibility = ["//ruby:__subpackages__"],
)

ruby_library(
Expand Down