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

Feature request: Toplevel definitions in JLL TOML #10

Open
maleadt opened this issue Jul 13, 2024 · 0 comments
Open

Feature request: Toplevel definitions in JLL TOML #10

maleadt opened this issue Jul 13, 2024 · 0 comments

Comments

@maleadt
Copy link

maleadt commented Jul 13, 2024

CUDA_Driver_jll currently abuses the JLL init hook to not only execute code at load time, but also define auxiliary functionality: https://github.com/JuliaPackaging/Yggdrasil/blob/a3649ece56eb711f060ade7aa07eaa65a315ed23/C/CUDA/CUDA_Driver/init.jl#L34-L58

However, the CUDA_Driver_jll is also used to provide a library that isn't available for all platforms. Because of the JLL init hook currently only being executed when an artifact is available, JuliaPackaging/JLLWrappers.jl#50, this currently necessitates duplicating the aforementioned auxiliary functionality for when the JLL is not available: JuliaPackaging/Yggdrasil#5751

Given the new design of the on_load_callback, which is hard to generalize to the case when an artifact is not available, it may be better to provide a toplevel_code setting or so that allows users to inject code into the JLL package that will be available at all time, i.e., also when no artifact is available. This would allow us to reliably add functionality to JLLs.

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

No branches or pull requests

1 participant