Commit d9e1b2b
Fix collect_vars! after late invalidation on Julia 1.10 (#4852)
* Fix collect_vars! after late invalidation
Route recursive metadata collection through a dynamic dispatch barrier so late method additions cannot corrupt Julia 1.10 inference while downstream collect_vars! extensions remain visible.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
* Use @invokelatest for the collect_vars! dispatch barrier
Replaces the global Ref{Function} cell with @invokelatest, per review.
Both break the Julia 1.10 inference cycle identically and cost the same,
but @invokelatest also resolves in the latest world age, so a downstream
collect_vars! method defined while a collection is already running is
still found. The four-argument fallback returns nothing, so missing such
a method dropped parameters silently rather than erroring.
The @noinline and Base.@constprop :none annotations are no longer needed,
since @invokelatest is already opaque to inference.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
---------
Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>1 parent b3ff68b commit d9e1b2b
2 files changed
Lines changed: 115 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
939 | 949 | | |
940 | 950 | | |
941 | 951 | | |
| |||
966 | 976 | | |
967 | 977 | | |
968 | 978 | | |
969 | | - | |
| 979 | + | |
970 | 980 | | |
971 | 981 | | |
972 | 982 | | |
| |||
975 | 985 | | |
976 | 986 | | |
977 | 987 | | |
978 | | - | |
| 988 | + | |
979 | 989 | | |
980 | 990 | | |
981 | 991 | | |
| |||
984 | 994 | | |
985 | 995 | | |
986 | 996 | | |
987 | | - | |
| 997 | + | |
988 | 998 | | |
989 | | - | |
| 999 | + | |
990 | 1000 | | |
991 | | - | |
| 1001 | + | |
992 | 1002 | | |
993 | | - | |
| 1003 | + | |
994 | 1004 | | |
995 | | - | |
| 1005 | + | |
996 | 1006 | | |
997 | | - | |
| 1007 | + | |
998 | 1008 | | |
999 | | - | |
| 1009 | + | |
1000 | 1010 | | |
1001 | | - | |
| 1011 | + | |
1002 | 1012 | | |
1003 | | - | |
| 1013 | + | |
1004 | 1014 | | |
1005 | | - | |
| 1015 | + | |
1006 | 1016 | | |
1007 | 1017 | | |
1008 | 1018 | | |
1009 | 1019 | | |
1010 | 1020 | | |
1011 | 1021 | | |
1012 | | - | |
| 1022 | + | |
1013 | 1023 | | |
1014 | | - | |
| 1024 | + | |
1015 | 1025 | | |
1016 | | - | |
| 1026 | + | |
1017 | 1027 | | |
1018 | | - | |
| 1028 | + | |
1019 | 1029 | | |
1020 | | - | |
| 1030 | + | |
1021 | 1031 | | |
1022 | | - | |
| 1032 | + | |
1023 | 1033 | | |
1024 | 1034 | | |
1025 | | - | |
| 1035 | + | |
1026 | 1036 | | |
1027 | | - | |
| 1037 | + | |
1028 | 1038 | | |
1029 | | - | |
| 1039 | + | |
1030 | 1040 | | |
1031 | | - | |
| 1041 | + | |
1032 | 1042 | | |
1033 | | - | |
| 1043 | + | |
1034 | 1044 | | |
1035 | | - | |
| 1045 | + | |
1036 | 1046 | | |
1037 | 1047 | | |
1038 | 1048 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
281 | 288 | | |
282 | | - | |
283 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
284 | 302 | | |
285 | | - | |
286 | | - | |
287 | | - | |
| 303 | + | |
288 | 304 | | |
289 | | - | |
290 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
291 | 309 | | |
292 | | - | |
293 | | - | |
294 | | - | |
| 310 | + | |
| 311 | + | |
295 | 312 | | |
296 | | - | |
297 | | - | |
298 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
299 | 358 | | |
300 | | - | |
301 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
302 | 363 | | |
0 commit comments