yet's internal/store now resolves Home/CacheHome/BinDir via
core/paths (Application{Name: "yet", Kind: core.CLI}) instead of its
own $YETANO_HOME/os.UserConfigDir() logic, split across three
independently overridable categories. See yetano.dev/yetano/yet's
own commit for the actual migration and its new --system scope flag.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4.7 KiB
4.7 KiB
TODO / open architecture questions
Deliberately not resolved in this V1 (see spec section 63 and AGENTS.md's "no over-abstraction" rule) -- tracked here rather than solved speculatively.
Migration
- Migrate
yetontocore/paths/core/config.internal/configalready usedcore/config/core/paths(sharedApplication{Name: "yetano"}).internal/store's own$YETANO_HOME(formerlyos.UserConfigDir()/yetano, one monolithic root) has now been split across three independently overridablecore/pathscategories forApplication{Name: "yet", Kind: core.CLI}:store.Home()(DataDir; store/packages/profiles/sources/credentials/trust-policy/deployments/ share-lib-etc),store.CacheHome()(CacheDir; the blob cache), andstore.BinDir()(BinDir; managed command entrypoints, shared across every Yetano application). This is a deliberate default-path and env-var-shape change ($YETANO_HOMEno longer exists; seeYET_DATA_HOME/YETANO_DATA_HOME,YET_CACHE_HOME/YETANO_CACHE_HOME,YET_BIN_HOME/YETANO_BIN_HOMEinstead) -- existing installations are not migrated (seeyet'sdocs/install-store-and-profiles.md). - Once
yetmigrates, evaluateyasta,yamocir,yaiam, andyalsh-adjacent projects the same way (per the original task description) -- each on its own merits, not as a blanket sweep.
Platform tuning
- FreeBSD's flavor (
freebsd.go) is a best-effort first pass. Other BSD and Unix-familyGOOSvalues (openbsd,netbsd,dragonfly,solaris,illumos, ...) currently fall back to the Linux flavor (flavor()'s default case) -- verified to compile and behave sensibly, not verified against each OS's actual convention. Adding a dedicated flavor table for one of them is a small, additive change (a new<os>.gofile plus onecaseinflavor()), never a redesign. - macOS Desktop's
RuntimeDir()(~/Library/Application Support/<App>/Runtime) is a placeholder -- macOS has no strong native convention for a GUI app's ephemeral runtime directory the way XDG_RUNTIME_DIR does on Linux. Revisit if a real Desktop consumer needs something more specific (e.g. aTemporaryItems-based location). LogAliasDir()(spec section 39:~/.local/log/<app>as a Unix convenience symlink target) is resolved but never created -- no symlink-creation API exists yet. Decide whether this is worth adding before any consumer actually wants it.
Windows
- BinDir / installer strategy.
paths.BinDir()for Windows resolves%LOCALAPPDATA%\Yetano\bin(user) /%PROGRAMDATA%\Yetano\bin(system) as locations, per spec section 19. Whether/howyetactually adds either toPATH, and how a package gets "activated" there (symlink vs. junction vs. copy/shim launcher, spec section 20) is explicitly out of scope forcore-- path resolution and package activation stay separate concerns (spec section 20's own instruction). - The native
SHGetKnownFolderPathfallback inknownfolders_windows.gohas only been verified to compile (GOOS=windows go build/go vet), never run on an actual Windows host. It is a secondary fallback below environment variables, so a latent bug there would only matter in the edge case whereAPPDATA/LOCALAPPDATA/PROGRAMDATAare all unset in the process environment on real Windows.
Portability / distribution model
paths.WithRoot/YETANO_HOME-style portable mode:WithRootexists and is tested, but there is no ecosystem-wide "portable install" concept wired up yet (spec section 41's "optional later:YETANO_HOMEor portable mode").- The future
yetpackage store model (spec sections 2/37/38: package store vs. application data vs. config vs. state vs. cache vs. runtime vs. executables, as distinct concepts) is intentionally not implemented here --core/pathsonly provides the primitives (scoped, prioritized directories) a future store implementation would sit on top of. - Plugin/extension search paths: no dedicated category exists yet;
paths.FindFileis generic enough that a caller can build one today (e.g. overDataSearchDirs()with aplugins/suffix) without needing a newPathKind. - Atomic package activation, versioning/rollback for that future store: out of scope, same as above.
Central Yetano config
config.WithYetanoDefaults(true)resolves the shared~/.config/yetano/(or platform equivalent) via a pseudo-Application {Name: "yetano", Kind: core.CLI}. This is deliberately always CLI-shaped (XDG-flavored everywhere), even for a Desktop or Service caller, since it's a shared, admin/CLI-facing location -- revisit only if a real consumer needs the shared config to follow a different convention on macOS/Windows Desktop apps specifically.