Closed snoyberg closed 6 years ago
@snoyberg , it may sound silly, but I don't suppose you could drop a few lines on how to produce an erroneous case? I'm willing to attack this, but seem to be stuck understanding the actual issue. Thanks!
Great question. I'm not sure how the original people suffering from this triggered the bug, but here's an example of steps that could be taken:
Create a stack.yaml
specifying lts-11.4
, e.g.
resolver: lts-11.4
packages: []
Try to build ghc-mod
, e.g. stack build ghc-mod
You'll get an error message recommending, among other things, that you upgrade your base
version, e.g.:
- Cabal-1.24.2.0
- base-4.9.1.0
- cabal-helper-0.7.3.0
- extra-1.5.3
- haskell-src-exts-1.19.1
- hlint-2.0.15
- monad-journal-0.7.2
- optparse-applicative-0.13.2.0
If you try to build anything, you'll keep getting error messages about necessary extra deps.
Ideally, two things should instead happen:
base
to extra-deps
base
in extra-deps
, it should give a very loud warning about the fact that you almost certainly didn't mean that.@snoyberg alright, much clearer now. Especially with the 3907 reference. Thank you! I'll try to get it fixed.
I have submitted my take on implementing the changes. Could someone possibly take a look at the code, and tell me if it's the right direction at all?
The PR looks great! I've added a few comments over there, thanks for the contribution.
Fixed by #3993, thanks!
I've seen users get confusing error messages multiple times when trying to upgrade base, often from trying to install a package like ghc-mod. We should give a warning in such situations, and recommend changing GHC versions instead.