Skip to content

RFC: remove deprecation about __precompile__(true) #28459

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

Merged
merged 1 commit into from
Aug 6, 2018
Merged
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
8 changes: 3 additions & 5 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -769,16 +769,14 @@ precompilableerror(@nospecialize ex) = false

# Call __precompile__(false) at the top of a tile prevent it from being precompiled (false)
"""
__precompile__(false)
__precompile__(isprecompilable::Bool)

Specify that the file calling this function is not precompilable.
Specify whether the file calling this function is precompilable, defaulting to `true`.
If a module or file is *not* safely precompilable, it should call `__precompile__(false)` in
order to throw an error if Julia attempts to precompile it.
"""
@noinline function __precompile__(isprecompilable::Bool=true)
if isprecompilable
depwarn("__precompile__() is now the default", :__precompile__)
elseif 0 != ccall(:jl_generating_output, Cint, ())
if !isprecompilable && ccall(:jl_generating_output, Cint, ()) != 0
throw(PrecompilableError())
end
nothing
Expand Down