haskell / haskell/cabal

Should CABAL_DIR really be dropped in the future?

Open
#7,455 20 comments 4 reactions 0 assignees View on GitHub
documentation re: xdg
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

There was a [recent question](https://stackoverflow.com/questions/68079550/clean-installation-of-haskell-onto-a-windows-10-machine) in Stack Overflow, dealing with how to put the files related to Cabal in a non-standard folder. That question has a pretty straightforward solution which consists in setting the [`CABAL_DIR`](https://cabal.readthedocs.io/en/3.4/installing-packages.html?highlight=CABAL_DIR#environment-variables) environment variable. Once set, the configuration, the store and other cabal content will be contained in the folder `CABAL_DIR` points to.

However the user guide [says the following](https://cabal.readthedocs.io/en/3.4/installing-packages.html?highlight=CABAL_DIR#environment-variables):

> The CABAL_DIR might be dropped in the future, when cabal-install starts to use XDG Directory specification.

Following the XDG specification is a good idea, but should it require abandoning `CABAL_DIR`? That would forgo some versatility.

A good compromise could be following `CABAL_DIR` if defined, and follow the XDG specification otherwise. Alternatively, perhaps the burden of maintaining both options is not worth it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.