Commit ee50c14
Make
Summary:
Previously, the `missing-source` error ignored all error configuration (e.g., requesting `--error=missing-source` did nothing). Now this error respects configuration. Implementation-wise, this means we always log the error and choose whether to display it or not based on the configured severity level, rather than choosing whether to log it or not based on the value of `--ignore-missing-source`.
For backwards compatibility, I also preserved the behavior of `--ignore-missing-source=false` (enable `missing-source` with severity Error). This does lead to a bit of weirdness when `missing-source` is configured in multiple ways. What I ended up doing is enabling the error if it is explicitly enabled in any way (even if it is also explicitly disabled in a different way!), with the severity defaulting to Error if unspecified.
Maybe we should deprecated `--ignore-missing-source` at some point? (cc connernilsen) But I think the behavior in this diff is good enough for now.
For #1406.
Reviewed By: connernilsen
Differential Revision: D85622655
fbshipit-source-id: 45a67f52306303c84b07ba888a7c185e60b18411missing-source respect error configuration1 parent b190da3 commit ee50c14
File tree
7 files changed
+39
-82
lines changed- crates/pyrefly_config/src
- pyrefly/lib
- error
- module
- state
- test
7 files changed
+39
-82
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| 679 | + | |
679 | 680 | | |
680 | 681 | | |
681 | 682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
165 | 177 | | |
166 | 178 | | |
167 | 179 | | |
| |||
245 | 257 | | |
246 | 258 | | |
247 | 259 | | |
248 | | - | |
| 260 | + | |
| 261 | + | |
249 | 262 | | |
250 | 263 | | |
251 | 264 | | |
| |||
297 | 310 | | |
298 | 311 | | |
299 | 312 | | |
300 | | - | |
| 313 | + | |
301 | 314 | | |
302 | 315 | | |
303 | 316 | | |
| |||
321 | 334 | | |
322 | 335 | | |
323 | 336 | | |
324 | | - | |
| 337 | + | |
325 | 338 | | |
326 | 339 | | |
327 | | - | |
| 340 | + | |
328 | 341 | | |
329 | 342 | | |
330 | 343 | | |
| |||
353 | 366 | | |
354 | 367 | | |
355 | 368 | | |
356 | | - | |
| 369 | + | |
| 370 | + | |
357 | 371 | | |
358 | 372 | | |
359 | 373 | | |
| |||
0 commit comments