From Fedora Project Wiki
 
(24 intermediate revisions by 3 users not shown)
Line 2: Line 2:


== Summary ==
== Summary ==
Ruby 2.0.0 is the latest stable version of Ruby, with major increases in speed and reliability. With this major update from Ruby 1.9.3 in Fedora 18 to Ruby 2.0. in Fedora 19, alongside JRuby, Fedora becomes the superior Ruby development platform.  
Ruby 2.0.0 is the latest stable version of Ruby, with major increases in speed and reliability. With this major update from Ruby 1.9.3 in Fedora 18 to Ruby 2.0 in Fedora 19, alongside JRuby, Fedora becomes the superior Ruby development platform.


== Owner ==
== Owner ==
Line 12: Line 12:
* Targeted release: [[Releases/19 | Fedora 19 ]]  
* Targeted release: [[Releases/19 | Fedora 19 ]]  
* Last updated: {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}
* Last updated: {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}
* Percentage of completion: 10%
* Percentage of completion: 100%


<!-- CHANGE THE "FedoraVersion" TEMPLATES ABOVE TO PLAIN NUMBERS WHEN YOU COMPLETE YOUR PAGE. -->
<!-- CHANGE THE "FedoraVersion" TEMPLATES ABOVE TO PLAIN NUMBERS WHEN YOU COMPLETE YOUR PAGE. -->


== Detailed Description ==
== Detailed Description ==
Ruby 2.0.0 is upstream's new major release of Ruby. It caries new features such as:
Ruby 2.0.0 is upstream's new major release of Ruby. It carries new features such as:
* Refinements
* Refinements
* Keyword arguments
* Keyword arguments
Line 25: Line 25:
* %i: a literal for symbol array
* %i: a literal for symbol array
* regexp engine was changed to Onigmo
* regexp engine was changed to Onigmo
* DTrace support
* DTrace (SystemTap) support
* TracePoint
* TracePoint
Yet, it is source level backward compatible with Ruby 1.9.3, so you will continue to work.
Yet, it is source level backward compatible with Ruby 1.9.3, so your software will continue to work.


The updated Ruby also provides better integration with Fedora, especially JRuby. But not only JRuyb, it is also one step closer to be prepared for other interpreters, such as Rubinius. Providing of custom Ruby loader with working name "multiruby" [1] will allow to easily switch interpreters executing your script, provides fallback to whatever Ruby interpreter is available on you system, yet still keeps backward compatibility with all your Ruby scripts.
The updated Ruby also provides better integration with Fedora, especially JRuby. But not only JRuby, it is also one step closer to be prepared for other interpreters, such as Rubinius. Provided custom Ruby loader with working name "rubypick" [1] will allow to easily switch interpreters executing your script, provides fallback to whatever Ruby interpreter is available on you system, yet still keeps backward compatibility with all your Ruby scripts.


[1] https://github.com/bkabrda/multiruby
[1] https://github.com/bkabrda/rubypick


== Benefit to Fedora ==
== Benefit to Fedora ==
Line 45: Line 45:
* Rebuilding of all Ruby packages, and all packages depending on Ruby
* Rebuilding of all Ruby packages, and all packages depending on Ruby
* Changes to the search path to comply with the multi-versioning
* Changes to the search path to comply with the multi-versioning
=== New Packaging Guidelines ===
Drafts of new packaging guidelines was proposed to FPC [1]. You can see the [[PackagingDrafts/Ruby|current draft]].
[1] https://fedorahosted.org/fpc/ticket/242
=== Packages that require "*ruby*" ===
Requires rebuilding numerous packages that depend on ruby. All these packages have to be updated to support new virtual provides.
* 452 in total (211 matches from previous query, of course)
repoquery --repoid=rawhide-source --arch=src --whatrequires '*ruby*' | sort | uniq


== How To Test ==
== How To Test ==
Line 61: Line 75:
-->
-->


=== New Packaging Guidelines ===
* No special hardware is needed.
 
* To test, install Ruby 2.0.0 from the testing repository http://vondruch.fedorapeople.org/ruby_2.0.0.repo. Or better, ẗhere will soon available dedicated tag in Koji.
Drafts of new packaging guidelines will have to be proposed to FPC. You can see the [[PackagingDrafts/Ruby|current draft]].
* Try to locally rebuild your packages using Ruby 2.0.0.
 
