Skip to content

Global definitions not visible after includet #893

@serenity4

Description

@serenity4

This fails in 1.11.3 and on nightly:

julia> module A

using Revise

includet("B.jl") # echo "module B end" > B.jl
using .B

end # module

ERROR: LoadError: UndefVarError: `B` not defined in `Main.A`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
 [1] top-level scope
   @ ~/.julia/dev/Cthulhu/bug.jl:6
 [2] include(mapexpr::Function, mod::Module, _path::String)
   @ Base ./Base.jl:306
 [3] top-level scope
   @ REPL[1]:1
 [4] top-level scope
   @ REPL:1

whereas replacing includet by include works as intended:

julia> module A
       
       using Revise
       
       include("B.jl") # echo "module B end" > B.jl
       using .B
       
       end
Main.A

If includet is expected to behave differently than include, this should probably be mentioned in its docstring.

(not sure if this is an issue in Revise itself or one of its dependencies)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions