Closed varosi closed 8 years ago
This is more difficult to do correctly than you might think. You can't just go and call ghc --version
and ghc-mod --version
to get what you want. While that might work in simple cases consider: cabal configure --with-ghc=/some/custom/version/of/ghc
. This will make cabal use whatever ghc you point it to, which obviously doesn't have to be the same version as the one on PATH. So to check if the ghc versions match you actually need to peek inside cabal's configuration state which is considered hard. Just something to keep in mind.
Yes, you're right. May be simple check turned on by default and overriden with option is okay for most situations.
A short warning will probably suffice. I will get to it when I have a chance. Don't hold your breath though, there are more pressing issues at the moment.
Great! Thanks!
2016-05-11 2:37 GMT+03:00 Nikolay Yakimov notifications@github.com:
A short warning will probably suffice. I will get to it when I have a chance. Don't hold your breath though, there are more pressing issues at the moment.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/atom-haskell/haskell-ghc-mod/issues/140#issuecomment-218323340
Mostly done in 1.14.0.
Strange error I got on some other Windows 8 machine:
haskell-ghc-mod warning: No cabal sandbox found /C:/Users/Home/.atom/packages/haskell-ghc-mod/lib/util.coffee:63 haskell-ghc-mod warning: GHC version in your PATH '7.10.3' doesn't match with GHC version used to build ghc-mod '7.10.3'. This can lead to problems when using Cabal or Plain projects
See that both versions seems the same.
2016-05-18 16:34 GMT+03:00 Nikolay Yakimov notifications@github.com:
Mostly done in 1.14.0.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/atom-haskell/haskell-ghc-mod/issues/140#issuecomment-220027120
That's a typo on my part. I will fix it in the next release. What it meant to say is
GHC version in your PATH '7.10.2'
No problem! Now the message is fine.
Thank you!
2016-05-18 17:51 GMT+03:00 Nikolay Yakimov notifications@github.com:
That's a typo on my part. I will fix it in the next release. What it meant to say is
GHC version in your PATH '7.10.2'
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/atom-haskell/haskell-ghc-mod/issues/140#issuecomment-220051196
Check if ghc-mod matches ghc version and don't run plug-in if they don't match, because later it will crash. Then show a warning that plug-in is not running because ghc-mod is not matching ghc version.
ghc-mod ran without parameters show what ghc is used to build it.