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

simplify the backtrace of include #33256

Merged
merged 1 commit into from
Sep 17, 2019
Merged

simplify the backtrace of include #33256

merged 1 commit into from
Sep 17, 2019

Conversation

vtjnash
Copy link
Sponsor Member

@vtjnash vtjnash commented Sep 13, 2019

Using the ability to delete functions, we can make this code a bit nicer and simpler.
(similar to #33087)

In previous releases of Julia:

julia> include("not_found")
ERROR: could not open file /path/to/cwd/not_found
Stacktrace:
 [1] include at ./boot.jl:328 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1105
 [3] include(::Module, ::String) at ./Base.jl:31
 [4] include(::String) at ./client.jl:432
 [5] top-level scope at REPL[1]:1

julia> Base.include(Base, "not_found")
/path/to/cwd/not_found
ERROR: could not open file /path/to/cwd/not_found
Stacktrace:
 [1] include at ./boot.jl:328 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1105
 [3] include(::Module, ::String) at ./Base.jl:31
 [4] top-level scope at REPL[2]:1

julia> module A; include("not_found"); end
ERROR: could not open file /path/to/cwd/not_found
Stacktrace:
 [1] include at ./boot.jl:328 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1105
 [3] include at ./Base.jl:31 [inlined]
 [4] include(::String) at ./REPL[3]:1
 [5] top-level scope at REPL[3]:1

After this PR:

julia> include("not_found")
ERROR: could not open file /path/to/cwd/not_found
Stacktrace:
 [1] include(::String) at ./client.jl:446
 [2] top-level scope at REPL[1]:1

julia> Base.include(Base, "not_found")
ERROR: could not open file /path/to/cwd/not_found
Stacktrace:
 [1] include(::Module, ::String) at ./Base.jl:377
 [2] top-level scope at REPL[2]:1

julia> module A; include("not_found"); end
ERROR: could not open file /path/to/cwd/not_found
Stacktrace:
 [1] include(::Module, ::String) at ./Base.jl:377
 [2] include(::String) at ./REPL[3]:1
 [3] top-level scope at REPL[3]:1

Using the ability to delete functions, we can make this code a bit nicer and simpler.
(similar to #33087)
@vtjnash vtjnash merged commit 809d290 into master Sep 17, 2019
@vtjnash vtjnash deleted the jn/includes-bt branch September 17, 2019 14:31
felixrehren added a commit to felixrehren/julia that referenced this pull request Jan 3, 2021
`Base.include` no longer defined in `sysimg.jl`. As of JuliaLang#33256, it sits in `base.jl`
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.

1 participant