Commit 794a8da
Fix stable API rust impl file check (#683)
* fix: check stable API rust impl file exists at build time
When detecting Ruby versions like 3.5 (ruby-head), the build would fail
with a missing file error because is_stable() only checked version ranges
rather than verifying a corresponding ruby_X_Y.rs file exists.
Replace is_stable() with has_rust_impl() that checks for actual file
existence. This allows ruby-head or other versions without impls to
correctly fall back to compiled C when stable-api-compiled-fallback is
enabled, or error clearly when it's not.
* fix(ci): avoid installing standard gem on Ruby < 3.0
The `standard` gem version 1.52.0 dropped support for Ruby 2.7. Since we only need linting on newer Rubies, we simply skip installing and running `standard` on Ruby < 3.0.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent c087445 commit 794a8da
File tree
5 files changed
+35
-17
lines changed- crates/rb-sys/build
- script
5 files changed
+35
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
11 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
12 | 31 | | |
13 | 32 | | |
14 | 33 | | |
| |||
42 | 61 | | |
43 | 62 | | |
44 | 63 | | |
45 | | - | |
| 64 | + | |
46 | 65 | | |
47 | 66 | | |
48 | 67 | | |
| |||
76 | 95 | | |
77 | 96 | | |
78 | 97 | | |
79 | | - | |
| 98 | + | |
80 | 99 | | |
81 | 100 | | |
82 | | - | |
| 101 | + | |
83 | 102 | | |
84 | 103 | | |
85 | 104 | | |
| |||
88 | 107 | | |
89 | 108 | | |
90 | 109 | | |
91 | | - | |
| 110 | + | |
92 | 111 | | |
93 | 112 | | |
94 | 113 | | |
| |||
102 | 121 | | |
103 | 122 | | |
104 | 123 | | |
105 | | - | |
| 124 | + | |
106 | 125 | | |
107 | 126 | | |
108 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 39 | | |
45 | 40 | | |
46 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
589 | | - | |
590 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
| |||
0 commit comments