Skip to content

feat(install): align all installers on platformdirs.user_data_dir#21

Merged
ccomb merged 1 commit intomainfrom
install-location
May 3, 2026
Merged

feat(install): align all installers on platformdirs.user_data_dir#21
ccomb merged 1 commit intomainfrom
install-location

Conversation

@ccomb
Copy link
Copy Markdown
Owner

@ccomb ccomb commented May 2, 2026

Summary

  • All three installers (install.sh, install.ps1, pyvolca.download()) now write to the same OS-native root, so running any one of them populates the directory the others read.
  • macOS path moves from the hardcoded XDG layout to ~/Library/Application Support/volca/ (matches platformdirs); Linux + Windows defaults are unchanged.
  • VOLCA_PREFIXVOLCA_HOME (single full-path override).
  • pyvolca: _cache_root/cached_* renamed to _install_root/installed_* (the location is no longer a cache — a cache cleaner silently wiping the engine binary is a footgun); installed_binary() gains a semver-scan fallback so Server() finds engines installed by install.sh/install.ps1, which don't write latest.json.
Platform Resolved root
Linux ${XDG_DATA_HOME:-~/.local/share}/volca/
macOS ~/Library/Application Support/volca/
Windows %LOCALAPPDATA%\volca\

Migration: pre-0.4 users can rm -rf ~/.cache/pyvolca/ (Linux) — that location is no longer read.

Test plan

  • pytest tests/test_download.py — 22 tests, all green (5 new for _install_root + scan fallback)
  • Full pyvolca unit suite (test_download + test_drift + test_dispatch) — 49 passed, 2 skipped
  • Linux: install.sh resolves SHARE_DIR correctly for default, VOLCA_HOME=…, and XDG_DATA_HOME=…
  • Linux: pyvolca installed_binary() finds an install.sh-shaped layout (no latest.json) via the semver scan
  • macOS arm64: validate install.sh writes to ~/Library/Application Support/volca/ and pyvolca lands in the same dir (Mac mini build host)
  • Windows: smoke CI matrix — install.ps1 and pyvolca.download() both write to %LOCALAPPDATA%\volca\

install.sh, install.ps1, and pyvolca.download() now share the same OS-native
install root, so any of the three populates the same directory:

  Linux:   ${XDG_DATA_HOME:-~/.local/share}/volca/
  macOS:   ~/Library/Application Support/volca/   (was hardcoded XDG)
  Windows: %LOCALAPPDATA%\volca\

VOLCA_PREFIX is replaced by VOLCA_HOME (full-path override). The old prefix
had divergent semantics across platforms — POSIX appended /share/volca,
Windows used it directly — so a single full-path override is clearer.

pyvolca's _cache_root / cached_binary / cached_data_dir are renamed to
_install_root / installed_binary / installed_data_dir: the location is no
longer a cache, and "cache cleaner silently wipes the engine binary" is a
footgun. installed_binary() also gains a semver-scan fallback so Server()
finds engines installed via install.sh / install.ps1, which don't write
latest.json.
@ccomb ccomb merged commit ae6a6c1 into main May 3, 2026
5 checks passed
@ccomb ccomb deleted the install-location branch May 3, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant