Skip to content
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

redo date.rb (most) parts in native #5076

Merged
merged 78 commits into from Mar 12, 2018
Merged

redo date.rb (most) parts in native #5076

merged 78 commits into from Mar 12, 2018

Conversation

@kares
Copy link
Member

@kares kares commented Mar 2, 2018

still using JODA but all of the JI stuff in date.rb is gone behind ext classes, motivation :

  • for a while its 'hard' to create Date instances in AR-JDBC
  • some near era conversion had a nasty bug in all 9K which constantly pops up in AR-JDBC
  • some isolated AR benchmarks showed its slower than MRI
  • there's going to be some nice JI bonuses - toJava working as with RubyTime etc.

some parts were already in native (formatting) so the base setup was already there.

NOTE: in MRI pretty much all of the date.rb is in native - so there's still space for improvement.
e.g. _parse would make sense to end up in .java maybe someone will attempt it afterwards.

p.s. left behind one minor suite failure (argument validation hour: 24+1.to_r/2)
while its simple the bigger picture (of MRI argument handling) feels a bit weird.
some parts handle the overflow some not, smt Float do not work while Rational is ok - clunky.
would eventually circle back as I feel like that might end up as a MRI report/feature request.

needs rebase (waiting for tests) but would like to get this in so I can spent time testing + adding JI stuff.

@kares kares added this to the JRuby 9.2.0.0 milestone Mar 2, 2018
@kares kares requested review from headius and enebo Mar 2, 2018
@mkristian
Copy link
Member

@mkristian mkristian commented Mar 5, 2018

❤️
might ping you guys on irc on day to talk about repackage an/or third-party jars and its risks for jruby-9.2

@kares
Copy link
Member Author

@kares kares commented Mar 8, 2018

already tested with AR-JDBC - all seems well (and working backwards compatible even on master).
likely going to merge this soon, so I can finish up some JI stuff that will require a set of second eyes.

kares added 25 commits Jan 12, 2018
kares added 22 commits Feb 26, 2018
... this is simply distated by MRI's test suite

we do not handle "big-integer" but that shouldn't matter for real-world
esp. since numeric handling through code-base feels a bit inconsistent
NOTE: MRI does not care for `Time.local` re-definition with `date.to_time`
... driven by one of the last failures -> strftime-ing pico-secs precision
esp. early years has been a consitent surprise around AR-JDBC testing
... somehow naively assumed its re-calculating with the DateTime ctor
@kares kares force-pushed the date_native2 branch from c5fa846 to 2d16dd2 Mar 12, 2018
@kares kares merged commit cf89614 into master Mar 12, 2018
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@kares kares deleted the date_native2 branch Mar 12, 2018
kares added a commit that referenced this pull request Mar 26, 2018
resolves GH-5110 ... (another follow-up on date.rb refactoring #5076)
@headius headius mentioned this pull request Mar 28, 2018
12 of 15 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.