Skip to content

Allow bundle lock --add-platform to add native platforms from JRuby - #10105

Merged
hsbt merged 2 commits into
ruby:masterfrom
hsbt:lock-added-platform-dependencies
Nov 20, 2026
Merged

hsbt merged 2 commits into
ruby:masterfrom
hsbt:lock-added-platform-dependencies

Conversation

@hsbt

@hsbt hsbt commented Nov 20, 2026

Copy link
Copy Markdown
Member

On JRuby, adding a native platform fails when the Gemfile includes a Java-only gem under platforms :jruby. After resolving dependencies, Bundler checks the native platform against the dependencies for the running JRuby.

Check each platform against its own Gemfile dependencies so native platforms can be added together or one at a time. When a resolved gem has no build for an added platform, name that platform in the error.

Fixes #9457.

hsbt added 2 commits November 20, 2026 10:57
Checking native platforms against the running JRuby requires Java-only gems on those platforms. It can also discard a native platform already in the lockfile when adding another one.
A package can resolve on several platforms even when a dependency is missing from one of them. Name that target when the resolved version identifies the mismatch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundler fails to add platform-specific versions after starting with JRuby

1 participant