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

Cannot resolve ruby-debug dependencies properly #213

Closed
rtyler opened this Issue Sep 9, 2015 · 2 comments

Comments

2 participants
@rtyler
Member

rtyler commented Sep 9, 2015

The ruby-debug gem expresses a version dependency on ruby-debug-base ~> 0.10.4.0 which JRuby/Gradle complains about:

* What went wrong:
Execution failed for task ':run'.
> Could not resolve all dependencies for configuration ':jrubyExec'.
   > Could not find any version that matches rubygems:ruby-debug-base:[0.10.4.0,0.10.4.99999].
     Versions that do not match:
         0.10.6
         0.10.4
         0.10.3
         0.10.2
         0.10.1
         + 7 more
     Required by:
         :test-ruby-debug:unspecified > rubygems:ruby-debug:0.10.4
@mkristian

This comment has been minimized.

Show comment
Hide comment
@mkristian

mkristian Sep 9, 2015

Contributor

having rubygems:ruby-debug-base:[0.10.4.0, 0.10.4.99999] as dependency can not resolved to rubygems:ruby-debug-base:0.10.4 via the ivy resolver used by gradle. nothing the plugin can adjust in a sane way, i.e. without increasing the range to [0.10.4,0.10.5] but not work with [0.10.4.2, 0.10.4.99999] ranges anymore.

Contributor

mkristian commented Sep 9, 2015

having rubygems:ruby-debug-base:[0.10.4.0, 0.10.4.99999] as dependency can not resolved to rubygems:ruby-debug-base:0.10.4 via the ivy resolver used by gradle. nothing the plugin can adjust in a sane way, i.e. without increasing the range to [0.10.4,0.10.5] but not work with [0.10.4.2, 0.10.4.99999] ranges anymore.

@mkristian

This comment has been minimized.

Show comment
Hide comment
@mkristian

mkristian Sep 9, 2015

Contributor

after a second thought something like:

if more then three version parts then transform the last version parts to one, when last one is '0'

examples:
[0.10.4.0, 0.10.4.99999] => [0.10.4, 0.10.4.99999]
[0.10.5.rc9.0, 0.10.5.rc9.99999] => [0.10.5.rc9, 0.10.5.rc9.99999]

so basically we can eliminate the trailing 0 digits of a version. this brings us closer to the maven version resolution.

Contributor

mkristian commented Sep 9, 2015

after a second thought something like:

if more then three version parts then transform the last version parts to one, when last one is '0'

examples:
[0.10.4.0, 0.10.4.99999] => [0.10.4, 0.10.4.99999]
[0.10.5.rc9.0, 0.10.5.rc9.99999] => [0.10.5.rc9, 0.10.5.rc9.99999]

so basically we can eliminate the trailing 0 digits of a version. this brings us closer to the maven version resolution.

mkristian added a commit to mkristian/jruby-gradle-plugin that referenced this issue Sep 9, 2015

remove trailing 0 version parts on ranges
gradle can not resolve 1.0.4.0 to 1.0.4 the same way maven does. removing the tailing
'0' helps to be more in line with maven.

fixes #213

@rtyler rtyler closed this in #214 Sep 9, 2015

rtyler added a commit to rtyler/jruby-gradle-plugin that referenced this issue Sep 10, 2015

remove trailing 0 version parts on ranges
gradle can not resolve 1.0.4.0 to 1.0.4 the same way maven does. removing the tailing
'0' helps to be more in line with maven.

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