Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function Pkg.create_sysimage(package_name="", test_script="", update=true) #3094

Open
ufechner7 opened this issue May 25, 2022 · 4 comments

Comments

@ufechner7
Copy link
Contributor

Feature request

There should be a standard method to create a system image. Of course there are many options and it is not so clear how to implement this feature in a general way. My suggestion:

  1. this function should check of a local environment is activated and abort if not
  2. if a package name is provided, it should:
    2.1 update all packages of the local environment if the parameter update is true
    2.1 precompile all packages
    2.2 install the package PackageCompiler
    2.3 create a folder bin if it doesn't exist
    2.4 copy the files "create_sysimage.sh", "create_sysimage.bat", "run_julia.sh" and "run_julia.bat" from bin folder of the package package_name to a local bin folder
    2.5 create a folder test if it doesn't exist
    2.6 copy the files "test_for_precompile.jl" and "create_sysimage.jl" from the package "package_name" into the test folder
    2.7 execute the script "bin/create_sysimage.sh" or "bin/create_sysimage.bat" depending on the OS
    2.9 terminate with the message:
    "To run Julia with the new sysimage, please add the bin folder to your search path and execute run_julia!"

This would work only for packages that include a create_sysimage.jl and a test_for_precompile.jl script. For packages that are not prepared for this workflow, all packages from the local environment should be included in the sysimage and the test_script that is provided as parameter should be used.

Any comments welcome!

@KristofferC
Copy link
Member

This could be prototyped in a separate package.

@ufechner7
Copy link
Contributor Author

This could be prototyped in a separate package.

Good idea!

@fredrikekre
Copy link
Member

There is an accepted summer project about this: https://summerofcode.withgoogle.com/programs/2022/projects/S62aV5KM

@ufechner7
Copy link
Contributor Author

Good to know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants