Repository navigation
Commit 0c25a96
committed
fix(ruby-lsp): keep the ActiveRecord finder rule same-file for now
Turn ruby_ar_finder_cross_file off by default, as agreed in review for
the case where the cross-file finder stratum misses the 95% precision
bar. A fixed-seed sample of 48 edges that only the cross-file half
produces, on rails, redmine, mastodon and loomio, was 38/48 correct.
Nine of the ten misses are relation chains (Model.where(...).m) typed as
a model instance, so m lands on an instance method; in Ruby a relation
answers m itself or delegates it to the model's class methods. The
tenth is a same-named test model from another gem.
The test seam now returns the previous setting, so a test restores what
it found instead of a fixed value; with a fixed reset the default-mode
row could not fail. The two rows that need the cross-file half switch it
on explicitly, the default row asserts same-file only, and the
UsersController row matches its caller exactly.
Signed-off-by: Martin Vogel <[email protected]>1 parent 18898aa commit 0c25a96
3 files changed
Lines changed: 37 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | | - | |
833 | | - | |
834 | | - | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
835 | 839 | | |
836 | 840 | | |
837 | | - | |
| 841 | + | |
| 842 | + | |
838 | 843 | | |
| 844 | + | |
839 | 845 | | |
840 | 846 | | |
841 | 847 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1570 | 1570 | | |
1571 | 1571 | | |
1572 | 1572 | | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
1573 | 1576 | | |
1574 | 1577 | | |
| 1578 | + | |
1575 | 1579 | | |
1576 | 1580 | | |
1577 | 1581 | | |
1578 | 1582 | | |
1579 | 1583 | | |
1580 | 1584 | | |
1581 | 1585 | | |
1582 | | - | |
| 1586 | + | |
1583 | 1587 | | |
1584 | 1588 | | |
1585 | 1589 | | |
| |||
1657 | 1661 | | |
1658 | 1662 | | |
1659 | 1663 | | |
| 1664 | + | |
| 1665 | + | |
1660 | 1666 | | |
1661 | 1667 | | |
| 1668 | + | |
1662 | 1669 | | |
1663 | 1670 | | |
1664 | 1671 | | |
| |||
2147 | 2154 | | |
2148 | 2155 | | |
2149 | 2156 | | |
2150 | | - | |
2151 | | - | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
2152 | 2160 | | |
2153 | 2161 | | |
2154 | 2162 | | |
| |||
2168 | 2176 | | |
2169 | 2177 | | |
2170 | 2178 | | |
2171 | | - | |
2172 | | - | |
2173 | | - | |
2174 | | - | |
2175 | | - | |
2176 | | - | |
2177 | | - | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
2178 | 2182 | | |
2179 | 2183 | | |
2180 | 2184 | | |
| |||
2183 | 2187 | | |
2184 | 2188 | | |
2185 | 2189 | | |
2186 | | - | |
2187 | 2190 | | |
2188 | 2191 | | |
2189 | 2192 | | |
2190 | 2193 | | |
2191 | 2194 | | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
2192 | 2203 | | |
2193 | 2204 | | |
2194 | 2205 | | |
| |||
2240 | 2251 | | |
2241 | 2252 | | |
2242 | 2253 | | |
2243 | | - | |
2244 | | - | |
| 2254 | + | |
| 2255 | + | |
2245 | 2256 | | |
0 commit comments