|
32 | 32 | * [How to introduce a constant in specs](#how-to-introduce-a-constant-in-specs)
|
33 | 33 | * [How to add a new spec](#how-to-add-a-new-spec)
|
34 | 34 | * [How to work on a new CRuby feature](#how-to-work-on-a-new-cruby-feature)
|
| 35 | + * [How to prepare PR for changes in the next CRuby version](#how-to-prepare-pr-for-changes-in-the-next-cruby-version) |
35 | 36 |
|
36 | 37 | ## How to find a Core Method implementation
|
37 | 38 |
|
@@ -1582,3 +1583,22 @@ When you work on a new feature/method usually you make the following steps:
|
1582 | 1583 | - untag MRI tests and ensure they pass too
|
1583 | 1584 | - mention in a PR description an original issue in a way it's described in the Ruby
|
1584 | 1585 | release notes or provide a link to an original ticket (on <https://bugs.ruby-lang.org>)
|
| 1586 | +
|
| 1587 | +## How to prepare PR for changes in the next CRuby version |
| 1588 | +
|
| 1589 | +When you work on a new feature that is introduced in Ruby version which TruffleRuby doesn't support yet |
| 1590 | +(e.g. TruffleRuby is compatible with Ruby 3.1 now but the feature is introduced in Ruby 3.2) there is a |
| 1591 | +problem with running proper specs locally and on CI (both internal and GitHub Actions). |
| 1592 | +
|
| 1593 | +So you should ensure that the specs for the new feature are run and passed successfully on CI and the |
| 1594 | +whole suit pass successfully as well: |
| 1595 | +
|
| 1596 | +- add specs for the new feature if they are missing (with a `ruby_version_is` guard) |
| 1597 | +- use `PRETEND_RUBY_VERSION` environment variable to run specs for the new feature |
| 1598 | +- add a file with specs for the new feature to the next list in `spec/truffleruby.next-specs` (to run them on CI) |
| 1599 | +- use `jt test :next` to run locally all the specs for the next CRuby version |
| 1600 | +
|
| 1601 | +If the new feature breaks existing behavior and some specs fail - disable them temporary (until TruffleRuby |
| 1602 | +is switched to the next CRuby version completely) with tagging as failed (use `jt tag <path-to-spec-file>`) |
| 1603 | +
|
| 1604 | +Look for additional details in the Contributor Workflow guide <https://github.com/oracle/truffleruby/blob/master/doc/contributor/workflow.md#running-specs-for-ruby-32-features>. |
0 commit comments