* Use the packages with your applications previously written in Ruby (be sure to upgrade your applications to Ruby 2.0.0 first).
=== Packages that require "ruby(abi) = 1.9.1" ===
* If something doesn't work as it should, let us know (specifically, concentrate on correct load paths, encodings, changes in binary extensions and also other new features added between 1.9.3 and 2.0.0).
 
Requires rebuilding numerous packages that depend on ruby(abi) = 1.9.1, or have Requires or BuildRequires for package dependent on ruby(abi) = 1.9.1. All these packages have to be updated to support new virtual provides.
 
* 211 in total
 
repoquery --repoid=rawhide-source --arch=src --whatrequires 'ruby(abi) = 1.9.1' | sort | uniq
 
=== Packages that require "*ruby*" ===
 
* 452 in total (211 matches from previous query, of course)
 
repoquery --repoid=rawhide-source --arch=src --whatrequires '*ruby*' | sort | uniq


== User Experience ==
== User Experience ==
<!-- If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
<!-- If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
The Ruby programmes/scripts should behave as they were used to. However, you might notice faster startup due to improvements of require performance and in some use-cases lower memory footprint, since Ruby's garbage collector is now COW friendly.


== Dependencies ==
== Dependencies ==
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this feature depends?  In other words, completion of another feature owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel feature)? -->
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this feature depends?  In other words, completion of another feature owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel feature)? -->
Ruby has more than 450 dependencies in Fedora, most of them are Rubygems. All of these 450 will have to be rebuilt and tested.


== Contingency Plan ==
== Contingency Plan ==
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "None necessary, revert to previous release behaviour."  Or it might not.  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "None necessary, revert to previous release behaviour."  Or it might not.  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
We would like to get a special buildroot tag to be able to rebuild all the packages with Ruby 2.0.0. If anything goes wrong, the tag could be easily dropped and previous version of Ruby 1.9.3 and its dependencies stays intact. The tag would be merged into F19 right before branching.


== Documentation ==
== Documentation ==
<!-- Is there upstream documentation on this feature, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
<!-- Is there upstream documentation on this feature, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
*
 
http://www.ruby-doc.org/


== Release Notes ==
== Release Notes ==
Line 99: Line 108:
* RubyGems with binary extensions now use different directory structure, to provide better compatibility with JRuby and other interpreters. All libraries need to be adjusted to this change. This change is reflected in new [[User:Bkabrda/Packaging_Ruby_JRuby| packaging guidelines draft]].
* RubyGems with binary extensions now use different directory structure, to provide better compatibility with JRuby and other interpreters. All libraries need to be adjusted to this change. This change is reflected in new [[User:Bkabrda/Packaging_Ruby_JRuby| packaging guidelines draft]].


* http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_371/NEWS
* http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_374/NEWS
* http://svn.ruby-lang.org/repos/ruby/tags/v1_9_1_431/NEWS
* http://svn.ruby-lang.org/repos/ruby/tags/v1_9_1_431/NEWS
* http://svn.ruby-lang.org/repos/ruby/tags/v1_9_2_320/NEWS
* http://svn.ruby-lang.org/repos/ruby/tags/v1_9_2_320/NEWS
* http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_327/NEWS
* http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_448/NEWS
* http://svn.ruby-lang.org/repos/ruby/tags/v2_0_0_preview2/NEWS
* http://svn.ruby-lang.org/repos/ruby/tags/v2_0_0_247/NEWS


== Comments and Discussion ==
== Comments and Discussion ==
* See [[Talk:Features/Ruby 2.0.0]] or Ruby-SIG mailing list.
* See [[Talk:Features/Ruby 2.0.0]] or Ruby-SIG mailing list.


[[Category:FeaturePageIncomplete]]
[[Category:FeatureAcceptedF19]]
<!-- When your feature page is completed and ready for review -->
<!-- When your feature page is completed and ready for review -->
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->

Latest revision as of 04:09, 9 November 2013

Ruby 2.0.0

