From dea563685a1da4770c38e1878118636ee7b9b253 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 4 Jul 2026 18:09:20 +0900 Subject: feat(config): use shirabe-branded default home/cache/data dirs Avoid colliding with an existing Composer installation on the same machine by defaulting COMPOSER_HOME/CACHE_DIR/DATA_DIR paths to shirabe/Shirabe instead of composer/Composer, while keeping the env var names, composer.json/lock, and vendor/composer/ unchanged for ecosystem compatibility. --- docs/known-incompatibilities.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'docs') diff --git a/docs/known-incompatibilities.md b/docs/known-incompatibilities.md index 6f043ca..7b9b685 100644 --- a/docs/known-incompatibilities.md +++ b/docs/known-incompatibilities.md @@ -7,3 +7,26 @@ NOTE: This is not an exhaustive list. Shirabe is in early development and there Error messages, in particular those from PHP built-in functions, are not intended to be mapped exactly. Plugins or external tools that rely on error messages may break. + + +## Default Home/Cache/Data Directories + +To avoid conflicting with an existing Composer installation, Shirabe's default system directories +use `shirabe`/`Shirabe` instead of `composer`/`Composer`. + +| Purpose | OS | Composer default | Shirabe default | +| --------- | ------------- | ------------------------------- | ------------------------------ | +| Home dir | Unix, XDG | `$XDG_CONFIG_HOME/composer` | `$XDG_CONFIG_HOME/shirabe` | +| Home dir | Unix, non-XDG | `$HOME/.composer` | `$HOME/.shirabe` | +| Home dir | Windows | `%APPDATA%/Composer` | `%APPDATA%/Shirabe` | +| Cache dir | Unix, XDG | `$XDG_CACHE_HOME/composer` | `$XDG_CACHE_HOME/shirabe` | +| Cache dir | macOS | `$HOME/Library/Caches/composer` | `$HOME/Library/Caches/shirabe` | +| Cache dir | Windows | `%LOCALAPPDATA%/Composer` | `%LOCALAPPDATA%/Shirabe` | +| Data dir | Unix, XDG | `$XDG_DATA_HOME/composer` | `$XDG_DATA_HOME/shirabe` | + +The following are intentionally left unchanged for ecosystem compatibility: + +* `composer.json` and `composer.lock` +* `vendor/composer/` directory + +TODO: a CLI flag or an environment variable to force Shirabe to use compatible paths. -- cgit v1.3.1