Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Julia 1.12 due to missing Base.module_keys #614

Closed
kbarros opened this issue Nov 5, 2024 · 4 comments · Fixed by #615
Closed

Incompatibility with Julia 1.12 due to missing Base.module_keys #614

kbarros opened this issue Nov 5, 2024 · 4 comments · Fixed by #615

Comments

@kbarros
Copy link

kbarros commented Nov 5, 2024

There are a couple places where JLD2 currently depends on Base.module_keys:
https://github.com/search?q=repo%3AJuliaIO%2FJLD2.jl%20module_keys&type=code

This function is no longer available on nightly (1.12) versions of Julia, which makes JLD2 incompatible.

@JonasIsensee
Copy link
Collaborator

Will there be a replacement ?

@giordano
Copy link
Member

giordano commented Nov 5, 2024

This was changed in JuliaLang/julia#56329, my understanding is that Base.module_keys was replaced by Base.loaded_modules_order (but with a different type, and apparently also a different list of modules)

@kbarros
Copy link
Author

kbarros commented Nov 6, 2024

Another option to consider is values(Base.loaded_modules). I'm not sure how that's distinct from Base.loaded_modules_order. Either way, these functions seem available across Julia versions (I looked at 1.10, 1.11, 1.12-dev).

Here are some links to show how Base.loaded_modules_order gets filled in different versions:
https://github.com/JuliaLang/julia/blob/release-1.10/base/loading.jl#L1859-L1861
https://github.com/JuliaLang/julia/blob/master/base/loading.jl#L2530-L2531

Of course, all of these functions seems to be private. Ideally one could find an alternative that's in the public API?

@JonasIsensee JonasIsensee mentioned this issue Nov 6, 2024
@JonasIsensee
Copy link
Collaborator

Since I haven't needed to drop support for julia 1.6, yet, I went with values(Base.loaded_modules) which has been around forever. (Base.loaded_modules_order was added in julia v1.9)

I'd love an alternative using public API only, but that's no reason to leave it broken until then.

A new release with fix should hopefully be out later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants