Skip to content

ghcide and project versions mismatch when building from the source #401

Closed
@TheMC47

Description

@TheMC47

Subject of the issue

I'm basically trying to build haskell-language-server from the source using stack, as per the instructions in the Contributing section (I want to actually play around with the source code)
Basically this:

$ cp hie.yaml.stack hie.yaml
$ cp install/hie.yaml.stack install/hie.yaml
$ stack build --test --no-run-tests
$ cd install
$ stack build

However, upon opening various projects, I get this error:

ghcide compiled against GHC 8.6.5 but currently using 8.8.4 
This is unsupported, ghcide must be compiled with the same GHC version as the project.

Environment

This happened with multiple projects (and standalone files). Here is an example of a project configuration:
stack.yaml

resolver: lts-16.13
packages:
- xmobar-git
- xmonad-git
- xmonad-contrib-git
- .
extra-deps:
  - netlink-1.1.1.0@sha256:d83424b5ba9921191449e4b1f53c7cba7f4375f2c55a9b737c77e982e1f40d00,3689

hie.yaml

cradle:
  stack:
  - path: "./src"
    component: "xmonad-private:lib"

Expected behaviour

I don't think I'm supposed to recompile everything for each project. I use stack quite often so different projects have different ghc versions. If that is the case, how do I go about it? The goal here is to be able to make changes to the source of haskell-language-server and test them on different projects.

I feel that I'm missing something quite obvious, sorry if I am, and thanks for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous integrationtype: enhancementNew feature or requesttype: supportUser support tickets, questions, help with setup etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions