Registered extension project_path is manifest-less for registry installs, so the extension can't boot #62
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#62
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
register_extension()defaultsproject_pathtopkgdir(KaimonSlate). For a registry install (pkg> app add KaimonSlate) that's the depot package dir (~/.julia/packages/KaimonSlate/<slug>): it containsProject.tomlandkaimon.toml, but noManifest.toml, and Pkg write-protects it.Kaimon spawns the extension with
--project=<project_path>, and the boot script'sPkg.resolve()tries to repair the environment — but it can't write a manifest into the protected depot dir (SystemError: opening file ".../Project.toml": Permission deniedwhen attempted manually), sousing KaimonSlatefails to resolve the package's deps and the extension crash-loops.This works for dev checkouts (instantiated project in place), but not for the documented
app addinstall path.Workaround that got me running: copy
pkgdir(KaimonSlate)to a writable directory,Pkg.add("Kaimon")+Pkg.instantiate()there, andregister_extension(force=true, project_path=<copy>).Possible directions: have Kaimon materialize a managed, instantiated environment per extension (e.g. under its cache dir) with the extension package added to it, keeping
kaimon.tomldiscovery at the package dir; or haveregister_extension()build such an env at registration time. Happy to contribute a PR once there's a preferred design.Related: #61 fixes the same manifest problem for the Kaimon entry on the extension's load path.
Fixed by #65 (merged to
main, shipping in v2.0.8).Kaimon now does exactly the managed-environment approach you proposed: on spawn, a registry/app-installed extension (manifest-less
project_path) gets a Kaimon-managed, instantiated environment at~/.julia/environments/kaimon-ext/<namespace>— KaimonPkg.develops the package from its source dir and installs its deps there, then launches--projectagainst it, whilekaimon.tomldiscovery stays at the package dir. Built once, cached, rebuilt when the source changes. Dev checkouts with their own manifest are launched as-is, unchanged.Combined with #61 (which puts Kaimon's active env on the extension load path so
using Kaimonresolves), a cleanapp add Kaimon+app add <extension>now boots the extension end-to-end. Verified live withapp add KaimonSlate.Thanks for the sharp diagnosis and the design suggestion — it's essentially what shipped.