-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed as not planned
Labels
error messagesBetter, more actionable error messagesBetter, more actionable error messagesneeds decisionA decision on this change is neededA decision on this change is needed
Milestone
Description
Hey there, I have a failing test with Julia 1.12 (beta3). Here is a MWE:
A file test.jl
constains only the line a = 42
.
julia> function foo()
include("test.jl")
return a
end
foo (generic function with 1 method)
With julia 1.11.5:
julia> using Test; @test foo() == 42
Test Passed
With Julia 1.12 (beta3):
julia> using Test; @test foo() == 42
Error During Test at REPL[2]:1
Test threw exception
Expression: foo() == 42
UndefVarError: `a` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] foo()
@ Main ./REPL[1]:3
[2] top-level scope
@ REPL[2]:1
[3] macro expansion
@ ~/.julia/juliaup/julia-1.12.0-beta3+0.x64.linux.gnu/share/julia/stdlib/v1.12/Test/src/Test.jl:676 [inlined]
ERROR: There was an error during testing
According to the docs, include
should evaluate the contents of test.jl
in the current module, which is Main
. So I believe this is a regression in Julia 1.12
Metadata
Metadata
Assignees
Labels
error messagesBetter, more actionable error messagesBetter, more actionable error messagesneeds decisionA decision on this change is neededA decision on this change is needed