pkgdir(@__MODULE__)
returns nothing
during __init__
on 1.11.0 #56077
Open
Description
opened on Oct 9, 2024
On Julia 1.11.0, generating a new package whose src/MWE.jl
is just the following, where we print the pkgdir
for the current @__MODULE__
:
module MWE
greet() = print("Hello World!")
function __init__()
println(@__MODULE__)
println(pkgdir(@__MODULE__))
end
end # module MWE
produces the following when being loaded (note the nothing
for pkgdir
):
julia> using MWE
[ Info: Precompiling MWE [07383931-b36a-4268-bd90-eec35e6fd057]
MWE
nothing
However, on Julia 1.10.5, the proper directory is printed:
julia> using MWE
No Changes to `/tmp/tmp.s4wO5AcljZ/MWE/Project.toml`
No Changes to `/tmp/tmp.s4wO5AcljZ/MWE/Manifest.toml`
Precompiling MWE
1 dependency successfully precompiled in 1 seconds
MWE
/tmp/tmp.s4wO5AcljZ/MWE
Activity