From 7d40cf10de46bda418b0fcb10fe8028532b80b9b Mon Sep 17 00:00:00 2001 From: KronosTheLate <61620837+KronosTheLate@users.noreply.github.com> Date: Tue, 2 Aug 2022 19:19:36 +0200 Subject: [PATCH] Make more explicit the contents of `./.vscode/JuliaSysimage.toml` I am missing a lot of detail in the explanation for how to add a script to be run in the automated sysimage creation. This PR contains my best guess as to the answers I am looking for in order to demonstrate what I mean. The intention is for someone who knows the answers to correct me ^_^ --- docs/src/userguide/compilesysimage.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/src/userguide/compilesysimage.md b/docs/src/userguide/compilesysimage.md index 99656dc5..e9cd3322 100644 --- a/docs/src/userguide/compilesysimage.md +++ b/docs/src/userguide/compilesysimage.md @@ -16,14 +16,18 @@ This file should be named `./.vscode/JuliaSysimage.toml` and be placed under the ``` [sysimage] -exclude=[] # Additional packages to be exlucded in the system image -statements_files=[] # Precompile statements files to be used, relative to the project folder -execution_files=[] # Precompile execution files to be used, relative to the project folder +exclude=["Pkg1", "Pkg2"] # Additional packages to be exlucded in the system image +statements_files=["relative/path/to/precompile_statements_file.jl", ] +execution_files="relative/path/to/precompile_excecution_file.jl" ``` +The packages to be excluded have to be seperated by commas, each with quotation marks and all inside square brackets. +The path should be relative to the currently active folder, which can be selected by the command `File: Open Folder...`. The statement or excecution files can be given as a single relative path, or as a list of relative paths. + +The statement files should contain precompile statements of the form `precompile(Tuple{typeof(Base.sin), Float64})`, and the excecution files should contain function calls for which the methods should be compiled. The build task creates a sysimage that includes all packages in the current Julia environment. This sysimage is saved in the same folder where the `Project.toml` and `Manifest.toml` of the current Julia environment are stored. The name of the sysimage file will be `JuliaSysimage.dll` (Windows) or `JuliaSysimage.so`. ## Using custom sysimages When the Julia extension starts a new Julia REPL process, the extension first looks for a custom sysimage file for the current Julia environment. The extension then verifies whether the custom sysimage file is up to date by comparing the last modified date of the sysimage file to the last modified date of the `Manifest.toml` file. If an up to date sysimage file exists, the Julia extension automatically starts the Julia REPL process with the custom sysimage loaded. -This requires the `useCustomSysimage` field to be set to `true` in the application settings of the extension. \ No newline at end of file +This requires the `useCustomSysimage` field to be set to `true` in the application settings of the extension.