Fix iteration over dict in loading.jl#48608
Fix iteration over dict in loading.jl#48608gbaraldi wants to merge 1 commit intoJuliaLang:masterfrom
Conversation
| extids = pop!(EXT_DORMITORY, pkgid, nothing) | ||
| extids === nothing && return | ||
| for extid in extids | ||
| for extid in values(extids) |
There was a problem hiding this comment.
extids is an Array, so calling values is unnecessary
There was a problem hiding this comment.
Forgot that pop changes dicts into arrays.
There was a problem hiding this comment.
It doesn't? The values of that dict are vectors.
There was a problem hiding this comment.
Yeah , sorry :(. In any case do we have a way to check if a pkg is an extension at this time? To get back the pretty printing?
| for extid in values(EXT_DORMITORY) | ||
| if extid.id == pkg | ||
| print(extid.parentid.name, " → ") | ||
| break |
There was a problem hiding this comment.
This will not return true for any element, so it could be simply replaced here by:
| for extid in values(EXT_DORMITORY) | |
| if extid.id == pkg | |
| print(extid.parentid.name, " → ") | |
| break | |
| if false; if false |
There was a problem hiding this comment.
Yeah :(. This broke the time_imports pretty printing for extensions.
|
Easier to fix this on top of #48586? |
|
Is that the PR that delays the loading of the extensions? Though in any case if we ever decide to do that this kind of printing won't work anymore because it relies on loading the extension immediately after the main package |
Should fix #48590, but I wasn't able to reproduce the original failure locally. So a working mwe for a test would be nice.
In the meanwhile, @anandijain could you check locally?