-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
REPL modes do not work after compilation #68
Comments
I wonder if that's expected, since they're fairly dynamic. @KristofferC, you should know REPL modes pretty well, any ideas? |
In Pkg3, we set up the REPL as https://github.com/JuliaLang/Pkg3.jl/blob/bd3802f3738c834f44ccb2d354b2befb0cea4234/src/Pkg3.jl#L55-L66 in |
I think @randy3k will have a better idea of how |
@diegozea how about initializing the REPL manually?
|
I think you need to handle the case when the REPL is not yet inited but the package gets loaded. |
Is there any hook we could use to load the repl code when the repl is ready? |
@diegozea I think I solved it in IPython.jl master. @KristofferC It would be nice if """
afterreplinit(f)
Like `atreplinit` but triggers `f` even after REPL is initialized when
it is called. For `LineEditREPL`, it ensures that `interface` is
initialized.
"""
function afterreplinit(f)
if isdefined(Base, :active_repl)
f(Base.active_repl)
else
atreplinit() do repl
if isinteractive() && repl isa REPL.LineEditREPL
isdefined(repl, :interface) || (repl.interface = REPL.setup_interface(repl))
f(repl)
end
end
end
end |
Not a PackageCompiler bug, the package needs to be more robust in how the REPL is started like described in #68 (comment) |
Can |
Yes, Julia could very well facilitate this. Point here is that it isn't a PackageCompiler issue. |
I was commenting just because I was worried that #68 (comment) would be regarded as the official correct solution. I am glad that you acknowledge that there can be a better solution. |
REPL modes from
IPython
andRcall
don't work after the packages are compiled with the stable version ofPackageCompiler
(0.3.1). For example:RCall (compiled) REPL mode doesn't work,
$
should show theR>
prompt:P.S.: Also, I get a lot of
WARNING: redefining constant JULIA_HOME
messages using the compiled image.The text was updated successfully, but these errors were encountered: