-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Add sysimage autoload mechanism
This is the second part of the plan described in #40414 (though complimentary to the PR itself). In particular, this PR makes it possible to quickly replace a system image during initial startup. This is done by adding a hook early in the startup sequence (after the system image, but before any dependent libraries are initialized) for Julia to look at the specified project file and decide to load a different sysimage instead. In the current version of the PR, this works as following: - If the `--autoload` argument is specified, julia will hash the contents of the currently active project's manifest path. - If a corresponding .so is found in `~/.julia/sysimages`, it will load that sysimage instead. - If not, loading will proceed as usual, a warning is generated but before any user code is run, Julia will `require` any dependencies specified in the Project.toml. The third point is there such that independent of whether or not the system image is found, the environment upon transfer of control to the user is always the same (e.g. a package may have type-pirated a method, which is available independent of whether the user ever explicitly did `using`). This is highly incomplete. In particular, these scheme to find the system image needs to take account of preferences and should probably exlcude any packages that are `dev`'ed (or their dependents). I'm not sure I'll have the time to get around to finishing this, but I'm hoping somebody else would be willing to jump in for that part. The underlying mechanism seems to work fine at this point, so this work should be mostly confined to loading.jl.
- Loading branch information
Showing
13 changed files
with
196 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters