rom-rb / rom

Data mapping and persistence toolkit for Ruby
https://rom-rb.org
MIT License
2.08k stars 161 forks source link

Running specs under TruffleRuby on Travis CI #506

Closed deepj closed 5 years ago

deepj commented 5 years ago

I know, running specs under TruffleRuby takes a large amount of time currently and many specs fail.

The first issue is with Bundler https://github.com/oracle/truffleruby/issues/1398. And some failed specs are fixed in the next RC10 release.

Anyway, running specs under TruffleRuby even they currently fail. It helps its developers and other developer wishing to use rom under TruffleRuby.

But it's good to consider if it's worth to accept this PR recently when running specs takes almost 27 minutes (under MRI ~2 minutes).

solnic commented 5 years ago

I’m ok with a separate branch where this is configured, otherwise we will be waiting more time for CI to finish. I can give you access to the repo so that you could maintain this branch as long as it’s experimental. Makes sense?

deepj commented 5 years ago

@solnic yes, it does make sense. In fact, I would like to see dry-rb/rom to be supported by TruffleRuby very soon. There are many interesting things in this area. Unfortunately, there are some issues with current TruffleRuby and dry-rb stuff (https://github.com/oracle/truffleruby/issues/1462 or https://github.com/oracle/truffleruby/issues/1469)

If I can help, I'm glad to do it.

solnic commented 5 years ago

@deepj great, I just invited you to rom-rb/rom, so feel free to create a truffle branch and continue working there. I'll try to help whenever/however I can.

deepj commented 5 years ago

Thx, I'll make it tonight.

deepj commented 5 years ago

@solnic Hm, there is one thing if you would interest in to help. It's also one of dependencies of ROM. dry-initializer causes problems such as

Failure/Error: option :bar, proc(&:to_s),    optional: true

ArgumentError:
  wrong number of arguments (given 1, expected 0)
# ./spec/several_assignments_spec.rb:6:in `to_s'
# ./spec/several_assignments_spec.rb:6:in `to_s'
# (eval):6:in `call'
# (eval):6:in `__dry_initializer_initialize__'
# ./lib/dry/initializer/mixin/root.rb:7:in `initialize'
# ./spec/several_assignments_spec.rb:22:in `new'
# ./spec/several_assignments_spec.rb:22:in `subject'
# ./spec/several_assignments_spec.rb:25:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:16:in `block (2 levels) in <top (required)>'

The problem lies in Dry::Initializer::Mixin. Unfortunately, I don't fully understand the construct and a purpose behind of it. If there was a change to isolate a root problem, it could help to TruffleRuby's developer to fix it quickly.

See https://github.com/oracle/truffleruby/issues/1462

solnic commented 5 years ago

@deepj you want to ask @nepalez about that