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

When using JRuby 9.4.7 and bundler 2.5.11, Adding additional platforms to the lockfile removes existing ones #7741

Open
skunkworker opened this issue Jun 12, 2024 · 6 comments

Comments

@skunkworker
Copy link

skunkworker commented Jun 12, 2024

I originally posted this issue in jruby/jruby#8287 but was told this is unlikely to be a JRuby bug.

Environment Information

jruby-9.4.7.0 @ jdk21
cruby-3.1.5
macOS 14.5
bundler 2.5.11

Describe the problem as clearly as you can

When using JRuby 9.4.7 (latest) , I cannot add additional platforms to the Gemfile.lock without existing platforms being removed.
However, with CRuby 3.1.5 this does not occur and I am able to add additional platforms without removal.

Post steps to reproduce the problem

I start with the following PLATFORMS section in my Gemfile.

PLATFORMS
   arm64-darwin-22
   arm64-darwin-23
   universal-java-17
   x86_64-linux

And run

bundle lock --add-platform arm64-darwin-22 arm64-darwin-23 x86_64-linux universal-java-17 universal-java-21

I expect just the universal-java-21 platform to be added to the Gemfile.lock.

Which command did you run?

bundle lock --add-platform arm64-darwin-22 arm64-darwin-23 x86_64-linux universal-java-17 universal-java-21

What were you expecting to happen?

PLATFORMS
   arm64-darwin-22
   arm64-darwin-23
   universal-java-17
+  universal-java-21
   x86_64-linux

What actually happened?

PLATFORMS
-  arm64-darwin-22
-  arm64-darwin-23
   universal-java-17
-  x86_64-linux
+  universal-java-21

If not included with the output of your command, run bundle env and paste the output below

Environment

Bundler             2.5.9
  Platforms         ruby, universal-java-17
Ruby                3.1.4p0 (2024-04-29 revision 597ff08ac1e0d7f05f8f6cc836648725756dd7db) [universal-java-17]
  Full Path         /Users/john/.rvm/rubies/jruby-9.4.7.0/bin/jruby
  Config Dir        /Users/john/.rvm/rubies/jruby-9.4.7.0/etc
RubyGems            3.5.11
  Gem Home          /Users/john/.rvm/gems/jruby-9.4.7.0
  Gem Path          /Users/john/.rvm/gems/jruby-9.4.7.0:/Users/john/.rvm/rubies/jruby-9.4.7.0/lib/ruby/gems/shared
  User Home         /Users/john
  User Path         /Users/john/.gem/jruby/3.1.0
  Bin Dir           /Users/john/.rvm/gems/jruby-9.4.7.0/bin
Tools
  Git               2.45.0
  RVM               1.29.12-next (master)
  rbenv             not installed
  chruby            not installed
  rubygems-bundler  (1.4.5)

Bundler Build Metadata

Built At          2024-04-12
Git SHA           4304697e0c
Released Version  true

Bundler settings

build.nokogiri
  Set for the current user (/Users/john/.bundle/config): "--use-system-libraries"
cache_all
  Set for your local app (/Users/john/dev/myapp/.bundle/config): false
cache_all_platforms
  Set for the current user (/Users/john/.bundle/config): true
deployment
  Set for your local app (/Users/john/dev/myapp/.bundle/config): false
gem.changelog
  Set for the current user (/Users/john/.bundle/config): true
gem.ci
  Set for the current user (/Users/john/.bundle/config): "gitlab"
gem.coc
  Set for the current user (/Users/john/.bundle/config): false
gem.linter
  Set for the current user (/Users/john/.bundle/config): "rubocop"
gem.mit
  Set for the current user (/Users/john/.bundle/config): true
gem.push_key
  Set for the current user (/Users/john/.bundle/config): "[REDACTED]"
gem.test
  Set for the current user (/Users/john/.bundle/config): "rspec"
jobs
  Set for the current user (/Users/john/.bundle/config): 8
@deivid-rodriguez
Copy link
Member

Thanks for the report!

In the issue title, it mentions Bundler 2.5.11, however your bundle env shows you're using 2.5.9. Can you rerun with Bundler 2.5.11 and post updated information?

Also, would it be possible to share a Gemfile that reproduces the problem? I understand you're most likely using private gems, but can you try minimize the Gemfile removing the private stuff and see if the problem still reproduces? I did some testing with JRuby and I was not able to reproduce the problem, that's why I need more specific information.

@deivid-rodriguez
Copy link
Member

I'll close since there was no further feedback, so assuming this was fixed in the latest releases. If you're still running into this, please reopen posting the requested information if possible.

@deivid-rodriguez deivid-rodriguez closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2024
@skunkworker
Copy link
Author

@deivid-rodriguez I just tried with bundler 2.5.14 on jruby-9.4.7 and this issue still occurred. The platforms were removed from the gemfile.lock upon bundler update

@deivid-rodriguez
Copy link
Member

Ok, thanks. I'll reopen for a couple more weeks in case someone else posts the requested information. Otherwise this issue is not actionable for me, since I don't know what's wrong and I can't reproduce the problem.

@skunkworker
Copy link
Author

skunkworker commented Jun 28, 2024

@deivid-rodriguez I'm currently in the process of creating a reproducible example. I unfortunately cannot share the original Gemfile since it contains internal gems hosted on a JFrog rubygems pull through mirror (one of the areas I'm considering there might be a problem).

But as of right now I've narrowed it down to some oddities around an internal gem that we publish two versions of, one with no platform specified and the other java. As well as having a gem jruby-openssl with the platform block specified.

The frustrating thing so far is that it doesn't occur every time, just some of the time. Is there a verbose flag I could enable, that would print when a platform gets removed from the lockfile?.

@deivid-rodriguez
Copy link
Member

Thanks! No, but I'll try to introduce some debug logging for this and let you know once ready so you can get more information that may help you isolate this more 👍.

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

No branches or pull requests

2 participants