So far, I’ve used Stack (and Stackage) with decent success in my Haskell projects. But I’ve been hitting some walls, and I’m curious if I’m missing something.
Recently, I tried to upgrade my Stackage LTS and hit some issues. That linked thread talks about the missing ormolu package, but in this thread I’d like to discuss my HLS issues ![]()
TL;DR: HLS (installed via ghcup) 2.14.0.0 breaks with the latest Stackage LTS (GHC 9.10.3). It works out-of-the-box with the GHC 9.8 and 9.6 LTSs, though. It seems to be an ABI mismatch, maybe? I’m not sure if this is a bug or expected behavior.
Doing some research I’ve found that: “In general, HLS needs to be compiled with the exact same compiler you used to compile your project.” The solutions seem to be: set Stack to use system GHC or compile HLS with your exact stack GHC.
Okay, but: Stack allows me to isolate projects and GHC versions, which is what I want. How can I work on multiple projects, each of which uses a different GHC version? Do I need to compile a separate HLS for every project? Does ghcup let me do that easily? Or… what are my other options? Juggle different GHC versions in ghcup and switch them around manually, set stack to use “system” GHC?
I guess what I’m confused about here is: I’m using what I thought was a pretty common setup: stack + stackage LTS + HLS. But, like… for example, if I stack new, the default project doesn’t even work with HLS. I get a bunch of “expected Cabal-xxx…” errors in the logs.
How do people manage these issues in their own projects? Am I doing something crazy? ![]()