Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use XDG Base Directory Specification #2092

Open
half-duplex opened this issue Jun 8, 2021 · 3 comments
Open

Use XDG Base Directory Specification #2092

half-duplex opened this issue Jun 8, 2021 · 3 comments

Comments

@half-duplex
Copy link
Member

half-duplex commented Jun 8, 2021

The problem

Sopel currently places its configuration, data, and cache in ~/.sopel. This clutters up users' home directories.

The solution

Follow the XDG Base Directory Specification, at minimum defaulting to $XDG_CONFIG_HOME (e.g. ~/.config/sopel), and ideally using $XDG_DATA_HOME (e.g. ~/.local/share/sopel) and $XDG_CACHE_HOME (e.g. ~/.cache/sopel) as appropriate.

@SnoopJ
Copy link
Contributor

SnoopJ commented Dec 30, 2022

The specification can be quite tricky to follow with a DIY approach, but I can speak very highly for the single-file (i.e. easy to vendor) library appdirs for this purpose. It also has reasonable behaviors on MacOS and Windows where the spec makes a bit less sense. There's also platformdirs which is a fork with more activity, although it is a little harder to vendor.

I had a quick poke around in Sopel's guts for where the current default configuration comes from but came away a little cross-eyed, so I'm not sure exactly where the relevant changes would go.

@Exirel
Copy link
Contributor

Exirel commented Mar 3, 2023

I really like the idea of following XDG specification. However, with more than 160 PRs already merged for the 8.0.0 milestone, I don't think it's a good idea to implement that change in this version.

Maybe we can think about it in 8.1.0 with an initial approach that is fully backward compatible, and start a full migration y Sopel 9?

@dgw dgw modified the milestones: 8.0.0, 8.1.0 Mar 3, 2023
@dgw
Copy link
Member

dgw commented Mar 3, 2023

Might get bumped again to 9.0, but yeah. You had the same thought as I did last time I went through the issue list for 8.0 so let's delay it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants