thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King, III" <jk...@apache.org>
Subject Ruby 2.5 build issues
Date Sun, 10 Jun 2018 15:06:55 GMT
I am adding an Ubuntu Bionic dockerfile and this distribution includes Ruby
2.5.
Xenial has 2.3.1 and Artful has 2.3.3, and both are building successfully
in Travis CI.
Under 2.5 I get these unit test failures.  Was there some sort of change in
Ruby around numeric type handling (Fixnum vs Integer)?  It looks like we
have a problem.

Failures:

  1) Struct Thrift::Struct should support optional type-checking in
Thrift::Struct.new
     Failure/Error: expect { SpecNamespace::Hello.new(:greeting => 3) }.to
raise_error(Thrift::TypeError, "Expected Types::STRING, received Fixnum for
field greeting")

       expected Thrift::TypeError with "Expected Types::STRING, received
Fixnum for field greeting", got #<Thrift::TypeError: Expected
Types::STRING, received Integer for field greeting> with backtrace:
         # ./lib/thrift/types.rb:69:in `check_type'
         # ./lib/thrift/struct.rb:42:in `block in initialize'
         # ./lib/thrift/struct.rb:38:in `each'
         # ./lib/thrift/struct.rb:38:in `initialize'
         # ./spec/struct_spec.rb:230:in `new'
         # ./spec/struct_spec.rb:230:in `block (4 levels) in <top
(required)>'
         # ./spec/struct_spec.rb:230:in `block (3 levels) in <top
(required)>'
     # ./spec/struct_spec.rb:230:in `block (3 levels) in <top (required)>'

  2) Struct Thrift::Struct should support optional type-checking in field
accessors
     Failure/Error: expect { hello.greeting = 3 }.to
raise_error(Thrift::TypeError, "Expected Types::STRING, received Fixnum for
field greeting")

       expected Thrift::TypeError with "Expected Types::STRING, received
Fixnum for field greeting", got #<Thrift::TypeError: Expected
Types::STRING, received Integer for field greeting> with backtrace:
         # ./lib/thrift/types.rb:69:in `check_type'
         # ./lib/thrift/struct.rb:157:in `block in field_accessor'
         # ./spec/struct_spec.rb:241:in `block (4 levels) in <top
(required)>'
         # ./spec/struct_spec.rb:241:in `block (3 levels) in <top
(required)>'
     # ./spec/struct_spec.rb:241:in `block (3 levels) in <top (required)>'

  3) Thrift::Types type checking should give the Thrift::TypeError a
readable message
     Failure/Error: expect { Thrift.check_type(3, {:type =>
Thrift::Types::STRING}, :foo) }.to raise_error(Thrift::TypeError, msg)

       expected Thrift::TypeError with "Expected Types::STRING, received
Fixnum for field foo", got #<Thrift::TypeError: Expected Types::STRING,
received Integer for field foo> with backtrace:
         # ./lib/thrift/types.rb:69:in `check_type'
         # ./spec/types_spec.rb:104:in `block (4 levels) in <top
(required)>'
         # ./spec/types_spec.rb:104:in `block (3 levels) in <top
(required)>'
     # ./spec/types_spec.rb:104:in `block (3 levels) in <top (required)>'

Finished in 6.34 seconds (files took 0.542 seconds to load)
445 examples, 3 failures, 1 pending

Failed examples:

rspec ./spec/struct_spec.rb:227 # Struct Thrift::Struct should support
optional type-checking in Thrift::Struct.new
rspec ./spec/struct_spec.rb:237 # Struct Thrift::Struct should support
optional type-checking in field accessors
rspec ./spec/types_spec.rb:102 # Thrift::Types type checking should give
the Thrift::TypeError a readable message

/usr/bin/ruby2.5
-I/var/lib/gems/2.5.0/gems/rspec-core-3.7.1/lib:/var/lib/gems/2.5.0/gems/rspec-support-3.7.1/lib
/var/lib/gems/2.5.0/gems/rspec-core-3.7.1/exe/rspec --pattern
spec/\*\*\{,/\*/\*\*\}/\*_spec.rb --color --format d failed
Makefile:655: recipe for target 'check-local' failed
make[1]: *** [check-local] Error 1
make[1]: Leaving directory '/thrift/src/lib/rb'

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message