Commit df6cd59
authored
Having both `apply_effects` and `Effects::apply` is confusing.
`apply_effect`'s API seems a bit bad/dangerous because it combines work that should be done inside of a strongly-consistent operation (collecting the effects and reading their `Vc`s) with work that should be done at the top-level outside of any operation or turbo-task function (applying the effects).
The first commit in this PR removes the `apply_effect` API and tries to improve documentation, including adding a doctest that compiles.
The second commit in this PR is an LLM-driven refactor to remove the `apply_effect` callsites.
1 parent b6ff360 commit df6cd59
19 files changed
Lines changed: 454 additions & 245 deletions
File tree
- crates
- next-api/src
- next-build-test/src
- next-napi-bindings/src/next_api
- turbopack/crates
- turbo-tasks-fs/src
- turbo-tasks-fuzz/src
- turbo-tasks/src
- turbopack-cli/src/build
- turbopack-dev-server/src
- turbopack-node/src
- turbopack-tests/tests
- turbopack-tracing
- benches
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
189 | | - | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | | - | |
| 194 | + | |
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
196 | | - | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
203 | | - | |
| 205 | + | |
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
| |||
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
246 | | - | |
247 | | - | |
| 248 | + | |
248 | 249 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
255 | 256 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
261 | 285 | | |
262 | 286 | | |
263 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
1840 | 1842 | | |
1841 | 1843 | | |
1842 | 1844 | | |
1843 | | - | |
| 1845 | + | |
1844 | 1846 | | |
1845 | 1847 | | |
1846 | 1848 | | |
| |||
1874 | 1876 | | |
1875 | 1877 | | |
1876 | 1878 | | |
| 1879 | + | |
| 1880 | + | |
1877 | 1881 | | |
1878 | 1882 | | |
1879 | 1883 | | |
| |||
1893 | 1897 | | |
1894 | 1898 | | |
1895 | 1899 | | |
| 1900 | + | |
| 1901 | + | |
1896 | 1902 | | |
| 1903 | + | |
| 1904 | + | |
1897 | 1905 | | |
1898 | 1906 | | |
1899 | 1907 | | |
| |||
1975 | 1983 | | |
1976 | 1984 | | |
1977 | 1985 | | |
1978 | | - | |
| 1986 | + | |
1979 | 1987 | | |
1980 | 1988 | | |
1981 | 1989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
| 489 | + | |
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| |||
0 commit comments