Makie.jl precompilation: how to launch

Followed Makie.jl precompilation instructions and managed to create a system image file: (275 MB). However, do not know how to launch Julia with recommended julia -J ./ command line instruction. Sorry for this basic question and thanks for simple advice.
PS: I am running VS Code on Windows 10.

1 Like

I think this is more of a VSCode question than a Makie question, so I changed the category so hopefully it will get spotted easier by those who know the answer.

1 Like

In VSCode, go to
File > Preferences > Settings. There, Extensions > Julia > Additional Args > Edit in settings.json
There, insert an argument like

    "julia.additionalArgs": [
1 Like

Thank you for the very clear instructions. Unfortunately, this failed to launch Julia REPL with error message as follows:
The terminal process "C:\Users\jguerra5\AppData\Local\Programs\Julia 1.5.0\bin\julia.exe '-i', '--banner=no', '--project=C:\Users\jguerra5\.julia\environments\v1.5', '-J C:\CODE\Julia\VS_Code_ide\VS_Code_Example\', 'c:\Users\jguerra5\.vscode\extensions\julialang.language-julia-1.0.6\scripts\terminalserver\terminalserver.jl', '\\.\pipe\vsc-julia-repl-25020', '\\.\pipe\vsc-jl-cr-25020', 'USE_REVISE=true', 'USE_PLOTPANE=true', 'DEBUG_MODE=undefined'" failed to launch (exit code: 1).

I am not sure what happened there.
Can you start julia with the system image from the command line?
C:\Users\jguerra5\AppData\Local\Programs\Julia 1.5.0\bin\julia.exe -J"C:\CODE\Julia\VS_Code_ide\VS_Code_Example\"

1 Like

From Windows 10 command prompt, Julia can be launched with the argument -J"C:\CODE\Julia\VS_Code_ide\VS_Code_Example\".
However, did not manage to pass this through VS Code “settings.json”. Possibly doing some syntax mistake here. Will try again tomorrow. Thanks again.

Fyi, tried different escape sequences for the windows command/path in json settings but the only thing that worked used davidanthoff’s workaround posted in vscode_issues_1006 to pass commands with multiple arguments:

"julia.additionalArgs": [
        "-J", "C:\\CODE\\Julia\\VS_Code_ide\\VS_Code_Example\\"

Makie’s plot appeared much faster when running Julia code afterwards.
It required as per Makie.jl instructions to add the following line of code after ‘using Makie’:

AbstractPlotting.__init__()   # if Makie displays not working after compilation

Thank you! This exactly solved my problem! Another way to make it work is “-J=C:\CODE\Julia\VS_Code_ide\VS_Code_Example\”. This is essentially related to how to address the space in scripts.