Closed
Description
See https://github.com/ruby/setup-ruby/runs/1542522363#step:3:25
Other projects also hit this: https://github.com/slonopotamus/asciimath/runs/1545553883?check_suite_focus=true#step:4:10
Possibly you want to revert 0981b5e until this is fixed.
Activity
downgrade Bundler for JRuby on Windows
eregon commentedon Dec 13, 2020
See #128 and rubygems/rubygems#4129
It's not about JRuby 9.2.14.0 vs 9.2.13 but about Bundler 2.2.0 + a bug in all JRuby 9.2 releases so far.
slonopotamus commentedon Dec 13, 2020
Well, my point is that it's setup-ruby who decides what exact Bundler version and what exact JRuby version to install when user requests
jruby
.slonopotamus commentedon Dec 13, 2020
You already have logic like "install bundler 1.x on JRuby 9.1". Maybe you could also help users with current issue the same way?
eregon commentedon Dec 13, 2020
No, it's RubyGems. setup-ruby only does
gem install bundler -v '~> 2'
.I'm not going to compensate and add extra complexity for upstream bugs like that which need to be addressed upstream.
That 9.1 case is only because Bundler 1 seems unmaintained, and because there is a similar case for CRuby 2.3, i.e., there is no other possible fix.
slonopotamus commentedon Dec 13, 2020
Okay, that's why I initially suggested to just skip broken JRuby version.
eregon commentedon Dec 13, 2020
It also fails on JRuby 9.2.13.0 + Bundler 2.2.0, as I said above (so that wouldn't help).
Take a look at the linked issue for more details.
Anyway, you can workaround with:
slonopotamus commentedon Dec 13, 2020
Uh. I just hoped to fix it in a single place (setup-ruby) instead of having to walk twice through all workflows that run jruby+windows. First to add a workaround and then to remove it back when a fixed JRuby version is released.
eregon commentedon Dec 13, 2020
So I think the only thing ruby/setup-ruby could do to workaround this (to be clear in no case this can be considered a ruby/setup-ruby bug) would be to pick Bundler 2.1.4 when
bundler: 2
(or the default) is specified.But that's inevitably going to be confusing for users which expect latest Bundler, and then rubygems/rubygems#3256 would be an issue again.
Maybe using Bundler 1 is more compatible with JRuby 9.2 on Windows?
slonopotamus commentedon Dec 13, 2020
Yeah, I fully agree it's not setup-ruby fault.
rubygems/rubygems#3256 is workaroundable in a way that doesn't need to be reverted later. Also, rubygems/rubygems#3256 was broken for such a long time that most likely people already made a workaround for it in their workflow files.
eregon commentedon Dec 13, 2020
@deivid-rodriguez What do you think regarding my comment just above?
Should we workaround in ruby/setup-ruby for Bundler 2.2.0-related issues by picking 2.1.4 instead until there is a new release fixing those issues (rubygems/rubygems#4123, rubygems/rubygems#4129) ? (the second one potentially needing a JRuby release)
I can see it's useless to fail all workflows if e.g. Bundler 2.2.0 didn't work at all, but this is not the case, it's only some combinations that fail and in fact with rubygems/rubygems#3256 we have an example of not using Bundler 2.2.0 causing another bug.
Also, since some workflows already use Bundler 2.2.0, we might have some subtle issues if they suddenly use Bundler 2.1.4 again.
Honestly, I'm happy to care about ruby/setup-ruby bugs, but not about potentially any bug in some Ruby implementation and/or in RubyGems/Bundler, that just feels out of scope.
slonopotamus commentedon Dec 13, 2020
Well, setup-ruby own test CI doesn't pass currently. Is it going to be fixed somehow or it will be left in this state until one of (JRuby|Bundler) fixes the issue?
eregon commentedon Dec 13, 2020
Another concern is, if a bug is annoying, then people should make that clear on the upstream ticket, to clarify a release fixing it is warranted.
Working around it here won't solve it for actual non-CI users, so the only real fix is upstream fixes anyway, and I think it's more useful to push for that than for workarounds which would only apply for ruby/setup-ruby, but still be issues for actual non-CI users.
What I don't appreciate about this issue report is I get all the work and trouble, when it's in no case my fault.
Current plan is waiting for an upstream fix, yes. I feel I already did more than my part by reporting the bug upstream.
Having to do two releases + changes in setup-ruby + having to follow about it to workaround that seems heavy.
Anyway, it's Sunday, so I won't look at this ticket anymore today.
11 remaining items