Managed runtime env for registry/app-installed extensions (exposure #2) #65
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kahliburke/Kaimon.jl!65
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/extension-managed-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Stacks on top of #61. Together these fix a fresh
pkg> app add Kaimon+app add <extension>install so the extension boots end-to-end. The two failures are independent:using Kaimonfails — the extension'sJULIA_LOAD_PATHcarries the manifest-lesspkgdir(Kaimon). Fixed by #61 (put Kaimon's active, manifest-bearing env on the load path).using <ExtensionModule>fails — this PR. The extension is launched with--project=<pkgdir(extension)>, which for a registry/app install is a manifest-less, write-protected depot dir. Its deps can't resolve, and the boot script'sPkg.resolvedies withPermission denied.This is the "Related" caveat #61 flagged, and it's really a Kaimon-side responsibility (Kaimon owns how the extension subprocess is launched), so it's fixed for all extensions with no changes required in the extension package.
Fix
Kaimon maintains a writable, instantiated environment per extension at
~/.julia/environments/kaimon-ext/<namespace>: itPkg.develops the package from its source dir and installs its deps, then launches--projectthere.Project.tomlmtime).Pkg.activatein the running Kaimon process) with auto-precompile disabled (precompiling a packagedeveloped from a read-only depot dir is flaky; the extension precompiles on its ownusing).project_path(a managed env means--project!= the registered path).Testing
_project_has_manifest,_extension_env_dir,_extension_env_fingerprint, and the_ensure_extension_runtime_projectdev-checkout short-circuit. Extension suite: 53/53.app add Kaimon+app add KaimonSlate:using Kaimon(the #61 bug)using KaimonSlate(exposure #2)