Skip to content

Don't create ~/.cabal if ~/.config/cabal exists #788

@geekosaur

Description

@geekosaur

Your environment

Which OS do you use? Ubuntu 20.04
Which version of GHC do you use and how did you install it? 9.2.5 from ghcup
How is your project built (alternative: link to the project)? https://github.com/geekosaur/xmonad.hs/tree/skkukuk
Which LSP client (editor/plugin) do you use? VS Codium+vscode-haskell
Which version of HLS do you use and how did you install it? 1.8.0.0 from ghcup
Have you configured HLS in any way (especially: a hie.yaml file)? No

Steps to reproduce

Start HLS. (This will fail in my configuration because ghc 9.2.5 is not supported, but that's a separate ticket.)

Expected behaviour

~/.cabal is not created if ~/.config/cabal exists.

Actual behaviour

Cabal 3.9/3.10pre supports XDG compliance, which moves various cabal files to XDG compliant locations and no longer uses ~/.cabal. If it finds ~/.cabal it switches to compatibility mode. Starting HLS currently always creates ~/.cabal and I must remove it after starting HLS by any means so my package store will be found.

Cabal 3.10 is currently in pre-release testing, so this currently affects only a few people but will likely become more common as the 3.10 release date approaches.

Debug information

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugA bug or unintended effect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions