From Fedora Project Wiki
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 26: Line 26:


== Current status ==
== Current status ==
[[Category:ChangeReadyForWrangler]]
[[Category:ChangeAcceptedF34]]
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
Line 44: Line 44:
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
-->
-->
* FESCo issue: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/2518 #2518]
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1909786 #1909786]
* Release notes tracker: <will be assigned by the Wrangler>
* Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/620 #620]


== Detailed Description ==
== Detailed Description ==
Line 160: Line 160:
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* User specific Ruby binary extensions need to be rebuild.
* User specific Ruby binary extensions need to be rebuild.
* Ruby packages/application dependencies might need to be adjusted if net-telnet, xmlrpc, webrick gem are used.


== How To Test ==
== How To Test ==
Line 220: Line 221:
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* [http://www.ruby-doc.org/ Help and documentation for the Ruby programming language]
* [http://www.ruby-doc.org/ Help and documentation for the Ruby programming language]
* [https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md Ruby 3.0.0.preview1 NEWS]
* [https://github.com/ruby/ruby/blob/v3_0_0/NEWS.md Ruby 3.0.0 NEWS]
* [https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/ Ruby 3.0 release announcement]


== Release Notes ==
== Release Notes ==
Line 231: Line 233:
* The Ruby 3.0 bumps soname, therefore Ruby packages, which use binary extensions, should be rebuilt. Nevertheless, since upstream paid great attention to source compatibility, no changes to your code are needed.
* The Ruby 3.0 bumps soname, therefore Ruby packages, which use binary extensions, should be rebuilt. Nevertheless, since upstream paid great attention to source compatibility, no changes to your code are needed.


https://github.com/ruby/ruby/blob/master/NEWS
https://github.com/ruby/ruby/blob/v3_0_0/NEWS.md

Latest revision as of 10:59, 7 January 2021


Ruby 3.0

Summary

Ruby 3.0 is the latest stable version of Ruby. Many new features and improvements are included for the increasingly diverse and expanding demands for Ruby. With this major update from Ruby 2.7 in Fedora 33 to Ruby 3.0 in Fedora 34, Fedora becomes the superior Ruby development platform.

Owner

Current status

Detailed Description

Ruby 3.0 is upstream's new major release of Ruby. Many new features and improvements are included.

RBS

RBS is a language to describe the types of Ruby programs. Type checkers including type-profiler and other tools supporting RBS will understand Ruby programs much better with RBS definitions.

You can write down the definition of classes and modules: methods defined in the class, instance variables and their types, and inheritance/mix-in relations. The goal of RBS is to support commonly seen patterns in Ruby programs and it allows writing advanced types including union types, method overloading, and generics. It also supports duck typing with interface types.

Ruby 3.0 ships with rbs gem, which allows parsing and processing type definitions written in RBS.

Ractor (experimental)

Ractor is an Actor-model like concurrent abstraction designed to provide a parallel execution feature without thread-safety concerns.

You can make multiple ractors and you can run them in parallel. Ractor enables to make thread-safe parallel programs because ractors can not share normal objects. Communication between ractors are supported by message passing.

To limit sharing objects, Ractor introduces several restrictions to the Ruby’s syntax (without multiple Ractors, there is no changes).

The specification and implementation are not matured and changed in future, so this feature is marked as experimental and show the experimental feature warning if Ractor is created.

Scheduler (Experimental)

Thread#scheduler is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code.

CAUTION: This feature is strongly experimental. Both the name and feature will change in next preview release.

Other Notable New Features

  • Rightward assignment statement is added.
  • Endless method definition is added.
  • Find pattern is added.
  • Hash#except is now built-in.
  • Memory view is added as an experimental feature

Performance improvements

Many improvements were implemented in MJIT.

Other notable changes since 2.7

  • Keyword arguments are separated from other arguments.
  • The feature of $SAFE was completely removed; now it is a normal global variable.
  • The order of backtrace had been reversed at Ruby 2.5, but it was cancelled. Now it behaves like Ruby 2.4; an error message and the line number where the exception occurs are printed first, and its callers are printed later.
  • Some standard libraries are updated.

Feedback

Benefit to Fedora

With a latest release, Ruby language is supporting the newest language features, which enables even faster and easier development of Ruby applications.

Scope

  • Other developers: N/A (not a System Wide Change)
    • Rebuild of packages with binary extensions (i.e. packages which depends on libruby) will be handled automatically, but some packages might need fixes/updates to support Ruby 3.0 properly.
  • Release engineering: #9882 (a check of an impact with Release Engineering is needed)
    • The packages are going to be rebuild in side-tag, but that does not need releng involvement nowadays.
  • Policies and guidelines: N/A (not a System Wide Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:

Upgrade/compatibility impact

  • User specific Ruby binary extensions need to be rebuild.
  • Ruby packages/application dependencies might need to be adjusted if net-telnet, xmlrpc, webrick gem are used.

How To Test

  • No special hardware is needed.
  • To test, install Ruby 3.0. The test builds are pusblished in PR or on Ruby-SIG ML
  • Try to locally rebuild your packages using Ruby 3.0.
  • Use the packages with your applications previously written in Ruby.
  • If something doesn't work as it should, let us know.

User Experience

The Ruby programs/scripts should behave as they were used to.

Dependencies

$ dnf repoquery --disablerepo=* --enablerepo=rawhide --enablerepo=rawhide-source --arch=src --whatrequires 'ruby-devel' | sort | uniq | wc -l
138

Contingency Plan

  • Contingency mechanism: We would like to get a special buildroot tag to be able to rebuild necessary the packages with Ruby 3.0. If anything goes wrong, the tag could be easily dropped and previous version of Ruby 2.7 and its dependencies stays intact. The tag would be merged into F34 after everything is rebuild.
  • Contingency deadline: Mass Rebuild
  • Blocks release? No (not a System Wide Change), Yes/No
  • Blocks product? No

Documentation

Release Notes

  • The Ruby 3.0 bumps soname, therefore Ruby packages, which use binary extensions, should be rebuilt. Nevertheless, since upstream paid great attention to source compatibility, no changes to your code are needed.

https://github.com/ruby/ruby/blob/v3_0_0/NEWS.md