-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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
Set platform to "java" under JRuby #2199
Conversation
Proposed fix for protocolbuffers#1594
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Avoid [failures in travis](https://travis-ci.org/google/protobuf/jobs/163611664) under jruby
Currently the |
CC: @blowmage |
Whoah! Does this work? Can the gem be installed on JRuby with this change? |
@blowmage - Works for me locally, and passed the travis test. I am still waiting for an answer on what impact this would have, if any, on the gem publishing process. Also, RubyGems has gone to v3.1.0, so I expect there is some large upstream merge about to land here that could delay this getting merged. |
CC: @apolcyn |
I tried this change locally and it to work for me too! That is, I'm building the gem as described in https://github.com/google/protobuf/tree/master/ruby, and the -java suffix does appear now. |
@apolcyn - is there anything about the code quality or style of the PR that needs improvement from your perspective in order to be eligible to be merged, or are you blocked by an authorization / policy issue? |
@JasonLunn Code wise, I would think we'd want to keep the Gemfile.lock checked in, to keep actual versions used. |
@apolcyn - In your opinion is enhancing the specificity of the calls to |
@JasonLunn - thanks I had missed that. In the case I think that making development dependencies more specific would work. That said, it looked to me like the travis failure was due to not finding the actual google-protobuf gem on jruby, wondering if it has to do with the gem just not being built or available somehow, in that test? anyways though, I don't have authorization for this - I haven't been working on this codebase. cc @haberman |
Uses values from the removed `Gemfile.lock` as a baseline for version requirements, though it has been observed to work with the latest versions of all the referenced gems - see https://travis-ci.org/google/protobuf/builds/163625616 for details
Travis seems a little backed up at the moment, but I've added the requirements to the development dependencies. Note that this does not result in the exact same patch level versions as appeared in the |
Checks all passed - any other feedback? |
@haberman - any questions or concerns? |
@apolcyn - Is there an internal discussion going on about this PR out of band? |
@JasonLunn From what I know, this change looks good; I think it should fix the jruby package issue. But I don't have further approval to make. |
s.files += ["lib/google/protobuf_java.jar"] | ||
else | ||
s.files += Dir.glob('ext/**/*') | ||
s.extensions= ["ext/google/protobuf_c/extconf.rb"] | ||
s.add_development_dependency "rake-compiler-dock" | ||
s.add_development_dependency "rake-compiler-dock", "~> 0.5.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to specify versions? When/why will we update these versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was added in response to commentary above about the removal of Gemfile.lock
. The tests pass with the latest versions of all the gems that have version requirements specified. I believe the concern is that to have completely unpinned development dependencies could introduce flakiness in the automated tests.
Thanks all - is there any other work need from my end to change the distribution process so that both gems for both platforms are published during subsequent releases? |
@haberman - Is there anything keeping the 3.1.0 build of the gem being published for the JRuby platform? |
I think this PR breaks the jenkins test for ruby. |
@TeBoring - It is hard to tell from the just the output, but since an essential part of this PR was to remove |
Travis appears to be configured to run the various ruby tests individually, rather than invoking
Preferences? |
I think we need a fix that allows us to run: $ ./tests.sh ruby21
$ ./tests.sh ruby22
$ ./tests.sh jruby without failing tests. Only (2) can satisfy this? |
I think (3) should remove a superset of the files removed by (2) - I'm theorizing that |
#2254 is running through Travis now - are Jenkins builds kicked off automatically? |
BUNDLE_GEMFILE env var to set the gemfile.lock filename separately per each ruby, if necessary, but it's overkill. Remove the Gemfile.lock from the repo, deps should be specified in the gemspec and the Gemfile should only contain:
Gemfile.lock is ignored by rubygems because Gemfile and Gemfile.lock are bundler artifacts. End-users only see gemspecs. |
Proposed fix for #1594