Comments (12)
@diegozea I think I solved it in IPython.jl master.
@KristofferC It would be nice if Base
has afterreplinit
(or something) to wrap what Pkg.jl is doing:
"""
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
from packagecompiler.jl.
I wonder if that's expected, since they're fairly dynamic. @KristofferC, you should know REPL modes pretty well, any ideas?
from packagecompiler.jl.
In Pkg3, we set up the REPL as https://github.com/JuliaLang/Pkg3.jl/blob/bd3802f3738c834f44ccb2d354b2befb0cea4234/src/Pkg3.jl#L55-L66 in __init__
. Not sure how RCall does it.
from packagecompiler.jl.
I think @randy3k will have a better idea of how RCall
does it.
from packagecompiler.jl.
RCall uses this to setup the REPL, I got the idea from @Keno's Cxx.jl, so I assume I was correct...
from packagecompiler.jl.
@diegozea how about initializing the REPL manually?
RCall.RPrompt.repl_init(Base.active_repl)
from packagecompiler.jl.
I think you need to handle the case when the REPL is not yet inited but the package gets loaded.
from packagecompiler.jl.
Is there any hook we could use to load the repl code when the repl is ready?
from packagecompiler.jl.
Not a PackageCompiler bug, the package needs to be more robust in how the REPL is started like described in #68 (comment)
from packagecompiler.jl.
Can julia
runtime help individual packages to solve this problem? I think the way Pkg "solving" this touches too much implementation details of the julia
runtime (including the REPL
stdlib). I think we need an appropriate hook to cleanly solve this: JuliaLang/julia#29896
from packagecompiler.jl.
Yes, Julia could very well facilitate this. Point here is that it isn't a PackageCompiler issue.
from packagecompiler.jl.
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.
from packagecompiler.jl.
Related Issues (20)
- Add tests for 1.9, 1.10-nightly
- Not bundle common libraries (e.g. for LLVM and C++) by default HOT 2
- macOS: can not build app on macOS reporting `System image file failed consistency check` HOT 2
- Dropping more libraries
- compiling app using v2.1.10 on Windows requires Admin privileges HOT 11
- Add option to log which statement is being precompiled
- Can we pack the entire main environment into exe?
- unable to create app
- Required TOML.jl HOT 27
- Best practices for cross-platform relocatable app? HOT 3
- include julia.h with shared libraries HOT 5
- create_app crashes with 'Error: export ordinal too large: 73406' on Julia v1.10-rc1 HOT 2
- Wrong return for supertype() in functions for compiled sysimage with option--strip-ir HOT 3
- GPUCompiler problems.
- Issue: intermediate .o files are generated in improper place
- UndefRefError in docker image HOT 2
- IOError: symlink("libLLVM-14jl.so", "App/lib/julia/libLLVM.so"): operation not supported on socket (ENOTSUP)
- Can't the JULIA_DEPOT_PATH be changed in apps?
- Package Compiler Fails on Julia v1.10 HOT 1
- Error in PackageCompiler.jl with Test.jl and `filter_stdlibs = true` in Julia 1.10 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packagecompiler.jl.