Closed katafrakt closed 3 years ago
@katafrakt our spec suite passes so this is confusing. Are you sure you're using the latest version of jruby?
@solnic yes, I am sure. Also, the test suite passes for me too when I clone the repo. It works when I set source to the git repo via
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'dry-container', git: 'https://github.com/dry-rb/dry-container'
end
but not for 0.8.0 (with bundler or without)
As for my JRuby version:
❯ ruby -v
jruby 9.2.17.0 (2.5.8) 2021-03-29 84d363da97 OpenJDK 64-Bit Server VM 25.282-b00 on 1.8.0_282-bre_2021_01_20_16_37-b00 +jit [darwin-x86_64]
I downloaded the actual files from rubygems and looked at metadata
files. For dry-core
it says:
required_ruby_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: 2.5.0
while for dry-container
the relevant lines say
required_ruby_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: 2.6.0
So yeah, I suspect the problem does not lie in the code but in the file that has been pushed to rubygems.
@katafrakt 2.5.0 support was dropped in dry-container 0.8.0 but there's a workaround in the gemspec that is meant to make things work under jruby https://github.com/dry-rb/dry-container/blob/master/dry-container.gemspec#L29-L33
it turned out this doesn't work for some reason where the metadata is fetched via rubygems index :(
@solnic but I see the same workaround in dry-core
, where it works 🤔
@katafrakt nah, dry-core 0.6 has a different gemspec https://github.com/dry-rb/dry-core/blob/v0.6.0/dry-core.gemspec#L29
right, I was looking at master.
BTW I ran gem build dry-container.gemspec
from JRuby and it generated "correct" metadata
, but that's quite inconvenient.
Yeah, it wasn't the goal. You can stick to the previous version of fry-container for the time being. There were no changes in the gem other than metadata update.
I removed a condition for jruby so dry-container 0.8 is officially 2.6+ meaning it's not jruby-compatible. I did it because as I understand the matters jruby 9.3 is around the corner, so to speak. Once a preview is out I'll re-add it to CI. My hope is the problem will "resolve itself" soon, it's not a break up with jruby :) It's just reducing the maintaining effort. For the time being, it's safe to use older dry-* dependencies, we don't rush into adding lots of stuff at the moment :)
Ok, that's fair I guess. I'm not sure how close is the corner around which JRuby 9.3 hides, because there's still a number of unresolved issues, but let's hope it is close. I think this issue can be closed now.
@katafrakt 👍 I think you can ping jruby folks for a brief update. I'm pretty sure it'd be fine to cut a new version without full 2.6 compat, at least as a preview. IIRC they used to do it in the past
Hey, @flash-gordon! JRuby 9.3.0.0 has been released, so I guess it's safe to re-add it (re this commit: https://github.com/dry-rb/template-gem/commit/6dec27f6c83051de750171d9adbca500b6fe8d05). Let me know if you want me to test some things first.
@katafrakt yeah, I saw, great news. Now waiting for https://github.com/ruby/setup-ruby/issues/220 😅
@katafrakt done 🎉
Describe the bug
When attempting to install dry-container 0.8.0 on JRuby, I'm consistently getting an error:
dry-core
, which has similar code in the gemspec, installs fine.To Reproduce
jruby -S gem install dry-container --version 0.8.0
Expected behavior
dry-container
0.8.0 is installedMy environment
I checked it with JRuby versions 9.2.16.0 and 9.2.17.0 on Linux and Mac. Tried
gem update --system
but did not help.The only thing I see is that in dry-container rubygems page required ruby version on the right is
>= 2.6.0
while with dry-core it says>= 2.5.0
. So maybe a wrong file was pushed to RubyGems somehow?