WIP: Support for JRuby-9000 #3792

Closed
wants to merge 8 commits into
from

Projects

None yet

5 participants

@kennethkalmer
Contributor

Will bring in the combined efforts of previous attempts to get activeadmin running on jruby-9000, slated to be the next major JRuby release.

  • Get dependencies installed
  • Get the tests running
  • Fix any test failures
  • Hook up to CI
  • Prosper
@kennethkalmer kennethkalmer chore: specified different platforms for development/test dependencie…
…s so we can install on jruby
2e94aaa
@timoschilling timoschilling and 1 other commented on an outdated diff Feb 13, 2015
# Documentation
- gem 'yard' # Documentation generator
- gem 'redcarpet' # Markdown implementation (for yard)
+ gem 'yard' # Documentation generator
+ gem 'redcarpet', platforms: :mri # Markdown implementation (for yard)
+ gem 'kramdown', platforms: :jruby # Markdown implementation (for yard)
@timoschilling
timoschilling Feb 13, 2015 Member

please bring all comments of all blocks into one line

@kennethkalmer
kennethkalmer Feb 13, 2015 Contributor

across the entire Gemfile? Just making sure before I do

@timoschilling
timoschilling Feb 13, 2015 Member

I think across the entire Gemfile is a good idea

@kennethkalmer kennethkalmer fix: prevent Test::Unit's autorunner from executing
1874d75
@kennethkalmer
Owner

This is tripping me up a bit, it seems something is pulling in Test::Unit's AutoRunner the whole time. Even generating the rails application as part of rake setup has output from the autorunner.

I got this "fix" from rspec/rspec-rails#1171 but I'd be happier if we could not have this...

I wonder if @headius has seen a situation before where the autorunner kicks in on JRuby in this way...?

@kennethkalmer kennethkalmer style: align all the comment blocks in the Gemfile
c2d172d
@brennovich
Contributor

I'll try to help with this issue :)

Although I have a concern: will Rails 3.2.X be supported? If so, I don't think we'll be able to accomplish that.

Besides that I'll start with Rails 4.2.0.

@brennovich
Contributor

Well, well all unit specs seems to be passing, I needed to increase heap size though

screenshot 2015-02-15 19 47 44

@kennethkalmer
Contributor

@brennovich thanks! I bumped the heap to 1024 and it all passed, but on Travis it timed out after 50 mins :(

I guess we need to find the source of Test::Unit's AutoRunner kicking in next.

There are also some specs using ObjectSpace which I expected to fail off the bat, but either they work or they simply haven't run yet.

@timoschilling
Member

can you please move jruby from the allow_failures list to the normal list. So that this PR is listet as failing in GH until you are done.

@kennethkalmer
Contributor

@timoschilling not yet, I've been soliciting feedback to help see this through. That said, let me put in some time today to merge in the mainline branches and run tests again. Thanks for the push to get his merged!

@kennethkalmer kennethkalmer Merge branch 'master' into jruby-compat
b21a1bc
@timoschilling
Member

It's ok that you still need time for this PR. I only want to see the true CI status in the PR List like it is on #3742
pull_requests_ _activeadmin_activeadmin

kennethkalmer and others added some commits Mar 13, 2015
@kennethkalmer kennethkalmer chore: remove jruby-head from allowed_failures on travis to signal st…
…atus of work
af5dde4
@brennovich brennovich Enable ObjectSpace emulation on jRuby 8c4ed62
@kennethkalmer kennethkalmer Merge pull request #1 from brennovich/jruby-compat
Enable ObjectSpace emulation on travis for jRuby
e9fa4b9
@houndci-bot houndci-bot commented on the diff Mar 22, 2015
spec/rails_helper.rb
@@ -107,6 +107,9 @@ def with_translation(translation)
require 'rspec/rails'
+# prevent Test::Unit's AutoRunner from executing during RSpec's rake task on JRuby
@houndci-bot
houndci-bot Mar 22, 2015

Line is too long. [82/80]

@deivid-rodriguez
Contributor

I tried activeadmin with JRuby today. It's working.

I rebased this PR and got only a couple of test failures:

Failing Scenarios:
cucumber features/index/batch_actions.feature:3 # Scenario: Use default (destroy) batch action
cucumber features/index/batch_actions.feature:40 # Scenario: Use default (destroy) batch action on a nested resource

The functionality they test actually works, so it seems like a bug / misuse of capybara / poltergeist.

@deivid-rodriguez
Contributor

If I add the @javascript tag on top of those scenarios, those assertions pass, but I get other failures because the assertions are not supported by the poltergeist driver.

@timoschilling
Member

@deivid-rodriguez 👍 can you continue the work on that?

@deivid-rodriguez
Contributor

I'm on it, I'll open a PR superseding this one. Is that ok?

@brennovich
Contributor

@deivid-rodriguez even the memory leak specs are passing?

Can you keep with this PR? I think the history here may be important in the future ;)

@deivid-rodriguez
Contributor

Everything is passing. But I haven't tried jruby-head, only jruby.9.0.0.0.rc2. I'll let travis do that.

You mean opening a PR at kennethkalmer/activeadmin?

@deivid-rodriguez
Contributor

@brennovich Note that I am keeping history, I'm just doing it in a new branch in my own fork.

@brennovich
Contributor

Awesome!

Humm not sure, I think you're right, is better to open up a new one, just make sure to comment the new PR number here in the comments :)

Thanks o/

@deivid-rodriguez
Contributor

Opening a sub-PR is good because commit authors are kept, but just rebasing my work on top of a copy of @kennethkalmer's branch seems easier (and already done).

@brennovich
Contributor

👍

@deivid-rodriguez deivid-rodriguez referenced this pull request Jul 17, 2015
Merged

Jruby compat #4032

@deivid-rodriguez
Contributor

Done! And the commit authors are preserved... I love git. 😄

Let's see how the build goes.

@timoschilling
Member

closed #4032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment