feat(install): align all installers on platformdirs.user_data_dir#21
Merged
feat(install): align all installers on platformdirs.user_data_dir#21
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.~/Library/Application Support/volca/(matchesplatformdirs); Linux + Windows defaults are unchanged.VOLCA_PREFIX→VOLCA_HOME(single full-path override)._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 soServer()finds engines installed byinstall.sh/install.ps1, which don't writelatest.json.${XDG_DATA_HOME:-~/.local/share}/volca/~/Library/Application Support/volca/%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)install.shresolvesSHARE_DIRcorrectly for default,VOLCA_HOME=…, andXDG_DATA_HOME=…installed_binary()finds aninstall.sh-shaped layout (nolatest.json) via the semver scaninstall.shwrites to~/Library/Application Support/volca/and pyvolca lands in the same dir (Mac mini build host)install.ps1andpyvolca.download()both write to%LOCALAPPDATA%\volca\