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

Avoid using standard import in JLL for cases like JULIA_LOAD_PATH=@ julia1.6 -e "using OpenSpecFun_jll" #1007

Closed
wants to merge 1 commit into from

Conversation

tkf
Copy link

@tkf tkf commented Feb 12, 2021

In Julia 1.6, I'm seeing that OpenSpecFun_jll is not importable with "strict" environments like JULIA_LOAD_PATH=@ when CompilerSupportLibraries_jll does not exist in toplevel Project.toml #1009

IIUC, this is because the jll scripts that have using $Dependency are simply includeed at run-time https://github.com/JuliaPackaging/JLLWrappers.jl/blob/1631db3e80c9d36d257adc222e766a22a73df8d1/src/toplevel_generators.jl#L170. It'd fail if $Dependency is not in deps of currently active project.

I implemented a simple workaround that uses require instead of using as in

const $name = Base.require(Base.PkgId(Base.UUID($(repr(uuid))), $(repr(name))))
using .$name

I'm happy to close the PR if there is a better solution.

close #1009

@tkf tkf changed the title Avoid using standard import for JULIA_LOAD_PATH=@ julia1.6 -e "using OpenSpecFun_jll" Avoid using standard import in JLL for cases like JULIA_LOAD_PATH=@ julia1.6 -e "using OpenSpecFun_jll" Feb 12, 2021
@staticfloat
Copy link
Member

I'm not sure I understand what you're doing here, but I don't think this is an issue with BinaryBuilder; this sounds like JuliaLang/julia#39504

@tkf
Copy link
Author

tkf commented Feb 12, 2021

I guess I should've opened the issue. There is an MWE in #1009.

@tkf
Copy link
Author

tkf commented Feb 12, 2021

ref #1009 (comment)

@tkf tkf closed this Feb 12, 2021
@tkf tkf deleted the sneakyimport branch February 12, 2021 02:21
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 this pull request may close these issues.

OpenSpecFun_jll not importable in JULIA_LOAD_PATH=@ julia1.6
2 participants