dmolina / DaemonMode.jl

Client-Daemon workflow to run faster scripts in Julia
MIT License
275 stars 16 forks source link

"DaemonMode::end" emitted when built into a sysimage #60

Open tecosaur opened 1 year ago

tecosaur commented 1 year ago

I just tried using DaemonMode with a sysimage, however I find that DaemonMode::end is emitted and the client process doesn't exit.

Sysimage construction

~$ julia --startup-file=no -e 'using PackageCompiler; PackageCompiler.create_sysimage([:DaemonMode]; sysimage_path="/home/tec/.local/lib/julia_daemon.so", project="/home/tec/.julia/config/sysimages/daemon_project", incremental=false, filter_stdlibs=true)'

daemon_project is just a project directory with just DaemonMode added.

Trying the client

~$ /home/tec/.julia/juliaup/bin/julia --sysimage=/home/tec/.local/lib/julia_daemon.so --startup-file=no -e "using DaemonMode; runargs()" /tmp/test.jl
Hello world
DaemonMode::end

At this point the process just sits there, if I ^C I then see: Error, cannot connect with server. Is it running?

dmolina commented 1 year ago

One question, the problem only happen when you are using the sysimage?

tecosaur commented 1 year ago

Indeed.