Commit f545d01
committed
fix: make TS definition collector visit recursive dependencies
The DeclCollector in generate_ts_definition only called
visit_dependencies on UserRunConfig, collecting direct dependencies
but missing indirect ones. This meant any type referenced through
a chain of dependencies (e.g. a type used by EnabledCacheConfig,
which is flattened into UserTaskConfig) would be referenced in the
generated TypeScript but never declared.
Fix the collector to recursively visit each type's dependencies,
using a HashSet<TypeId> to prevent infinite loops from circular
references.
Also add CacheOutputs as an indirect type (referenced through the
flatten chain) that confirms the fix works — it's now properly
declared in the generated run-config.ts.
https://claude.ai/code/session_01VQvSgXNnYL8tNWydvtbCvg1 parent 077d3af commit f545d01
File tree
5 files changed
+63
-7
lines changed- crates
- vite_task_bin/src
- vite_task_graph
- src/config
5 files changed
+63
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
128 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
1 | 12 | | |
2 | 13 | | |
3 | 14 | | |
| |||
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
30 | 45 | | |
31 | 46 | | |
32 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
| |||
58 | 71 | | |
59 | 72 | | |
60 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
61 | 77 | | |
62 | 78 | | |
63 | 79 | | |
| |||
89 | 105 | | |
90 | 106 | | |
91 | 107 | | |
92 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
93 | 113 | | |
94 | 114 | | |
95 | 115 | | |
| |||
204 | 224 | | |
205 | 225 | | |
206 | 226 | | |
| 227 | + | |
| 228 | + | |
207 | 229 | | |
208 | 230 | | |
209 | 231 | | |
210 | 232 | | |
211 | 233 | | |
212 | 234 | | |
213 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
214 | 239 | | |
215 | 240 | | |
216 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
217 | 245 | | |
218 | 246 | | |
219 | 247 | | |
220 | | - | |
| 248 | + | |
221 | 249 | | |
| 250 | + | |
| 251 | + | |
222 | 252 | | |
223 | 253 | | |
224 | 254 | | |
225 | | - | |
| 255 | + | |
226 | 256 | | |
227 | 257 | | |
228 | 258 | | |
229 | 259 | | |
230 | 260 | | |
231 | 261 | | |
232 | 262 | | |
233 | | - | |
| 263 | + | |
234 | 264 | | |
235 | 265 | | |
236 | 266 | | |
| |||
358 | 388 | | |
359 | 389 | | |
360 | 390 | | |
| 391 | + | |
361 | 392 | | |
362 | 393 | | |
363 | 394 | | |
| |||
0 commit comments