rakudo
rakudo copied to clipboard
Rakudo Should Follow the XDG Base Directory Specification
The Problem
Rakudo should not place dot files or directories directly in the root of $HOME
unless specified. Doing so violates the XDG Base Directory Specification. Yes, I've seen the XKCD comic about standards... while not 100% universal, XDG adoption is widespread.
Expected Behavior
Rakudo should respect the XDG Base Directory Specification. Unless I'm misunderstanding the spec, Rakudo should most likely use $XDG_STATE_HOME/raku
for this purpose with fallback to $HOME/.local/state/raku
.
Actual Behavior
Currently Rakudo drops several things into $HOME/.raku
. The directory is created the first time Rakduo is run and there is no way for the user to override this behavior. I was informed over IRC that this file system location is hard coded in CompUnit::RepositoryRegistry
at line 174.
Steps to Reproduce
raku -e 'say "foo"'
if [ -d "$HOME/.raku" ]; then echo "True"; fi # True
Environment
- Operating system: Linux.
- Compiler version (
rakudo -v
orraku -v
):
raku -v
Welcome to Rakudoâ„¢ v2024.07.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2024.07.
Tangential to #2984.