@@ -15,6 +15,8 @@ To update a specific default gem to a newer version than in the MRI release, run
15
15
cd ruby
16
16
git checkout -b truffleruby-updates-$VERSION vn_n_n
17
17
ruby tool/sync_default_gems.rb $GEM
18
+
19
+ git push -u eregon HEAD
18
20
```
19
21
to update the default gem in MRI.
20
22
Then follow the instructions below to reimport MRI files and to update default gems.
@@ -26,6 +28,20 @@ Set the environment variable `$VERSION` to the target version:
26
28
export VERSION=n.n.n
27
29
```
28
30
31
+ Re-install the target MRI version using the commands, to have a clean set of gems:
32
+ ```
33
+ rm -rf ~/.rubies/ruby-$VERSION
34
+ ruby-install ruby $VERSION
35
+ # OR
36
+ rm -rf ~/.rubies/ruby-$VERSION
37
+ bin/ruby-build $VERSION ~/.rubies/ruby-$VERSION
38
+ ruby-install -r ~/tmp ruby $VERSION
39
+ ```
40
+
41
+ ` ruby-build ` does not keep the build directory
42
+ (required as ` RUBY_BUILD_DIR ` for ` tool/import-mri-files.sh ` ),
43
+ so one needs the extra ` ruby-install ` command when using ` ruby-build ` .
44
+
29
45
## Create reference branches
30
46
31
47
For both the current version of Ruby you're using, and the new version, create
@@ -48,18 +64,14 @@ update.
48
64
49
65
## Update MRI with modifications
50
66
51
- Re-install the target MRI version using the commands, to have a clean set of gems:
52
- ```
53
- rm -rf ~/.rubies/ruby-$VERSION
54
- ruby-install ruby $VERSION
55
- ```
56
-
57
- In your working branch you can import MRI files again, and you can re-apply
58
- old patches using the old reference branch.
67
+ In your working branch you can cherry-pick the new reference branch,
68
+ and then re-apply old patches using the old reference branch.
59
69
60
70
``` bash
61
- tool/import-mri-files.sh
62
- git revert vNN
71
+ # Commit message: Import files from MRI n.n.n
72
+ git cherry-pick vNew
73
+ # Commit message: Re-apply changes on top of n.n.n files
74
+ git revert vOld
63
75
```
64
76
65
77
You'll usually get some conflicts to work out.
@@ -140,9 +152,9 @@ ruby tool/patch-default-gemspecs.rb
140
152
## Updating bin/ executables
141
153
142
154
```
143
- rm -rf bin
144
- cp -R ~/.rubies/ruby-$VERSION/bin .
145
- rm -f bin /ruby
155
+ rm -rf exe
156
+ cp -R ~/.rubies/ruby-$VERSION/bin exe
157
+ rm -f exe /ruby
146
158
ruby tool/patch_launchers.rb
147
159
```
148
160
@@ -151,7 +163,8 @@ ruby tool/patch_launchers.rb
151
163
In a separate commit, update all of these:
152
164
153
165
* Update ` .ruby-version ` , ` TruffleRuby.LANGUAGE_VERSION `
154
- * Update ` versions.json ` (from ` ../ruby/gems/bundled_gems ` )
166
+ * Reset ` lib/cext/ABI_version.txt ` and ` lib/cext/ABI_check.txt ` to ` 1 ` if ` RUBY_VERSION ` was updated.
167
+ * Update ` versions.json ` (from ` cat ../ruby/gems/bundled_gems ` , ` ls -l lib/gems/specifications/default ` and ` jt gem --version ` )
155
168
* Copy and paste ` -h ` and ` --help ` output to ` RubyLauncher `
156
169
* Copy and paste the TruffleRuby ` --help ` output to ` doc/user/options.md `
157
170
* Update ` doc/user/compatibility.md ` and ` README.md `
@@ -161,7 +174,6 @@ In a separate commit, update all of these:
161
174
* Grep for the old version with ` git grep -F x.y.z `
162
175
* If ` tool/id.def ` or ` lib/cext/include/truffleruby/internal/id.h ` has changed, ` jt build core-symbols ` and check for correctness.
163
176
* Update the list of ` :next ` specs and change the "next version" in ` spec/truffleruby.mspec ` .
164
- * Reset ` lib/cext/ABI_version.txt ` and ` lib/cext/ABI_check.txt ` to ` 1 ` if ` RUBY_VERSION ` was updated.
165
177
166
178
## Last step
167
179
0 commit comments