Fedora 34 Change: Ruby 3.0 (System-Wide Change)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://fedoraproject.org/wiki/Changes/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 ==
* Name: [[User:vondruch| Vít Ondruch]], [[User:pvalena| Pavel Valena]]
* Email: vondruch@xxxxxxxxxx, pvalena@xxxxxxxxxx


== Detailed Description ==

<!-- Expand on the summary, if appropriate.  A couple sentences
suffices to explain the goal, but the more details you can provide the
better. -->
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.

== 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 ==
* Proposal owners:
** Finish packaging of Ruby 3.0. Current changes available in PR
https://src.fedoraproject.org/rpms/ruby/pull-request/70
** Rebuilding of Ruby packages providing native extensions (i.e.
packages which depends on libruby).

* Other developers:
** 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: [https://pagure.io/releng/issue/9882 #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.

== 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 ==
<pre>
$ dnf repoquery --disablerepo=* --enablerepo=rawhide
--enablerepo=rawhide-source --arch=src --whatrequires 'ruby-devel' |
sort | uniq | wc -l
138
</pre>

== 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 ==
* [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]

== 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/master/NEWS


-- 
Ben Cotton
He / Him / His
Senior Program Manager, Fedora & CentOS Stream
Red Hat
TZ=America/Indiana/Indianapolis
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux