Commit 9ae91eb
Backport warning feature for bundled gems from master (ruby#11420)
* Make sure to always use the right `warn`
* lib/bundled_gems.rb: more reliable caller detection
The `2` skipped frames went out of sync and now it should be `3`.
Rather than just update the offset, we can implement a way that
is adaptative as long as all require decorators are also called require.
Also we should compute the corresponding `uplevel` otherwise the
warning will still point decorators.
Co-authored-by: "Hiroshi SHIBATA" <[email protected]>
* Warn ostruct for Ruby 3.5
* Warn pstore for Ruby 3.5
* Mark rdoc as bundled gems at Ruby 3.5
* Warn to use win32ole without Gemfile for Ruby 3.5
* EXACT list is mostly same as SINCE list on bundled gems.
* Mark to warn fiddle as bundled gems for Ruby 3.5
* Mark to warn logger as bundled gems for Ruby 3.5
* We should use uplevel:2 in another case.
Like the following scenario with bootsnap, that frames are same or smaller than frame_to_skip(=3).
---
"/Users/hsbt/.local/share/rbenv/versions/3.3-dev/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'"
"/Users/hsbt/.local/share/gem/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'"
"test_warn_bootsnap.rb:11:in `<main>'"
---
* Delete unnecessary rubocop disable comment
* Show correct script name with sub-feature case
* Skip to show script name with using ruby -r option
* Don't show script name when bundle exec and call ruby script directly.
* Pick word fix from 34adc07
---------
Co-authored-by: David Rodríguez <[email protected]>
Co-authored-by: Jean Boussier <[email protected]>
Co-authored-by: Kentaro Takeyama <[email protected]>1 parent 66312ad commit 9ae91eb
File tree
3 files changed
+84
-27
lines changed- lib
- tool/test_for_warn_bundled_gems
3 files changed
+84
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 40 | + | |
46 | 41 | | |
47 | 42 | | |
48 | 43 | | |
| |||
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
73 | | - | |
74 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
86 | 115 | | |
87 | 116 | | |
88 | 117 | | |
| |||
93 | 122 | | |
94 | 123 | | |
95 | 124 | | |
96 | | - | |
| 125 | + | |
97 | 126 | | |
98 | 127 | | |
99 | 128 | | |
| |||
108 | 137 | | |
109 | 138 | | |
110 | 139 | | |
111 | | - | |
| 140 | + | |
112 | 141 | | |
113 | 142 | | |
114 | 143 | | |
| |||
148 | 177 | | |
149 | 178 | | |
150 | 179 | | |
151 | | - | |
| 180 | + | |
152 | 181 | | |
153 | 182 | | |
154 | | - | |
| 183 | + | |
155 | 184 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 185 | + | |
| 186 | + | |
159 | 187 | | |
160 | 188 | | |
161 | 189 | | |
162 | 190 | | |
163 | | - | |
| 191 | + | |
164 | 192 | | |
| 193 | + | |
165 | 194 | | |
166 | 195 | | |
167 | 196 | | |
168 | 197 | | |
169 | 198 | | |
170 | 199 | | |
171 | | - | |
172 | | - | |
173 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
174 | 209 | | |
175 | 210 | | |
176 | 211 | | |
| |||
183 | 218 | | |
184 | 219 | | |
185 | 220 | | |
186 | | - | |
| 221 | + | |
187 | 222 | | |
188 | 223 | | |
189 | 224 | | |
| |||
204 | 239 | | |
205 | 240 | | |
206 | 241 | | |
207 | | - | |
| 242 | + | |
208 | 243 | | |
209 | 244 | | |
210 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments