-
Notifications
You must be signed in to change notification settings - Fork 58
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
Work towards JRuby compatibility #5
Conversation
This is part of aws#4. Until JRuby 9.2.0.0 is released, the required_ruby_version in the gemspec will keep this from working there, as well as jruby/jruby#5099. * Replaced Oj with MultiJson + Oj OR JrJackson * Removed Oj.dump parameters, since those are defaults when using MultiJson * Remove rdiscount for Markdown generation, use default Yard generator. * Made two minor code syntax changes to make the Yard generator happy I've roughly compared the generated RDoc and they look very similar.
Thank you for the contribution. Will get back to you soon, |
@@ -1,5 +1,4 @@ | |||
--title 'AWS X-Ray SDK for Ruby' | |||
--markup markdown | |||
--markup-provider rdiscount |
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.
This makes sure the API ref doc has the same style as the AWS SDK for Ruby: https://github.com/aws/aws-sdk-ruby/blob/master/.yardopts#L5. Any reason you need to remove it?
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.
The rdiscount gem uses the rdiscount C library, which means it's not really JRuby compatible. That's a development dependency, and I couldn't run rake docs (or run default rake task) while it was present. I built docs with the default markup provider and got very similar output (after I fixed the two parsing problems I encountered).
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.
From my understand, with this change, MRI users that upgrade the SDK are required to add gem 'oj', platform: :mri
in their Gem file, so this is a breaking change correct? Could this be avoid somehow or this has to happen in order to support JRuby?
That's a good point about this being a breaking change. I was hoping that since the gem was still in beta, that was ok. If we want to avoid it, we'll have to build and publish two "flavors" of the gem, one for java and one for mri. That would allow us to do things in the gemspec like add conditionals based on the ruby platform to require different gems (and different ruby versions). I can update the gemspec to do that if you'd like -- you'll have to change how it publishes the gem to do both flavors. |
It is ok to make this breaking change for JRuby support. There are two concerns:
So it seems like
|
|
Thanks for point it out. It looks good to me. Please note the SDK will still need locking on some certain functions to completely work with JRuby. |
This is part of #4. Until JRuby 9.2.0.0 is released, the
required_ruby_version in the gemspec will keep this from working there,
as well as jruby/jruby#5099.
I've roughly compared the generated RDoc and they look very similar.