Skip to content

fix: strip full Java platform suffix from gem version when querying RubyGems API#373

Merged
p0deje merged 1 commit into
bazel-contrib:mainfrom
TvdW:strip-java-platform-suffix
Jun 2, 2026
Merged

fix: strip full Java platform suffix from gem version when querying RubyGems API#373
p0deje merged 1 commit into
bazel-contrib:mainfrom
TvdW:strip-java-platform-suffix

Conversation

@TvdW
Copy link
Copy Markdown

@TvdW TvdW commented May 22, 2026

The previous gem.version.replace("-java", "") only handles the bare -java platform; for gems whose platform is universal-java (e.g. ffi-yajl-2.6.0-universal-java) it leaves a -universal tail and queries a non-existent RubyGems version, hard-failing the repo rule.

Replace the naive strip with a helper that covers all four real-world Java platform shapes: java, java-N, universal-java, universal-java-N.

…ubyGems API

The previous `gem.version.replace("-java", "")` only handles the bare
`-java` platform; for gems whose platform is `universal-java` (e.g.
`ffi-yajl-2.6.0-universal-java`) it leaves a `-universal` tail and queries
a non-existent RubyGems version, hard-failing the repo rule.

Replace the naive strip with a helper that covers all four real-world Java
platform shapes: `java`, `java-N`, `universal-java`, `universal-java-N`.
@p0deje p0deje merged commit b434a52 into bazel-contrib:main Jun 2, 2026
56 checks passed
@p0deje
Copy link
Copy Markdown
Member

p0deje commented Jun 2, 2026

Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants