-
-
Couldn't load subscription status.
- Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviormodules
Milestone
Description
This package code:
module ForgetImports
import Pkg.PlatformEngines as pe
import Pkg as p
function test()
println("Pkg = ", p)
end
function test2()
println("PlatformEngines = ", pe)
end
end # moduleresults in the following error if the module is precompiled
$ julia -q
julia> using ForgetImports
julia> ForgetImports.test()
Pkg = Pkg
julia> ForgetImports.test2()
ERROR: UndefVarError: pe not defined
Stacktrace:
[1] test2()
@ ForgetImports /tmp/tmp.wXr6KYv8f2/ForgetImports/src/ForgetImports.jl:11
[2] top-level scope
@ REPL[3]:1
Works fine without precompilation:
$ julia --compiled-modules=no -q
julia> using ForgetImports
julia> ForgetImports.test()
Pkg = Pkg
julia> ForgetImports.test2()
PlatformEngines = Pkg.PlatformEngines
(Tentatively putting on 1.6 milestone since the rename feature is new for 1.6).
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviormodules