avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1785) Ruby: schema_normalization.rb is incompatible with Ruby 1.8.7
Date Thu, 21 Jan 2016 15:32:40 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15110777#comment-15110777
] 

Sean Busbey commented on AVRO-1785:
-----------------------------------

AVRO-1783 now also makes use of a Ruby 1.9+ method.

> Ruby: schema_normalization.rb is incompatible with Ruby 1.8.7
> -------------------------------------------------------------
>
>                 Key: AVRO-1785
>                 URL: https://issues.apache.org/jira/browse/AVRO-1785
>             Project: Avro
>          Issue Type: Bug
>          Components: ruby
>    Affects Versions: 1.8.0
>            Reporter: Ryan Blue
>
> I was just checking AVRO-1775 in 1.8.7 and ran into compile errors. The schema_normalization.rb
code that was introduced by AVRO-1694 is not compatible with Ruby 1.8.7 because it uses the
"new" hash syntax in method definitions.
> {code}
> blue@work:~/workspace/avro/lang/ruby$ bundle exec rake test
> /home/blue/workspace/avro/lang/ruby/Rakefile:19: warning: already initialized constant
VERSION
> /home/blue/.rvm/rubies/ruby-1.8.7-p374/bin/ruby -I"lib:ext:bin:test" -I"/home/blue/.rvm/gems/ruby-1.8.7-p374/gems/rake-10.4.2/lib"
"/home/blue/.rvm/gems/ruby-1.8.7-p374/gems/rake-10.4.2/lib/rake/rake_test_loader.rb" "test/test_help.rb"
"test/test_socket_transport.rb" "test/test_fingerprints.rb" "test/test_schema_normalization.rb"
"test/test_schema.rb" "test/test_datafile.rb" "test/test_io.rb" "test/test_protocol.rb" 
> ./lib/avro/schema_normalization.rb:67: warning: else without rescue is useless
> ./lib/avro.rb:42:in `require': ./lib/avro/schema_normalization.rb:50: syntax error, unexpected
':', expecting ')' (SyntaxError)
>         normalize_named_type(schema, fields: fields)
>                                             ^
> ./lib/avro/schema_normalization.rb:52: syntax error, unexpected ':', expecting ')'
>         normalize_named_type(schema, symbols: schema.symbols)
>                                              ^
> ./lib/avro/schema_normalization.rb:52: syntax error, unexpected ')', expecting kEND
> ./lib/avro/schema_normalization.rb:54: syntax error, unexpected ':', expecting ')'
>         normalize_named_type(schema, size: schema.size)
>                                           ^
> ./lib/avro/schema_normalization.rb:54: syntax error, unexpected ')', expecting kEND
> ./lib/avro/schema_normalization.rb:56: odd number list for Hash
>         { type: type, items: normalize_schema(schema.items) }
>                ^
> ./lib/avro/schema_normalization.rb:56: syntax error, unexpected ':', expecting '}'
>         { type: type, items: normalize_schema(schema.items) }
>                ^
> ./lib/avro/schema_normalization.rb:56: syntax error, unexpected ':', expecting '='
>         { type: type, items: normalize_schema(schema.items) }
>                             ^
> ./lib/avro/schema_normalization.rb:56: syntax error, unexpected '}', expecting kEND
> ./lib/avro/schema_normalization.rb:58: odd number list for Hash
>         { type: type, values: normalize_schema(schema.values) }
>                ^
> ./lib/avro/schema_normalization.rb:58: syntax error, unexpected ':', expecting '}'
>         { type: type, values: normalize_schema(schema.values) }
>                ^
> ./lib/avro/schema_normalization.rb:58: syntax error, unexpected ':', expecting '='
>         { type: type, values: normalize_schema(schema.values) }
>                              ^
> ./lib/avro/schema_normalization.rb:58: syntax error, unexpected '}', expecting kEND
> ./lib/avro/schema_normalization.rb:72: odd number list for Hash
>         name: field.name,
>              ^
> ./lib/avro/schema_normalization.rb:72: syntax error, unexpected ':', expecting '}'
>         name: field.name,
>              ^
> ./lib/avro/schema_normalization.rb:73: syntax error, unexpected ':', expecting '='
>         type: normalize_schema(field.type)
>              ^
> ./lib/avro/schema_normalization.rb:74: syntax error, unexpected '}', expecting kEND
> ./lib/avro/schema_normalization.rb:80: odd number list for Hash
>       { name: name, type: schema.type_sym.to_s }.merge(attributes)
>              ^
> ./lib/avro/schema_normalization.rb:80: syntax error, unexpected ':', expecting '}'
>       { name: name, type: schema.type_sym.to_s }.merge(attributes)
>              ^
> ./lib/avro/schema_normalization.rb:80: syntax error, unexpected ':', expecting '='
>       { name: name, type: schema.type_sym.to_s }.merge(attributes)
>                          ^
> ./lib/avro/schema_normalization.rb:80: syntax error, unexpected '}', expecting kEND
>       { name: name, type: schema.type_sym.to_s }.merge(attributes)
>                                                 ^
>         from ./lib/avro.rb:42
>         from /home/blue/workspace/avro/lang/ruby/test/test_help.rb:22:in `require'
>         from /home/blue/workspace/avro/lang/ruby/test/test_help.rb:22
>         from /home/blue/.rvm/gems/ruby-1.8.7-p374/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:15:in
`require'
>         from /home/blue/.rvm/gems/ruby-1.8.7-p374/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:15
>         from /home/blue/.rvm/gems/ruby-1.8.7-p374/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:4:in
`select'
>         from /home/blue/.rvm/gems/ruby-1.8.7-p374/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:4
> rake aborted!
> Command failed with status (1): [ruby -I"lib:ext:bin:test" -I"/home/blue/.rvm/gems/ruby-1.8.7-p374/gems/rake-10.4.2/lib"
"/home/blue/.rvm/gems/ruby-1.8.7-p374/gems/rake-10.4.2/lib/rake/rake_test_loader.rb" "test/test_help.rb"
"test/test_socket_transport.rb" "test/test_fingerprints.rb" "test/test_schema_normalization.rb"
"test/test_schema.rb" "test/test_datafile.rb" "test/test_io.rb" "test/test_protocol.rb" ]
> /home/blue/.rvm/gems/ruby-1.8.7-p374/gems/echoe-4.6.6/lib/echoe.rb:749:in `define_tasks'
> /home/blue/.rvm/gems/ruby-1.8.7-p374/bin/ruby_executable_hooks:15
> Tasks: TOP => test_inner
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message