Update ~/.slime to use $XDG_DATA_HOME by ron-at-swgy · Pull Request #787 · slime/slime

This commit updates the `~/.slime` references in `Makefile` and
`swank-loader.lisp` to check for XDG_DATA_HOME. If the environment
variable is set, it uses $XDG_DATA_HOME/slime as the default fasl
directory.

This change is necessary as there is no way to avoid creation of
"~/.slime" when loading a system that requires Swank. My personal
example is trying to port a Clack application to OpenBSD. The OpenBSD
build system does not allow writing to home directories as part
of the build process.

Prior to these changes, I tried using asdf:defsystem-depends-on,
asdf:around-compile, and use of a secondary system to only load
swank.

added 2 commits

August 5, 2023 22:58
If the XDG_DATA_HOME environment variable is unset, it is still
returned as truthy from `uiop:getenv`. This commit explicitly checks
that the entry returned has more than zero characters. Function now
operates as intended.

Ron Dahlgren and others added 2 commits

August 6, 2023 13:55
This commit changes the environment variable that is read from
XDG_DATA_HOME to SLIME_HOME_DIR. If this variable is set, and
non-empty, then it will be used rather than `~/.slime`.

brsvh added a commit to brsvh/slime that referenced this pull request

Jan 6, 2025
Support an environment variable named SLIME_HOME to specify the
storage location for data files, currently FASL files.

Since FASL files are generated during compilation, we utilize
XDG_DATA_HOME.

The priority for determining the effective location is as follows:

 1. $SLIME_HOME
 2. $XDG_CACHE_HOME/slime
 3. $HOME/.slime (~/.slime)

This is the subsequent work of slime#610 and slime#787.

Signed-off-by: Burgess Chang <bsc@brsvh.org>

brsvh added a commit to brsvh/slime that referenced this pull request

Jan 8, 2025
Support an environment variable named SLIME_HOME to specify the
storage location for data files, currently FASL files.

Since FASL files are generated during compilation, we utilize
XDG_DATA_HOME.

The priority for determining the effective location is as follows:

 1. $SLIME_HOME
 2. $XDG_CACHE_HOME/slime
 3. $HOME/.slime (~/.slime)

This is the subsequent work of slime#610 and slime#787.

Signed-off-by: Burgess Chang <bsc@brsvh.org>