Commit 12d9554
[analysis_server] Don't treat non-existent files the same as empty files when checking if didOpen changes content
This code assumed `driver?.fsState.getExistingFromPath(path)?.content` would be null for files that didn't exist, but actually we can get a `FileState` with `exists=false` and an empty string for `content`. We should not consider this equal to an empty file that was just opened.
Fixes Dart-Code/Dart-Code#5269
Fixes #55318
Change-Id: I4334a002ef0fb9ff3a9423568faa6e0735369022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392142
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>1 parent 082bc3d commit 12d9554
File tree
2 files changed
+63
-1
lines changed- pkg/analysis_server
- lib/src/lsp
- test/lsp
2 files changed
+63
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
652 | 657 | | |
653 | | - | |
| 658 | + | |
654 | 659 | | |
655 | 660 | | |
656 | 661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
195 | 218 | | |
196 | 219 | | |
197 | 220 | | |
| |||
568 | 591 | | |
569 | 592 | | |
570 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
571 | 628 | | |
572 | 629 | | |
573 | 630 | | |
| |||
0 commit comments