Closed minad closed 9 years ago
I'd like to second this request. At the moment if you've got a gem using msgpack in ruby, you have to build separate gems for each platform.
I'm sorry for being too late...
Actually msgpack-ruby v0.5 changed its API (mainly, it added Buffer class). So I think we need extra work to merge it.
But even just providing MessagePack.pack()
and MessagePack.unpack()
methods (meaning that not providing streaming deserializer/serializer) will still help a lot of people. How do you think this idea?
Here is some code I wrote for JRuby + v0.5. It's quite incomplete, though: https://gist.github.com/frsyuki/5198321
@frsyuki : Thank you for replying!
@frsyuki , @iconara: So it seems there is some agreement on that both projects should be merged :)
I'll have a look at the new API. Even if we don't merge I want to keep the JRuby version in sync. I'd also like to throw out the dependency on the Java library, it's a bit kludgy to fit the Ruby API on top of it. @frsyuki could be a starting point for something.
Even if the two gems offer compatible APIs, authors of other gems have a problem because RubyGems has no way to represent platform-specific dependencies.
For instance, my gem "global_session" needs mgpack and must declare either a msgpack dependency or a msgpack-jruby dependency. I can use an "if" statement in the gemspec, but this is not strictly legal.
@xeger I don't think that is a problem.
You can build the same gem and version targeting different platforms, for example, sqlite3:
http://rubygems.org/gems/sqlite3
Or Atomic:
http://rubygems.org/gems/atomic
If you depend on atomic
gem, it will use the proper for your platform, or fall back to the (ruby)
one, which will require compilation.
In the case of JRuby, that wouldn't be a problem.
Hope that makes sense and help understand that merging both codebase might be beneficial for the project.
Cheers.
:+1: for this issue. It seems that msgpack-jruby gem has enough interoperability for public APIs (described on its webpage) with msgpack gem. (except for Buffer API, that seems not be used by anyone currently.) http://ruby.msgpack.org/
:+1: for this issue too.
Currently, I have a plan which Fluentd supports JRuby and it needs msgpack and msgpack-jruby together. Merging msgpack-jruby into msgpack makes supporting JRuby easy.
@tagomoris @repeatedly thank you for head-up for this issue. I guess we should merge msgpack-ruby and msgpack-jruby. One concern is that I couldn't take time to improve msgack-ruby constantly. In fact I want to welcome another committer and package release manager to work on this issue.
:+1: good idea
@iconara seems good for new maintainer about merging jruby gem. How do you think @iconara ?
My plan is to submit a PR, but may take a month or so before I have time, unfortunately.
@iconara Sounds good. I'm sorry for taking too long time and thank you for your positive comments. Do you have interests to work on basic merging work (like Rakefile), say @tagomoris or @repeatedly? I guess having a good start point will help development. It's more than welcome for me to review code.
@frsyuki Of course, I can do it.
@frsyuki Yeah. I can help it. This is important for growing msgpack usability :)
Is there any chance that Unpacker api will be compatible? I talk about #read_map_header
, #read_array_header
, #read
methods, ability to check buffer, ability to iterate over input stream. It looks like there is no such abilities at the moment.
More APIs will be supported in JRuby, for more compatibility. @funny-falcon Could you open another issue for Unpacker api? (or pull-request? :-)
@frsyuki I think that this issue is to be closed now.
See https://github.com/iconara/msgpack-jruby/issues/3