-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
jruby 9.x jar-dependencies thwarts gem install
prereq. to gemspec
#3078
Comments
closing as duplicate of #3074 - I did release jar-dependencies-0.1.15 yesterday and patched jruby-1_7 branch to use it.travis was not happy with this. will merge it to master once jruby-1_7 is happy on travis. please install the latest jar-dependencies and see if this helps. but any PR to improve things is welcome ;) |
Why would you immediately close this as a duplicate given the different error, gemspec particulars, commands it fails on, and without confirming any fix? I can't find any change in jar-dependencies 0.1.15 that would solve this issue. Did you have any particular commit(s) in mind? I based my proposed fix off of the current master: jruby/jar-dependencies#24 |
yes, maybe I was to hasty - sorry. the change from, yesterday was not to look at gemspec at all on |
Thank you for merging jruby/jar-dependencies#24. However you merged this after releasing 0.1.15. I confirmed that the fix is not present on either the maven central or rubygems versions of the jar-dependencies gem. I still don't see how this is either a duplicate or #3074 or how the upgrade to 0.1.15 (without the rescue change) fixes this? Perhaps there is some confusion between released and your local development versions of jar-dependencies 0.1.15? Please advise. |
yes, I released 0.1.15 yesterday and your PR came after the release. then I used you "test case" to verify 0,1.15 is fixing you problem as well, why I thought in the beginning that this is duplicate of #3074 is the psych problem you also have:
and without those issues the if you still see your problem with jar-dependencies-0.1.15 please reopen this issue. |
I don't see how that could work. Installing jar-dependencies -v0.1.15 doesn't work. The nightly snapshot still has jar-dependencies 0.1.14:
...so unless you can kick one of those off for me, I wait 12 hours for the next run? Heh, as if I had permission to reopen. |
I do not know about the permissions ;). are you saying I did upload my current snapshot to: https://oss.sonatype.org/content/repositories/snapshots/org/jruby/jruby-dist/9.0.0.0-SNAPSHOT/ |
OK, I can confirm that your latest snapshot does work correctly, thanks. I can only infer that this avoids spinning up jar-dependencies and attempting to read my project gemspec as a result of That does seem better, to avoid the jar-dependencies involvement in the first place! |
yes, |
Add a second (empty) gemspec to confuse jruby's jar-dependencies into not loading the main gemspec when the prerequisite `gem install rjack-tarpit` is run. Otherwise the main gemspec will throw a LoadError. Cart before the horse, etc. See jruby/jruby#3078 and note that despite claims in jruby/jruby#1974 setting JARS_SKIP does not avoid this issue.
As of at least 9.0.0.0.rc1 and the current travis-ci jruby-head, the built in jar-dependencies extension is loading and attempting to interpret a gemspec found in the current directory and even for such commands as
gem install
. In the case of several of my projects building on travis-ci, I need to rungem install
to satisfy a dependency of the project's gemspec, before the gemspec can be successfully loaded. Note this all works fine on MRI ruby as well as jruby 1.7.x.To reproduce:
Here is a travis build with the problem. Note this also results in a "bundle: command not found" warning/error in that environment:
https://travis-ci.org/dekellum/mojibake/jobs/67886026#L172
Note that supplying the JARS_SKIP environment setting does not avoid this issue. #1974 seemed to suggest that would be a workaround.
A simple/silly workaround is to add an empty 'another.gemspec' to the working directory. Apparently jar-dependencies gives up trying to load a gemspec if there are two files with that extension. Here is a working build with that workaround:
https://travis-ci.org/dekellum/mojibake/jobs/67891335
This is similar to issue #1975 as was previously resolved by jruby/jar-dependencies@0250839. Possibly other fixes in jruby 9, have made this the LoadError is should be, and above referenced fix does not successfully rescue LoadError.
I will provide a pull request fixing this to the jar-dependencies project.
The text was updated successfully, but these errors were encountered: