haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 213 forks source link

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

Open SodeshDindayal opened 4 years ago

SodeshDindayal commented 4 years ago

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?

Avi-D-coder commented 4 years ago

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.

SodeshDindayal commented 4 years ago

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"

Avi-D-coder commented 4 years ago

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

SodeshDindayal commented 4 years ago

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

Avi-D-coder commented 4 years ago

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.

SodeshDindayal commented 4 years ago

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

Avi-D-coder commented 4 years ago

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 commented 4 years ago

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

SodeshDindayal commented 4 years ago

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?

Avi-D-coder commented 4 years ago

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

SodeshDindayal commented 4 years ago

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.

Avi-D-coder commented 4 years ago

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)?

SodeshDindayal commented 4 years ago

Yea I installed the GHC via stack

jneira commented 4 years ago

@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 commented 4 years ago

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}