Closed nesteiner closed 3 years ago
Can you give me some examples of what you have in mind? Like command-line arguments to the julia
binary?
here you are @gcv
julia --sysimage image-path
hello??
Hello!
Feature added: https://github.com/gcv/julia-snail/commit/93099ac890a1df3bb779dbd308c9208f6eb73411
It's now available in MELPA. Let me know how it goes.
eh, sorry, I fail to install it
I am sure I copy your source code, and use package-install-file
but when runing, it throws
Process vterm exited abnormally with code 1
ERROR: could not open file /home/steiner/.emacs.d/elpa/julia-snail-2020081
0.1941/JuliaSnail.jl
Did you restart Emacs after installing the update?
yes
Sounds like your update is not fully installed. Delete the /home/steiner/.emacs.d/elpa/julia-snail-20200810.1941
directory. Restart Emacs. Run M-x list-packages
to force a refresh of the package archives. Reinstall julia-snail
using either use-package
or (package-install 'julia-snail)
or from the list-packages
interface.
ok, I fix it, but I found precompile package is still slow,
where should I create .dir-local.el
, I create it on current project directory
julia> @time using MLJ
11.185300 seconds (28.34 M allocations: 1.420 GiB, 5.35% gc time)
It’s .dir-locals.el
(s
at the end). In current project directory is correct. Make sure you start julia-snail
while visiting a file in the project. Double check that the value of the variable is set while visiting a file in the project, M-: julia-snail-extra-args
.
If all that checks out, double check that your image works and produces the expected speed up.
I have a bad message for you,
when run
M-: julia-snail-extra-args
, the args is still nil
have you every try julia-snail
with sysimage
option?
can you test with this, here is image
using PackageCompiler
create_sysimage([:MLJ, :Plots, :DataFrames, :RDatasets], sysimage_path = "/home/steiner/julia-images/MLJ.so", precompile_execution_file = "/home/stein
er/julia-images/precompile_mlj.jl")
here is precompile-mlj.jl
shell> cat ~/julia-images/precompile_mlj.jl
import MLJ
import Plots
import DataFrames
import RDatasets
passing extra arguments works for me, e.g. putting
((julia-mode . ((julia-snail-extra-args . ("--project=/PATH/TO/SOME/FOLDER")))))
In the .dir-locals.el
file starts Julia with the environment at /PATH/TO/SOME/FOLDER/
activated.
Did you make sure to kill and re-open the tuning.jl
buffer after updating the .dir-locals.el
(since you wrote that julia-snail-extra-args
is nil
I suspect maybe you didn't)? I think the variables are only read from the .dir-locals.el
upon buffer creation (actually I couldn't find it explicitly stated in the manual, but this is the behavior I see).
I agree with @orialb, it sounds like you're having trouble with .dir-locals.el
. Here's the relevant section of the manual: https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
If you can't get directory local variables to work, try setting the value globally: M-: (setq julia-snail-extra-args "--sysimage /path/to/image")
.
@gcv thank you all for this wonderful project, I think I have better to set args
globally
thank you for your so much time
@gcv hey, I found that set the julia-snail-extra-args
only works when set dir local variable, but not global setting
(use-package julia-snail
:ensure t
:requires vterm
:hook (julia-mode . julia-snail-mode)
:config
(setq julia-snail-extra-args "--sysimage /home/steiner/.julia-images/julia-dev.so"))
(provide 'init-julia)
this is my global setting for julia-snail
, but
I might have made some changes in the way that variable is declared. Try using setq-default
instead and let me know if it works.
oh, shit, I am too careless, I forgot setq-default
. thanks for your help
I have to say, julia-snail is much better than
julia-repl
, but my project uses some big images, I need to load them quickly, how can I startjulia-snail
with some options??