Commit 4124316
committed
gopls/internal/lsp/cache: remove baseCtx from the View
Views don't do work, so should have no need of a context. Instead, chain
the contexts inside of clone.
Also, fix a latent bug where the context used in the view importsState
is the snapshot backgroundCtx rather than view baseCtx: the importsState
outlives the snapshot, so should not reference the snapshot context.
Fortunately, the context was thus far only used for logging.
For golang/go#57979
Change-Id: Icf55d69e82f19b3fd52ca7d9266df2b5589bb36e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/539676
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>1 parent 8b89cfa commit 4124316
3 files changed
+6
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | | - | |
| 128 | + | |
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
1813 | 1814 | | |
1814 | 1815 | | |
1815 | 1816 | | |
1816 | | - | |
| 1817 | + | |
1817 | 1818 | | |
1818 | 1819 | | |
1819 | 1820 | | |
1820 | 1821 | | |
1821 | 1822 | | |
1822 | 1823 | | |
1823 | | - | |
| 1824 | + | |
1824 | 1825 | | |
1825 | 1826 | | |
1826 | 1827 | | |
1827 | 1828 | | |
1828 | 1829 | | |
1829 | | - | |
| 1830 | + | |
1830 | 1831 | | |
1831 | 1832 | | |
1832 | 1833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
| |||
893 | 889 | | |
894 | 890 | | |
895 | 891 | | |
896 | | - | |
| 892 | + | |
897 | 893 | | |
898 | 894 | | |
899 | 895 | | |
| |||
0 commit comments