Skip to content

Version mismatch between ghc and ghc-pkg when specifying the ghc version in cabal.project #4683

@tchoutri

Description

@tchoutri
  • HLS version: haskell-language-server version: 2.11.0.0 (GHC: 9.10.2) (PATH: /home/tchoutri/.ghcup/hls/2.11.0.0/lib/haskell-language-server-2.11.0.0/bin/haskell-language-server-wrapper)
  • Cabal version: cabal-install version 3.16.0.0

While using HLS in a project that specifies the GHC binary in cabal.project, I get this error:

  Error: [Cabal-4000]
  Version mismatch between ghc and ghc-pkg:
  /home/tchoutri/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 is version 9.10.2
  /home/tchoutri/.ghcup/bin/ghc-pkg is version 9.6.7

And yes indeed, 9.6.7 is the default version set on my system, but I specify 9.10.2 in cabal.project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triagetype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions