Commit bf40c24
committed
dap: improve location resolution for duplicate digests
This improves location resolution for duplicate digests by making some
assumptions about the file structure to determine a "best match" when
there are multiple possible locations.
It uses the next operation (that this digest is the input for) to
determine a location. If the location of the current operation is before
the next operation, this location is preferred. If there are multiple
locations that happen before the next operation, the one closest to the
next operation (aka later in the file) is used instead.
This resolves the most common case of multiple identical `FROM`
statements without adding more code to the frontends themselves.
Signed-off-by: Jonathan A. Sternberg <[email protected]>1 parent bafc4e2 commit bf40c24
2 files changed
+46
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
| |||
141 | 139 | | |
142 | 140 | | |
143 | 141 | | |
144 | | - | |
145 | 142 | | |
146 | 143 | | |
147 | 144 | | |
148 | 145 | | |
149 | 146 | | |
150 | 147 | | |
151 | | - | |
| 148 | + | |
152 | 149 | | |
153 | 150 | | |
154 | 151 | | |
| |||
166 | 163 | | |
167 | 164 | | |
168 | 165 | | |
169 | | - | |
| 166 | + | |
170 | 167 | | |
171 | 168 | | |
172 | 169 | | |
| |||
195 | 192 | | |
196 | 193 | | |
197 | 194 | | |
198 | | - | |
| 195 | + | |
199 | 196 | | |
200 | 197 | | |
201 | 198 | | |
| |||
213 | 210 | | |
214 | 211 | | |
215 | 212 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 213 | + | |
221 | 214 | | |
222 | 215 | | |
223 | 216 | | |
| |||
226 | 219 | | |
227 | 220 | | |
228 | 221 | | |
229 | | - | |
| 222 | + | |
230 | 223 | | |
231 | 224 | | |
232 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| |||
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
52 | 66 | | |
53 | 67 | | |
54 | 68 | | |
| |||
402 | 416 | | |
403 | 417 | | |
404 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
0 commit comments