Custom sysimage for julia extension for vscode

I’m trying to get the custom sysimage feature to work. In the v0.12.0 beta relase notes (this is the only thing that comes up when I search for custom sysimage on the vscode extension topic) davidanthoff says:

“Overall this makes for a pretty smooth workflow: you can easily, with one command, compile a custom sysimage for a julia environment, and then any REPLs you start with that active environment will automatically use that sysimage.”

I’ve added “julia.useCustomSysimage”: true, to my settings.json file but this by itself does not get the sysimage compiled. What is the one command you are supposed to execute to make this happen? I looked in the command palete menu for everything beginning with Julia: and didn’t see anything that looked relevant.

2 Likes

Paging @davidanthoff

You have to:

ctrl-shift-P (to get the command console) -> Tasks: run build task -> Julia: Build custom sysimage....

and wait until sysimage gets compiled in background.
During next vscode start the sysimage should be loaded automatically.

3 Likes

phlavenk’s suggestion worked beautifully. The only thing I would add is to make sure that Revise has been added to your root Julia environment. Probably should have this anyway but I didn’t and got an error message when I tried to load the sysimage.

It is so great not to wait over a minute for my packages to load every time I restart the REPL. Essentially instant now. Fabulous feature.

2 Likes

@phlavenk
If I have my own generated and custom sysimage for a specific project only sysimage_plots_precompile.dylib, and I want to add it into the tasks.json. What is the command for that to be included?