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

Test on TruffleRuby #419

Closed
mostlyobvious opened this issue Aug 7, 2018 · 17 comments
Closed

Test on TruffleRuby #419

mostlyobvious opened this issue Aug 7, 2018 · 17 comments

Comments

@mostlyobvious
Copy link
Member

Add TruffleRuby into .travis.yml matrix.

See:

@swistak35
Copy link
Contributor

For now it's probably not yet possible to successfully run it, because of oracle/truffleruby#1400 . But someone can try :)

@mostlyobvious
Copy link
Member Author

mostlyobvious commented Aug 7, 2018

I believe you can set expected fail on Travis in regard to some matrix configurations or don't test c-ext matrix branches at all.

@mostlyobvious
Copy link
Member Author

@mostlyobvious
Copy link
Member Author

oracle/truffleruby#62

@mostlyobvious
Copy link
Member Author

Let's wait till it's travis-rim-supported out of the box.

@mostlyobvious
Copy link
Member Author

@mostlyobvious
Copy link
Member Author

Current PR:
#505

@mostlyobvious
Copy link
Member Author

Aside to running tests on CI, I've scoped down the test run to ruby_event_store and it fails on:

rspec ./spec/batch_enumerator_spec.rb:22 # RubyEventStore::BatchEnumerator
rspec ./spec/batch_enumerator_spec.rb:50 # RubyEventStore::BatchEnumerator should receive call(kind of Integer, kind of Integer) 1 time
rspec ./spec/batch_enumerator_spec.rb:30 # RubyEventStore::BatchEnumerator should yield successive args([1, 2, 3, 4, 5, 6, 7, 8,

where the code involved is:

     Failure/Error: (0...total_limit).step(batch_size) do |batch_offset|

     ArgumentError:
       Infinite or NaN

@mostlyobvious
Copy link
Member Author

irb(main):003:0> (0...Float::INFINITY).step(1).next
ArgumentError: Infinite or NaN

@mostlyobvious
Copy link
Member Author

To be revisited after oracle/truffleruby#1503 and
#422 (comment) are solved.

@mostlyobvious
Copy link
Member Author

Let's check this in what's left from 2020

@LifeIsStrange
Copy link

@pawelpacana any update? :)

@mostlyobvious
Copy link
Member Author

@LifeIsStrange one minor issue in ruby_event_store gem (in test code) that would require reporting in TruffleRuby tracker: an instance of what is Integer on MRI is a Float under Truffleruby.


Failures:

  1) RubyEventStore::BatchEnumerator is expected to receive call(kind of Integer, kind of Integer) 1 time
     Failure/Error: result      = reader.call(batch_offset, batch_limit)
     
       #<Double :reader> received :call with unexpected arguments
         expected: (kind of Integer, kind of Integer)
              got: (0.0, 100)
     # ./lib/ruby_event_store/batch_enumerator.rb:16:in `block in each'
     # <internal:core> core/numeric.rb:131:in `step'
     # ./lib/ruby_event_store/batch_enumerator.rb:14:in `each'
     # <internal:core> core/enumerator.rb:103:in `each_with_block'
     # <internal:core> core/enumerator.rb:94:in `each'
     # <internal:core> core/enumerable.rb:287:in `to_a'
     # ./lib/ruby_event_store/batch_enumerator.rb:28:in `to_a'
     # ./spec/batch_enumerator_spec.rb:52:in `block (2 levels) in <module:RubyEventStore>'
     # <internal:core> core/kernel.rb:400:in `load'
     # <internal:core> core/kernel.rb:400:in `load'
     # <internal:core> core/kernel.rb:400:in `load'
     # <internal:core> core/kernel.rb:400:in `load'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/cli/exec.rb:63:in `kernel_load'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/cli/exec.rb:28:in `run'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/cli.rb:476:in `exec'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/cli.rb:30:in `dispatch'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/cli.rb:24:in `start'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/gems/gems/bundler-2.1.4/libexec/bundle:46:in `block in <top (required)>'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/mri/bundler/friendly_errors.rb:123:in `with_friendly_errors'
     # /Users/pawelpacana/.rubies/truffleruby-21.0.0/lib/gems/gems/bundler-2.1.4/libexec/bundle:34:in `<top (required)>'
     # <internal:core> core/kernel.rb:400:in `load'
     # <internal:core> core/kernel.rb:400:in `load'

Finished in 19.62 seconds (files took 2.45 seconds to load)
713 examples, 1 failure, 7 pending

Failed examples:

rspec ./spec/batch_enumerator_spec.rb:50 # RubyEventStore::BatchEnumerator is expected to receive call(kind of Integer, kind of Integer) 1 time

Do you think it is something you could help us with? The way I see it is:

  1. reducing the code to minial amount showing the disparity of Truffleruby with MRI
  2. reporting this similarly to ArgumentError on range iteration oracle/truffleruby#1503

@LifeIsStrange
Copy link

@pawelpacana hi, thanks for the update!
Sorry I can't help with this task, I'm just a nerd interested in Truffleruby support for Rails and how it would affect performance, I don't even know the Ruby language yet ^^

@eregon
Copy link

eregon commented Feb 16, 2021

Just seeing this, I think it would be fine to basically file #419 (comment) as a TruffleRuby issue, as long as it's relatively easy to reproduce. We don't necessarily need a minimal reproduction, although of course it's always helpful.

@mostlyobvious
Copy link
Member Author

Already testing.

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

No branches or pull requests

5 participants