Summary

Ruby 2.0.0 is the latest stable version of Ruby, with major increases in speed and reliability. With this major update from Ruby 1.9.3 in Fedora 18 to Ruby 2.0 in Fedora 19, alongside JRuby, Fedora becomes the superior Ruby development platform.

Owner

  • Email: vondruch@redhat.com

Current status

  • Targeted release: Fedora 19
  • Last updated: 2013-11-09
  • Percentage of completion: 100%


Detailed Description

Ruby 2.0.0 is upstream's new major release of Ruby. It carries new features such as:

  • Refinements
  • Keyword arguments
  • Enumerable#lazy
  • Module#prepend
  • #to_h: Convention for conversion to Hash
  • %i: a literal for symbol array
  • regexp engine was changed to Onigmo
  • DTrace (SystemTap) support
  • TracePoint

Yet, it is source level backward compatible with Ruby 1.9.3, so your software will continue to work.

The updated Ruby also provides better integration with Fedora, especially JRuby. But not only JRuby, it is also one step closer to be prepared for other interpreters, such as Rubinius. Provided custom Ruby loader with working name "rubypick" [1] will allow to easily switch interpreters executing your script, provides fallback to whatever Ruby interpreter is available on you system, yet still keeps backward compatibility with all your Ruby scripts.

[1] https://github.com/bkabrda/rubypick

Benefit to Fedora

Supporting the growth of a Ruby language with a latest release supporting the newest language features, which enables even faster and easier development of Ruby applications. Add to that the multiplatform targetted development we enable downstream parties to do using our distribution.

Scope

The following list includes a summary of changes included in this feature:

  • New Packaging Guidelines for Ruby packages (different virtual provide semantics, native extensions moved into different directory). This has to be done in sync with JRuby related changes to packaging guidelines.
  • Rebuilding of all Ruby packages, and all packages depending on Ruby
  • Changes to the search path to comply with the multi-versioning

New Packaging Guidelines

Drafts of new packaging guidelines was proposed to FPC [1]. You can see the current draft.

[1] https://fedorahosted.org/fpc/ticket/242

Packages that require "*ruby*"

Requires rebuilding numerous packages that depend on ruby. All these packages have to be updated to support new virtual provides.

  • 452 in total (211 matches from previous query, of course)
repoquery --repoid=rawhide-source --arch=src --whatrequires '*ruby*' | sort | uniq

How To Test

  • No special hardware is needed.
  • To test, install Ruby 2.0.0 from the testing repository http://vondruch.fedorapeople.org/ruby_2.0.0.repo. Or better, ẗhere will soon available dedicated tag in Koji.
  • Try to locally rebuild your packages using Ruby 2.0.0.
  • Use the packages with your applications previously written in Ruby (be sure to upgrade your applications to Ruby 2.0.0 first).
  • If something doesn't work as it should, let us know (specifically, concentrate on correct load paths, encodings, changes in binary extensions and also other new features added between 1.9.3 and 2.0.0).

User Experience

The Ruby programmes/scripts should behave as they were used to. However, you might notice faster startup due to improvements of require performance and in some use-cases lower memory footprint, since Ruby's garbage collector is now COW friendly.

Dependencies

Ruby has more than 450 dependencies in Fedora, most of them are Rubygems. All of these 450 will have to be rebuilt and tested.

Contingency Plan

We would like to get a special buildroot tag to be able to rebuild all the packages with Ruby 2.0.0. If anything goes wrong, the tag could be easily dropped and previous version of Ruby 1.9.3 and its dependencies stays intact. The tag would be merged into F19 right before branching.

Documentation

http://www.ruby-doc.org/

Release Notes

  • The Ruby 2.0.0 breaks ABI compatibility with previous version of Ruby, therefore soname was bumped. All RubyGems which use binary extensions should be rebuilt. All applications which use Ruby binding should be rebuilt. Nevertheless, since upstream payed great attention to source compatibility, no changes to your code are needed.
  • RubyGems with binary extensions now use different directory structure, to provide better compatibility with JRuby and other interpreters. All libraries need to be adjusted to this change. This change is reflected in new packaging guidelines draft.

Comments and Discussion