ruby / date

A subclass of Object includes Comparable module for handling dates.
Other
70 stars 35 forks source link

JRuby support #48

Open headius opened 2 years ago

headius commented 2 years ago

JRuby provides its own extension for the date library, and this will need to be incorporated into the released gem. We will do the work on this.

headius commented 1 year ago

We have an immediate need for a no-op date gem due to it being a transitive dependency of many libraries, including time 0.2.0.

Could we push an empty -java platform gem for the most recent date release? We will prioritize dealing with this appropriately after the US Thanksgiving holiday.

headius commented 1 year ago

@hsbt Sorry to always ping you but I can't tell who maintains this library. Can you help us get an empty date gem released, so JRuby 9.4 users will be able to run latest net-ftp and time gems (at least)?

hsbt commented 1 year ago

@headius 👋

I'm not sure what's mean no-op on date gem. In my understanding, spec.files and spec.extension are empty both. Can you submit a PoC for this?

headius commented 1 year ago

@hsbt Yes that is basically it; it would satisfy the gem dependency but not install any of the extension code.

We may be able to move our date implementation into this gem at some point but it is rather entwined with JRuby core right now.

headius commented 1 year ago

An alternative would be releasing a time gem with -java that does not depend on date.

headius commented 1 year ago

@hsbt I have pushed #81 to stub out the gem on JRuby. Can we get a 3.3.1 release with this soon (ASAP if possible)?

chadlwilson commented 1 year ago

I assume this is related to https://github.com/ruby/net-imap/issues/84 (logged there for others' benefit, but may be a wontfix)

headius commented 1 year ago

@chadlwilson Yeah it's the same issue. The no-op gem should fix this everywhere for now.

hsbt commented 1 year ago

@chadlwilson @headius I released date-3.3.1 and date-3.3.1-java that is empty package. Can you try it?

headius commented 1 year ago

@hsbt It looks like it's working!

[] jruby $ gem install time
Fetching date-3.3.1-java.gem
Fetching time-0.2.0.gem
Successfully installed date-3.3.1-java
Successfully installed time-0.2.0
Parsing documentation for date-3.3.1-java
Installing ri documentation for date-3.3.1-java
Parsing documentation for time-0.2.0
Installing ri documentation for time-0.2.0
Done installing documentation for date, time after 0 seconds
2 gems installed
chadlwilson commented 1 year ago

Thanks, seems to be working fine (at least for gem installs) - we don't use activemailer or net-imap from rails so can't validate the wider functionality of date equivalents under JRuby, but this is good so far - thanks!

headius commented 1 year ago

Part of us moving the JRuby code into the gem will be getting all tests passing. It's a tall order but that's the plan and hopefully we can do it in the next few months.