Pkg within compiled app [PackageCompiler]

I think this might be expected behavior. If your precompiled code doesn’t explicitly call Pkg, it won’t be included in the app. The same issue affects lazy loading package, which have to be added manually.

I opened up a related issue some time ago. Since then, I’ve decided to simply use create_sysimage. In fact, if your intention is to create an interactive Julia session with some custom precompiled packages, this is probably the best way to achieve that. You don’t have to create an executable in the first place if all you need are the Julia binaries and a custom sysimage. I’ve written a tutorial on this particular use case of PackageCompiler.

1 Like