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

Support cabal-install >= 3.10 config file/index locations #2

Open
sternenseemann opened this issue Dec 31, 2024 · 3 comments
Open

Support cabal-install >= 3.10 config file/index locations #2

sternenseemann opened this issue Dec 31, 2024 · 3 comments

Comments

@sternenseemann
Copy link

See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.1.0.md#significant-changes, the config (and index state) can be in XDG style directories instead of ~/.cabal now. The relevant code is implemented upstream in Distribution.Client.Config and is relatively easy to vendor/copy over, e.g. for the state dir.

@Bodigrim
Copy link
Owner

We use cabal-install-parsers to retrieve Cabal config:

cnf <- readConfig

So it depends on haskell-CI/haskell-ci#655 being resolved, but there seem to be compications regarding priority if both paths contain Cabal configs.

For the purposes of hackage-revdeps, we can look for Cabal configs in both locations, look for cfgRepoIndex in all of them and select one with the largest file size. A PR is welcome.

@sternenseemann
Copy link
Author

Okay, so per that issue manually setting CABAL_CONFIG can be used to work around the problem if you have everything in the xdg locations?

@Bodigrim
Copy link
Owner

I think so, but I have not tried.

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

No branches or pull requests

2 participants