haskell-ide-engine icon indicating copy to clipboard operation
haskell-ide-engine copied to clipboard

Mismatching GHC Versions. Stack project is 8.10.1, HIE is 8.8.3

Open SodeshDindayal opened this issue 5 years ago • 15 comments
trafficstars

I'm a bit of a newbie, is there anyway to uninstall the current GHC version and specifically downgrade to an older version to have it work with hie?

SodeshDindayal avatar May 22 '20 00:05 SodeshDindayal

Change your resolver(in stack.yaml) to lts-15.13. Look under your ~/.stack folder delete ghc 8.10.

Let me know if you have any issues.

Avi-D-coder avatar May 22 '20 01:05 Avi-D-coder

The problem is when I'm looking to delete ghc 8.10 I'm only see two two folders with name "ghc 8.6.5" and "ghc 8.8.3"

SodeshDindayal avatar May 22 '20 01:05 SodeshDindayal

The path will be something like .stack/programs/x86_64-linux/ghc-tinfo6-8.8.2

Avi-D-coder avatar May 22 '20 01:05 Avi-D-coder

I'm on windows. In the path C:\Users\sodes\AppData\Local\Programs\stack\x86_64-windows and not finding anything of that sort named, only the above 2 folders that I mentioned

SodeshDindayal avatar May 22 '20 01:05 SodeshDindayal

I can't help with windows specifically, but if you need to save disk space backup ~/.stack/config.yaml and ~/.stack/global-project/stack.yaml if you have ever modified them and then delete the whole stack dir.

Avi-D-coder avatar May 22 '20 01:05 Avi-D-coder

Thanks. At this point I'll just use haskell and ghci interchangeably rather than trying to have it work within vs. Almost lost my sanity during this process

SodeshDindayal avatar May 22 '20 01:05 SodeshDindayal

I hope you reconsider. If you want help, every Saturday at 5PM UTC there is a Haskell group video chat, after the main event at 7PM it's free form, so I would be glad to help then.

Avi-D-coder avatar May 22 '20 02:05 Avi-D-coder

It's also worth noting https://github.com/haskell/haskell-language-server/ hie's replacement supports 8.10

Avi-D-coder avatar May 22 '20 02:05 Avi-D-coder

Thank you. It was a really tough process to be installing and uninstalling time and time again trying to get it to work, and I haven't even started my coding, this is just to set up the IDE, so that just makes things worse. I'll try to make it for Saturday. Do you think maybe a teamviewer format could be established to help those who don't have a knack for these sort of things?

SodeshDindayal avatar May 22 '20 02:05 SodeshDindayal

I'm not exactly clear what you mean by a teamviewer format?

Avi-D-coder avatar May 22 '20 02:05 Avi-D-coder

By this I mean a more direct approach by having someone installing the directories and files for you via teamviewer, since it's quite easy to configure something wrong if you don't know what you're doing. But thinking about this again it doesn't really offer a more generic solution that can help everyone, so you can ignore that comment.

SodeshDindayal avatar May 22 '20 03:05 SodeshDindayal

Yeah, we try to go for the repeatable approach. Idealy it should be as easy as following these instructions haskell-language-server/#windows-specific-pre-requirements, it will take a while, but you should not need to delete the stack dir or anything like that.

How did you get GHC (from stack I assume)?

Avi-D-coder avatar May 22 '20 03:05 Avi-D-coder

Yea I installed the GHC via stack

SodeshDindayal avatar May 22 '20 03:05 SodeshDindayal

@SodeshDindayal could you share the project you are trying to open in vscode? The stack.yaml and <project.name>.cabal (or package.yaml) could be specially useful. Could you share the output of executing hie --version and stack path in a console (last one in the root dir of the project)

jneira avatar May 22 '20 05:05 jneira

I'm on windows. In the path C:\Users\sodes\AppData\Local\Programs\stack\x86_64-windows and not finding anything of that sort named, only the above 2 folders that I mentioned

Just in case: there should be another dir inside named msys2-${version}

jneira avatar May 22 '20 05:05 jneira