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

include: add compat annotation for mapexpr argument #39856

Merged
merged 1 commit into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ it is evaluated: for each parsed expression `expr` in `path`, the `include` func
actually evaluates `mapexpr(expr)`. If it is omitted, `mapexpr` defaults to [`identity`](@ref).

Use [`Base.include`](@ref) to evaluate a file into another module.

!!! compat "Julia 1.5"
Julia 1.5 is required for passing the `mapexpr` argument.
"""
MainInclude.include

Expand Down
6 changes: 6 additions & 0 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,9 @@ Like [`include`](@ref), except reads code from the given string rather than from
The optional first argument `mapexpr` can be used to transform the included code before
it is evaluated: for each parsed expression `expr` in `code`, the `include_string` function
actually evaluates `mapexpr(expr)`. If it is omitted, `mapexpr` defaults to [`identity`](@ref).

!!! compat "Julia 1.5"
Julia 1.5 is required for passing the `mapexpr` argument.
"""
function include_string(mapexpr::Function, mod::Module, code::AbstractString,
filename::AbstractString="string")
Expand Down Expand Up @@ -1131,6 +1134,9 @@ interactively, or to combine files in packages that are broken into multiple sou
The optional first argument `mapexpr` can be used to transform the included code before
it is evaluated: for each parsed expression `expr` in `path`, the `include` function
actually evaluates `mapexpr(expr)`. If it is omitted, `mapexpr` defaults to [`identity`](@ref).

!!! compat "Julia 1.5"
Julia 1.5 is required for passing the `mapexpr` argument.
"""
Base.include # defined in Base.jl

Expand Down