Balasankar C

Balasankar C

Geek. Freedom. Privacy.

Home | Blog | Talks | Setup | Feed

Debian GitLab Packaging Diaries #2 - Ruby 2.2 transition and mono-logger FTBFS

Heyo folks,
I had packaged the gem mono-logger as part of GitLab packaging. It was a dependency of resque, which in turn was a dependency of devise_async. At that time, Ruby 2.1 was the official version of Debian and packages were build based on that. However, recently, Antonio had updated ruby-defaults adding Ruby 2.2 to the list of supported interpreters. Along with that, Cédric had uploaded RSpec 3.0 to unstable from experimental. And, some of the packages that I co-maintain began to break. The main issues were

  1. ruby-sqlite had to be rebuilt against Ruby 2.2
  2. Ruby 2.2 didn't ship test-unit against it. So, now have to include ruby-test-unit to the build dependencies
  3. Many gems still used RSpec 2 and tests gave errors and deprecation warnings

So, in mono-logger, I faced two issues

  1. There were skipped tests, which used the keyword 'skip'. This was supported in Ruby 2.2, in which test-unit was a mere wrapper of Minitest. However, in Ruby 2.2, test-unit was an entirely distinct gem and it used 'omit' instead of 'skip'. But, I couldn't simply change to omit as it was not in Ruby 2.1. Another solution was to use minitest instead of test-unit and retain skip. But, the test involved some stuff which used the assertion assert_nothing_raised from test-unit, which surprisingly, wasn't present in Minitest. So, as a solution, I just commented out the skipped tests. :D

  2. The logger gem, which is the base of mono_logger, in Ruby 2.2 didn't ship Logger::Application any more. This was now another gem (seriously Ruby devs, what the fuck? Do you get some sort of wild happiness when releasing a gem for every small piece of code?). So, now I had one more gem in the long-enough-now-itself dependency chain - logger-application. When I tried to package that, it brought another dependency - mspec. And guess what just gatecrashed the party? mspec used Rspec ~2. Seriously, I am tired. :(


Thinking to disable tests for now.