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

Consider using XDG directory structure for cabal in CI #8855

Open
ulysses4ever opened this issue Mar 15, 2023 · 4 comments
Open

Consider using XDG directory structure for cabal in CI #8855

ulysses4ever opened this issue Mar 15, 2023 · 4 comments
Labels
continuous-integration re: xdg Concerning the XDG directory structure type: discussion

Comments

@ulysses4ever
Copy link
Collaborator

ulysses4ever commented Mar 15, 2023

As discussed in #8840, due to caching, our CI is probably stuck with ~/.cabal currently. It may be a good idea to wipe the cache and see where it brings us. Also, maybe it makes sense to add some diagnostics in the CI to make it more clear which setup we use (legacy or XDG).

As we’re using setup-haskell action, this is related:

@andreasabel
Copy link
Member

Can cabal tell me where it likes to store stuff? Something like stack path.

$ stack path --stack-root
~/.stack

@mouse07410
Copy link
Collaborator

Can cabal tell me where it likes to store stuff? Something like stack path.


$ stack path --stack-root

~/.stack

I strongly support this.

@ulysses4ever
Copy link
Collaborator Author

Well, there's a simple/ish algorithm written out in https://cabal.readthedocs.io/en/3.10/config.html#directories:

Unless the CABAL_DIR environment variable is set or a ~/.cabal directory exists, Cabal will by default store data in directories according to the XDG Base Directory Specification.
...
$XDG_STATE_HOME/cabal for compiled libraries and other stateful artifacts, including the Cabal store.

But perhaps it would be handy to have such an interface to query cabal...

@andreasabel
Copy link
Member

But perhaps it would be handy to have such an interface to query cabal...

Yes, indeed, otherwise each tool around cabal has to duplicate this logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous-integration re: xdg Concerning the XDG directory structure type: discussion
Projects
None yet
Development

No branches or pull requests

3 participants