[ https://issues.apache.org/jira/browse/AVRO-3203?focusedWorklogId=649656&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-649656 ]
ASF GitHub Bot logged work on AVRO-3203: ---------------------------------------- Author: ASF GitHub Bot Created on: 12/Sep/21 04:23 Start Date: 12/Sep/21 04:23 Worklog Time Spent: 10m Work Description: sekikn opened a new pull request #1330: URL: https://github.com/apache/avro/pull/1330 Make sure you have checked _all_ steps below. ### Jira - [x] My PR addresses the following [Avro Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them in the PR title. For example, "AVRO-1234: My Avro PR" - https://issues.apache.org/jira/browse/AVRO-3203 - In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). ### Tests - [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason: I didn't add a unit test since it's a fix for the build process. Instead, I confirmed the build succeeded, ``` $ ./build.sh docker sekikn@420693eeb575:~/avro$ cd lang/ruby sekikn@420693eeb575:~/avro/lang/ruby$ ./build.sh clean dist ... Successfully built RubyGem Name: avro Version: 1.11.0.pre1 File: avro-1.11.0.pre1.gem ``` ... and the basic read/write functionality worked. ``` sekikn@420693eeb575:~/avro/lang/ruby$ cd sekikn@420693eeb575:~$ export GEM_HOME=/tmp/gem sekikn@420693eeb575:~$ gem install multi_json avro/dist/ruby/avro-1.11.0.pre1.gem Fetching multi_json-1.15.0.gem Successfully installed multi_json-1.15.0 Parsing documentation for multi_json-1.15.0 Installing ri documentation for multi_json-1.15.0 Done installing documentation for multi_json after 0 seconds Successfully installed avro-1.11.0.pre1 Parsing documentation for avro-1.11.0.pre1 Installing ri documentation for avro-1.11.0.pre1 Done installing documentation for avro after 0 seconds 2 gems installed sekikn@420693eeb575:~$ irb --noecho irb(main):001:0> require 'avro' irb(main):002:0> avro_file = '/tmp/user.avro' irb(main):003:0> schema = File.read('/home/sekikn/avro/doc/examples/user.avsc') irb(main):004:0> data = [{ "name" => "Alyssa", "favorite_number" => 256 }, { "name" => "Ben", "favorite_number" => 7, "favorite_color" => "red" }] irb(main):005:1* Avro::DataFile.open(avro_file, 'w', schema) do |dw| irb(main):006:1* data.each { |d| dw << d } irb(main):007:0> end irb(main):008:1* Avro::DataFile.open(avro_file, 'r') do |dr| irb(main):009:1* dr.each { |d| puts d } irb(main):010:0> end {"name"=>"Alyssa", "favorite_number"=>256, "favorite_color"=>nil} {"name"=>"Ben", "favorite_number"=>7, "favorite_color"=>"red"} ``` ### Commits - [x] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](https://chris.beams.io/posts/git-commit/)": 1. Subject is separated from body by a blank line 1. Subject is limited to 50 characters (not including Jira issue reference) 1. Subject does not end with a period 1. Subject uses the imperative mood ("add", not "adding") 1. Body wraps at 72 characters 1. Body explains "what" and "why", not "how" ### Documentation - [x] In case of new functionality, my PR adds documentation that describes how to use it. - All the public functions and the classes in the PR contain Javadoc that explain what it does -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 649656) Remaining Estimate: 0h Time Spent: 10m > Fix the Ruby distribution build to work > --------------------------------------- > > Key: AVRO-3203 > URL: https://issues.apache.org/jira/browse/AVRO-3203 > Project: Apache Avro > Issue Type: Bug > Components: build, ruby > Reporter: Kengo Seki > Assignee: Kengo Seki > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > Currently, building the Ruby distribution in the Docker container fails as > follows. > {code:java} > $ ./build.sh docker > $ cd lang/ruby > $ ./build.sh clean dist > ... > rake aborted! > ArgumentError: wrong number of arguments (given 2, expected 0) > /home/sekikn/avro/lang/ruby/.gem/gems/echoe-4.6.6/lib/echoe/rubygems.rb:10:in > `validate' > /home/sekikn/avro/lang/ruby/.gem/gems/rake-13.0.6/exe/rake:27:in `<top > (required)>' > Tasks: TOP => dist => gem => pkg/avro-1.11.0.pre1.gem > (See full trace by running task with --trace) > {code} > This is because Ruby 2.7 is used in the Docker container and its rubygems > library version is 3.1.2. > [rubygems have changed the semantics of its validate function from > v3.x|https://github.com/rubygems/rubygems/commit/3966078e62c6b048cd8d2435b9399a9688c6f8f1#diff-8f51ef27aa7c1bf289ef010df42fb4a5f0635d0149776e57bc86985c98bc6480L262-R264], > and echoe doesn't seem to be compatible with that change. > We should replace echoe with something simliar since it has not been > maintained for several years, but it looks a bit tough to me, so I propose an > easy workaround that building gem with the {{gem build}} command directly > instead of via bundler, and using echoe only to generate avro.gemspec. -- This message was sent by Atlassian Jira (v8.3.4#803005)