Skip to content

Commit fbbd96b

Browse files
Handle jruby versioning correctly for jar dependency
1 parent 98c2053 commit fbbd96b

File tree

5 files changed

+11
-21
lines changed

5 files changed

+11
-21
lines changed

WORKSPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ register_toolchains("@system_ruby//:toolchain")
7777
load("@system_ruby//:bundle.bzl", "ruby_bundle")
7878
ruby_bundle(
7979
name = "protobuf_bundle",
80-
bundler_version = "2.3.17",
8180
srcs = ["//ruby:google-protobuf.gemspec"],
8281
gemfile = "//ruby:Gemfile",
8382
)

maven_install.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"dependency_tree": {
33
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
4-
"__INPUT_ARTIFACTS_HASH": 1092524136,
5-
"__RESOLVED_ARTIFACTS_HASH": -621579158,
4+
"__INPUT_ARTIFACTS_HASH": -1875290602,
5+
"__RESOLVED_ARTIFACTS_HASH": -1248440885,
66
"conflict_resolution": {
77
"com.google.errorprone:error_prone_annotations:2.5.1": "com.google.errorprone:error_prone_annotations:2.11.0"
88
},
@@ -651,18 +651,6 @@
651651
"sha256": "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9",
652652
"url": "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
653653
},
654-
{
655-
"coord": "org.jruby:jruby-complete:9.2.20.1",
656-
"dependencies": [],
657-
"directDependencies": [],
658-
"file": "v1/https/repo1.maven.org/maven2/org/jruby/jruby-complete/9.2.20.1/jruby-complete-9.2.20.1.jar",
659-
"mirror_urls": [
660-
"https://repo1.maven.org/maven2/org/jruby/jruby-complete/9.2.20.1/jruby-complete-9.2.20.1.jar",
661-
"https://repo.maven.apache.org/maven2/org/jruby/jruby-complete/9.2.20.1/jruby-complete-9.2.20.1.jar"
662-
],
663-
"sha256": "c1bbc2ab5f0c5ca45cc5aa937060f35a321a480202e451eb9242fc14938b8289",
664-
"url": "https://repo1.maven.org/maven2/org/jruby/jruby-complete/9.2.20.1/jruby-complete-9.2.20.1.jar"
665-
},
666654
{
667655
"coord": "org.mockito:mockito-core:4.3.1",
668656
"dependencies": [

protobuf_deps.bzl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ PROTOBUF_MAVEN_ARTIFACTS = [
1313
"com.google.truth:truth:1.1.2",
1414
"junit:junit:4.13.2",
1515
"org.mockito:mockito-core:4.3.1",
16-
"org.jruby:jruby-complete:9.2.20.1"
1716
]
1817

1918
def _github_archive(repo, commit, **kwargs):
@@ -111,8 +110,8 @@ def protobuf_deps():
111110
_github_archive(
112111
name = "rules_ruby",
113112
repo = "https://github.com/protocolbuffers/rules_ruby",
114-
commit = "b8f651f80a5fad90d4db6e486b0ae047a8a46640",
115-
sha256 = "87c566c9c703e95e0a945a99d0c16c721a10be05cde671a8112182b00ae26c62",
113+
commit = "59732544ce3a4bc4e8e4d4e8c8f318c931c17eae",
114+
sha256 = "4fc45adf1056c824afde9a52b743b915eeada3633539eb1dbd641a66dc9f4c4f",
116115
)
117116

118117
if not native.existing_rule("rules_jvm_external"):

ruby/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ conformance_test(
4141
testee = "//conformance:conformance_ruby",
4242
text_format_failure_list = "//conformance:text_format_failure_list_ruby.txt",
4343
target_compatible_with = select({
44-
"@rules_ruby//ruby/runtime:config_jruby": ["@platforms//:incompatible"],
45-
"//conditions:default": [],
44+
"@rules_ruby//ruby/runtime:config_ruby": [],
45+
"//conditions:default": ["@platforms//:incompatible"],
4646
}),
4747
)
4848

ruby/src/main/java/BUILD.bazel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ java_library(
1010
"google/ProtobufJavaService.java"
1111
],
1212
deps = [
13-
"@maven//:org_jruby_jruby_complete",
13+
"@rules_ruby//ruby/runtime:jars",
1414
"//java/core",
1515
"//java/util",
1616
],
17+
target_compatible_with = select({
18+
"@rules_ruby//ruby/runtime:config_jruby": [],
19+
"//conditions:default": ["@platforms//:incompatible"],
20+
}),
1721
visibility = ["//ruby:__subpackages__"],
1822
)
1923

0 commit comments

Comments
 (0)