-
-
Notifications
You must be signed in to change notification settings - Fork 88
Ruby 2.7 keyword arguments compatibility note
==============
The way keyword arguments are handled by Ruby is changing gradually (in Ruby 2.7+).
As a declarative DSL, Kiba ETL is often used in conjunction with keyword arguments, so this is an important change.
Please read https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ carefully.
Kiba v3.0.0 works fine with Ruby 2.7.0 (released on 2019-12-25), but in a number of situations (like with other apps), you will get warnings (not errors).
With Ruby 2.8.0 (currently being developed, which we'll refer to as 2.8.0-dev
), these warnings will generally result in errors instead.
Solutions for these situations are multiple (by order of preference):
- Try out Kiba's ruby-3-compat-keyword-arguments branch: this is the official testing room for a transparent Ruby 3 keyword arguments support in Kiba. If successful (and more field testing is required to confirm this), this will be integrated in Kiba v3.5. This is the preferred path because it means that your ETL components
initialize
methods should normally not need any tweaking (the work is done on our side). - Alternatively: use the
ruby2_keywords
argument on your existing ETL componentsinitialize
method (see Ruby 2.7 section). This will work with Kiba v3.0.0 directly. - Finally: disable the deprecation warning (a temporary situation only valid for Ruby 2.7.0) with
-W:no-deprecated
orWarning[:deprecated] = false
(see Will my code break on Ruby 2.7?) - this is only a quick fix and you will have to plan for a proper change.
- Kiba Common also provides a ruby-3-compat-keyword-arguments branch to remove warnings with Ruby 2.7.0 and errors with Ruby 2.8.0-dev.
- Kiba Pro 1.5.0 itself is compatible with Ruby 2.7.0+
Home | Core Concepts | Defining jobs | Running jobs | Writing sources | Writing transforms | Writing destinations | Implementation Guidelines | Kiba Pro
This wiki is tracked by git and publicly editable. You are welcome to fix errors and typos. Any defacing or vandalism of content will result in your changes being reverted and you being blocked.